Sunday, March 25, 2012
Connection Problem
I've got a small problem and i can't figure it out. I can connect successfully to the Microsoft SQL Server "Beauty" (get also nonzero for successfull connection). If i run the application (see code below). I get following Error Message "Illegal Objectname 'TestTabelle' ". I double checked the SQL statement and it should be correct. Even the spelling of TestTabelle is right. For testing purposes I've also included 5-6 data records in the tabel.
I try to connect via ODBC. I've created the database with MS SQL Enterprise Manager. Right Click -> Create New Database. I called it "Test" and created in "Test" a new Table, which is called "TestTabelle".
I found information how i can connect to a ms sql server "Beauty", i've also found how i can connect to a table, BUT where is the information which Database ?`in my case it should be Test.
Anyone can help ?
Thank you
{
CDBVariant value;
char sql_statement [2048] = "";
//CDatabase object "db" created to connect database
CDatabase db;
db.OpenEx(_T("DSN=Beauty;UID=Administrator"), CDatabase::noOdbcDialog);
//CRecordset object "rs" created to access and manipulate database records.
CRecordset rs(&db);
strcpy(sql_statement,_T("SELECT * FROM TestTabelle"));
rs.Open(CRecordset::forwardOnly,sql_statement);
//Get quantity from Database
int n = rs.GetODBCFieldCount( );
while(!rs.IsEOF())
{
for( int i = 0; i < n; i++ )
{
rs.GetFieldValue("index",value);
m_Buy_List.InsertItem(i,LPCTSTR(value.m_pstring));
rs.GetFieldValue("product",value);
m_Buy_List.SetItemText(i,2,LPCTSTR(value.m_pstring ));
rs.GetFieldValue("price",value);
m_Buy_List.SetItemText(i,3,LPCTSTR(value.m_pstring ));
}
rs.MoveNext( );
}
//Close records access.
rs.Close( );
//Close database connection.
db.Close();
}Do you have a default database set? If not try this:
strcpy(sql_statement,_T("USE TEST; SELECT * FROM TestTabelle"));|||1. I dunno how i can set the "Test" Database as default on MS SQL Server
2. If i type "USE TEST;" like you said iam getting a big compiler or error message
:(|||ok, since modifying the logon properties appears to be not acceptible, try this:
strcpy(sql_statement,_T("SELECT * FROM Test.dbo.TestTabelle"));|||thx ms
i could modify the default settings... i will try this sql_statement too..
but somehow i am getting the errors know where i try to access the tabel field.
first one: index (int)
second: product (varchar)
third: price (float)
i ddin't found any error. weird ?
Monday, March 19, 2012
Connection Management
I have a Point-of-sale application that uses SQL Server2000 for the backend.
Basically, the users perform various functions boiling down to login (check
password from a table) and data entry (insert a food entry). Previously, I
would open a new ADO 2.7 connection to the database each time one of these
types of database accessing functions needed to be performed - but I noticed
that sometimes the DB would freeze the application for 20 seconds or so - or
even cause a timeout error.
To fix this, I open a DB connection when the application first starts,
keeping it open for the life of the application - each time a function needs
to access the DB, it just uses the applications (global) connection that is
constantly open and connected.
This seems to have fixed the problem, however, I am curious, is this an OK
way to handle the connections - keeping in mind that there are four separate
stations - each running the application - at the same time. Therefore, I
have 4 constantly open connections at the same time.
Thanks and regards,
Ryan Kennedy"Ryan P. Kennedy" <ryanp.kennedy@.verizon.net> wrote in message
news:lYnBb.4549$UM4.1037@.nwrdny01.gnilink.net...
> Hi:
> I have a Point-of-sale application that uses SQL Server2000 for the
backend.
> Basically, the users perform various functions boiling down to login
(check
> password from a table) and data entry (insert a food entry). Previously,
I
> would open a new ADO 2.7 connection to the database each time one of these
> types of database accessing functions needed to be performed - but I
noticed
> that sometimes the DB would freeze the application for 20 seconds or so -
or
> even cause a timeout error.
> To fix this, I open a DB connection when the application first starts,
> keeping it open for the life of the application - each time a function
needs
> to access the DB, it just uses the applications (global) connection that
is
> constantly open and connected.
> This seems to have fixed the problem, however, I am curious, is this an OK
> way to handle the connections - keeping in mind that there are four
separate
> stations - each running the application - at the same time. Therefore, I
> have 4 constantly open connections at the same time.
>
> Thanks and regards,
> Ryan Kennedy
I don't know much about ADO, but it sounds like you're describing a form of
connection pooling, which is certainly a very common way to manage
connections from multiple clients.
Simon|||"Ryan P. Kennedy" <ryanp.kennedy@.verizon.net> wrote in message
news:lYnBb.4549$UM4.1037@.nwrdny01.gnilink.net...
> Hi:
> I have a Point-of-sale application that uses SQL Server2000 for the
backend.
> Basically, the users perform various functions boiling down to login
(check
> password from a table) and data entry (insert a food entry). Previously,
I
> would open a new ADO 2.7 connection to the database each time one of these
> types of database accessing functions needed to be performed - but I
noticed
> that sometimes the DB would freeze the application for 20 seconds or so -
or
> even cause a timeout error.
> To fix this, I open a DB connection when the application first starts,
> keeping it open for the life of the application - each time a function
needs
> to access the DB, it just uses the applications (global) connection that
is
> constantly open and connected.
> This seems to have fixed the problem, however, I am curious, is this an OK
> way to handle the connections - keeping in mind that there are four
separate
> stations - each running the application - at the same time. Therefore, I
> have 4 constantly open connections at the same time.
Connection pooling, the sharing of a single connection among components of
an application, is very common and a good design principle. It is
particularly great for web based/ASP applications, in order to conserve
resource. Persistant connections, keeping a connection open even when not in
use, is something I shy away from in my client server and my web based app
designs. I prefer to create a connection, pool it, and then open and close
it as needed.
It sounds like you are looking for a solution to a symptom, and not your
problem. If I were you, I would investigate the reason your app is timing
out and solve that.
--
BV.
WebPorgmaster - www.IHeartMyPond.com
Work at Home, Save the Environment - www.amothersdream.com
Sunday, March 11, 2012
Connection from ASP page to SQL Server Express
I have two servers, the web (with IIS - win2003) and the test data
server (winXPpro with SQL Express)
I'm trying to connect to the db but with no success...
here is the connection string I'm using:
sConn = "Driver=SQLNCLI;
Server=marco-server\SQLEXPRESS;
Database=grimp;
Uid=grimpuser;
Pwd=somePassword;"
I get this:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no
default driver specified
I've tried also with Driver={SQL Native Client} but I get the same
error.
do I have to install something on the web server?(ma.giorgi@.gmail.com) writes:
Quote:
Originally Posted by
I have two servers, the web (with IIS - win2003) and the test data
server (winXPpro with SQL Express)
I'm trying to connect to the db but with no success...
here is the connection string I'm using:
sConn = "Driver=SQLNCLI;
Server=marco-server\SQLEXPRESS;
Database=grimp;
Uid=grimpuser;
Pwd=somePassword;"
>
I get this:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no
default driver specified
>
I've tried also with Driver={SQL Native Client} but I get the same
error.
Try using "Provider", rather than "Driver".
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx
Thursday, March 8, 2012
Connection fails during unit test
I am having trouble with a connection within our local network. A
development machine needs to connect to the main dev db server. Visual
Studio and Enterprise Manager on the dev machine connect fine. The
application under development connects fine when it is run with the
connection string
"Data Source=[servername]; Initial Catalog=[dbName];
Trusted_Connection=yes;"
The application also connects nicely using a named login and password.
My problem is, when we run unit tests with NUnit on a remote machine the
connection attempt returns 'Sql Server does not exist or access denied'
with the same connection string. We have completely turned off all
firewalls etc to no avail.
Any Ideas?
Thanks
Graham
Have the remote machine test connecting with a new ODBC DSN. Press the
Test
button on the ODBC Wizard and report the OS error returned. Since the
machine is remote,
it could be a problem with name resolution.
Ex. 11001 == HostNameNotFound == DNS/WINS issue.
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.
|||Kevin McDonnell [MSFT] wrote:
> Have the remote machine test connecting with a new ODBC DSN. Press the
> Test
> button on the ODBC Wizard and report the OS error returned. Since the
> machine is remote,
> it could be a problem with name resolution.
> Ex. 11001 == HostNameNotFound == DNS/WINS issue.
> Thanks,
> Kevin McDonnell
> Microsoft Corporation
> This posting is provided AS IS with no warranties, and confers no rights.
>
>
Thanks for the reply Kevin...
I have tried the ODBC wizard and the connection works fine. As I said I
have no problem connecting from the remote machine using Enterprise
Manager and Visual Studio, it is just the NUnit tests that can't access
the db server.
Thanks again
Graham
|||"when we run unit tests with NUnit on a remote machine the
connection attempt returns 'Sql Server does not exist or access denied'
with the same connection string. "
I would run network traces to determine where the problem is. You need to
validate
that the tcp connection is being made and the connection string is correct.
An ODBC trace won't show
you this level of detail.
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.
|||Kevin McDonnell [MSFT] wrote:
> "when we run unit tests with NUnit on a remote machine the
> connection attempt returns 'Sql Server does not exist or access denied'
> with the same connection string. "
> I would run network traces to determine where the problem is. You need to
> validate
> that the tcp connection is being made and the connection string is correct.
> An ODBC trace won't show
> you this level of detail.
>
> Thanks,
> Kevin McDonnell
> Microsoft Corporation
> This posting is provided AS IS with no warranties, and confers no rights.
>
>
Thanks again Kevin
My networking knowledge is a little lacking I'm afraid. Could you give
me some pointers on how I would go about running 'network traces'.
Thanks
Graham
|||SQL Server is a Winsock application. So the 2nd article will help you
understand what to look for.
If you need more help you can always open up a support case.
Windows 2000 Server has netmon installed . You just need to enable it via
Add/Remove Windows components.
This version captures traffic to and from that machine. Only SMS has the
full version to capture traffic on any machine.
Q148942 How to Capture Network Traffic with Network Monitor
Q169292 The Basics of Reading TCP/IP Traces
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.
Connection fails during unit test
I am having trouble with a connection within our local network. A
development machine needs to connect to the main dev db server. Visual
Studio and Enterprise Manager on the dev machine connect fine. The
application under development connects fine when it is run with the
connection string
"Data Source=[servername]; Initial Catalog=[dbName];
Trusted_Connection=yes;"
The application also connects nicely using a named login and password.
My problem is, when we run unit tests with NUnit on a remote machine the
connection attempt returns 'Sql Server does not exist or access denied'
with the same connection string. We have completely turned off all
firewalls etc to no avail.
Any Ideas?
Thanks
GrahamHave the remote machine test connecting with a new ODBC DSN. Press the
Test
button on the ODBC Wizard and report the OS error returned. Since the
machine is remote,
it could be a problem with name resolution.
Ex. 11001 == HostNameNotFound == DNS/WINS issue.
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.|||Kevin McDonnell [MSFT] wrote:
> Have the remote machine test connecting with a new ODBC DSN. Press the
> Test
> button on the ODBC Wizard and report the OS error returned. Since the
> machine is remote,
> it could be a problem with name resolution.
> Ex. 11001 == HostNameNotFound == DNS/WINS issue.
> Thanks,
> Kevin McDonnell
> Microsoft Corporation
> This posting is provided AS IS with no warranties, and confers no rights.
>
>
Thanks for the reply Kevin...
I have tried the ODBC wizard and the connection works fine. As I said I
have no problem connecting from the remote machine using Enterprise
Manager and Visual Studio, it is just the NUnit tests that can't access
the db server.
Thanks again
Graham|||"when we run unit tests with NUnit on a remote machine the
connection attempt returns 'Sql Server does not exist or access denied'
with the same connection string. "
I would run network traces to determine where the problem is. You need to
validate
that the tcp connection is being made and the connection string is correct.
An ODBC trace won't show
you this level of detail.
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.|||Kevin McDonnell [MSFT] wrote:
> "when we run unit tests with NUnit on a remote machine the
> connection attempt returns 'Sql Server does not exist or access denied'
> with the same connection string. "
> I would run network traces to determine where the problem is. You need to
> validate
> that the tcp connection is being made and the connection string is correct
.
> An ODBC trace won't show
> you this level of detail.
>
> Thanks,
> Kevin McDonnell
> Microsoft Corporation
> This posting is provided AS IS with no warranties, and confers no rights.
>
>
Thanks again Kevin
My networking knowledge is a little lacking I'm afraid. Could you give
me some pointers on how I would go about running 'network traces'.
Thanks
Graham|||SQL Server is a Winsock application. So the 2nd article will help you
understand what to look for.
If you need more help you can always open up a support case.
Windows 2000 Server has netmon installed . You just need to enable it via
Add/Remove Windows components.
This version captures traffic to and from that machine. Only SMS has the
full version to capture traffic on any machine.
Q148942 How to Capture Network Traffic with Network Monitor
Q169292 The Basics of Reading TCP/IP Traces
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.
Connection Failed on VWD 2005 EE and SQL Server 2005 EE
I have this problem:
When I try to open database table under database explorer in VWD 2005EE, it says that it failed to attempt connection due to user instanceand the connection will be closed.
When I try to right click on my database's file name under databaseexplorer and click connection to set the connection setting and clickon "Test Connection", it says the same thing.
This happen sometime, but after I restart my computer, I am able to access my database file again.
Anybody have any idea what's going on?
thanks !Maybe some other open connection is accessing the database file, so new connections are prevented?
Saturday, February 25, 2012
connection error
Hi
I am getting following error while connecting in sql server. i have already disabled firewall, enabled remote connections using pipe and tcp and made sure the sql server and sql browser services are running.
but still the problem persists...can any help me ?
Named Pipes Provider: Could not open a connection to SQL Server [2].
Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while establi
shing a connection to the server. When connecting to SQL Server 2005, this failu
re may be caused by the fact that under the default settings SQL Server does not
allow remote connections..
Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.
thanks in advance
Do you have a named instacne or a default one ? how are you connecting, you will have to provide some more information on your situation to make it easier forus to give you the right suggestions.Jens K. Suessmeyer
http://www.sqlserver2005.de
Connection Error
I have a VB6 program that talks to SQL Server 2000 database. The Connection
String is as below:
Provider=SQLOLEDB.1;Persist Security Info=False;User ID=" & M_USER_NAME &
";Password=" & M_PASSWORD & ";Initial Catalog=" & Database & ";Data Source="
& M_SERVER
When the program is idle for a while, the connection terminates.
Also, when I try to connect using ODBC I get the following error
Connection failed;.
SQLState: '01000'
SQL Server Error: 53
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen(Connect())
Connection failed;
SQLState: '08001'
SQL Server Error: 17
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or
access denied.
Any ideas or suggestions. Dont know where to start looking.
The SQL Server is running. I have double-checked that.
Please HELP
Thanks
Hi, Raju
See:
http://support.microsoft.com/kb/328306
http://support.microsoft.com/kb/827422
Razvan
|||I also have this same error. Did you find the solution?
I searched the entire net but couldnt find a solution.
If you try disabling and enabling the network connection, it will work again. Very strange.
Please do post if you got solution.
Thanks in advance to anybody who can help in this matter
************************************************** ********************
Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
|||trest
"Razvan Socol" <rsocol@.gmail.com> schrieb im Newsbeitrag
news:1132744113.256414.11460@.g43g2000cwa.googlegro ups.com...
> Hi, Raju
> See:
> http://support.microsoft.com/kb/328306
> http://support.microsoft.com/kb/827422
> Razvan
>
Connection Error
I have a VB6 program that talks to SQL Server 2000 database. The Connection
String is as below:
Provider=SQLOLEDB.1;Persist Security Info=False;User ID=" & M_USER_NAME &
";Password=" & M_PASSWORD & ";Initial Catalog=" & Database & ";Data Source="
& M_SERVER
When the program is idle for a while, the connection terminates.
Also, when I try to connect using ODBC I get the following error
Connection failed;.
SQLState: '01000'
SQL Server Error: 53
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen(Connect())
Connection failed;
SQLState: '08001'
SQL Server Error: 17
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or
access denied.
Any ideas or suggestions. Dont know where to start looking.
The SQL Server is running. I have double-checked that.
Please HELP
Thanks
Hi, Raju
See:
http://support.microsoft.com/kb/328306
http://support.microsoft.com/kb/827422
Razvan
|||trest
"Razvan Socol" <rsocol@.gmail.com> schrieb im Newsbeitrag
news:1132744113.256414.11460@.g43g2000cwa.googlegro ups.com...
> Hi, Raju
> See:
> http://support.microsoft.com/kb/328306
> http://support.microsoft.com/kb/827422
> Razvan
>
Connection Error
I have a VB6 program that talks to SQL Server 2000 database. The Connection
String is as below:
Provider=SQLOLEDB.1;Persist Security Info=False;User ID=" & M_USER_NAME &
";Password=" & M_PASSWORD & ";Initial Catalog=" & Database & ";Data Source="
& M_SERVER
When the program is idle for a while, the connection terminates.
Also, when I try to connect using ODBC I get the following error
Connection failed;.
SQLState: '01000'
SQL Server Error: 53
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen(Connect(
))
Connection failed;
SQLState: '08001'
SQL Server Error: 17
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or
access denied.
Any ideas or suggestions. Dont know where to start looking.
The SQL Server is running. I have double-checked that.
Please HELP
ThanksHi, Raju
See:
http://support.microsoft.com/kb/328306
http://support.microsoft.com/kb/827422
Razvan|||trest
"Razvan Socol" <rsocol@.gmail.com> schrieb im Newsbeitrag
news:1132744113.256414.11460@.g43g2000cwa.googlegroups.com...
> Hi, Raju
> See:
> http://support.microsoft.com/kb/328306
> http://support.microsoft.com/kb/827422
> Razvan
>
Connection Error
I have a VB6 program that talks to SQL Server 2000 database. The Connection
String is as below:
Provider=SQLOLEDB.1;Persist Security Info=False;User ID=" & M_USER_NAME &
";Password=" & M_PASSWORD & ";Initial Catalog=" & Database & ";Data Source="
& M_SERVER
When the program is idle for a while, the connection terminates.
Also, when I try to connect using ODBC I get the following error
Connection failed;.
SQLState: '01000'
SQL Server Error: 53
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen(Conn
ect())
Connection failed;
SQLState: '08001'
SQL Server Error: 17
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not
exist or
access denied.
Any ideas or suggestions. Dont know where to start looking.
The SQL Server is running. I have double-checked that.
Please HELP
ThanksHi, Raju
See:
http://support.microsoft.com/kb/328306
http://support.microsoft.com/kb/827422
Razvan|||trest
"Razvan Socol" <rsocol@.gmail.com> schrieb im Newsbeitrag
news:1132744113.256414.11460@.g43g2000cwa.googlegroups.com...
> Hi, Raju
> See:
> http://support.microsoft.com/kb/328306
> http://support.microsoft.com/kb/827422
> Razvan
>
Connection Error
I have a VB6 program that talks to SQL Server 2000 database. The Connection
String is as below:
Provider=SQLOLEDB.1;Persist Security Info=False;User ID=" & M_USER_NAME &
";Password=" & M_PASSWORD & ";Initial Catalog=" & Database & ";Data Source="
& M_SERVER
When the program is idle for a while, the connection terminates.
Also, when I try to connect using ODBC I get the following error
Connection failed;.
SQLState: '01000'
SQL Server Error: 53
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen(Connect())
Connection failed;
SQLState: '08001'
SQL Server Error: 17
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or
access denied.
Any ideas or suggestions. Dont know where to start looking.
The SQL Server is running. I have double-checked that.
Please HELP
Thanks
Hi, Raju
See:
http://support.microsoft.com/kb/328306
http://support.microsoft.com/kb/827422
Razvan
|||trest
"Razvan Socol" <rsocol@.gmail.com> schrieb im Newsbeitrag
news:1132744113.256414.11460@.g43g2000cwa.googlegro ups.com...
> Hi, Raju
> See:
> http://support.microsoft.com/kb/328306
> http://support.microsoft.com/kb/827422
> Razvan
>
Connection Error
I have a VB6 program that talks to SQL Server 2000 database. The Connection
String is as below:
Provider=SQLOLEDB.1;Persist Security Info=False;User ID=" & M_USER_NAME &
";Password=" & M_PASSWORD & ";Initial Catalog=" & Database & ";Data Source="
& M_SERVER
When the program is idle for a while, the connection terminates.
Also, when I try to connect using ODBC I get the following error
Connection failed;.
SQLState: '01000'
SQL Server Error: 53
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen(Conn
ect())
Connection failed;
SQLState: '08001'
SQL Server Error: 17
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not
exist or
access denied.
Any ideas or suggestions. Dont know where to start looking.
The SQL Server is running. I have double-checked that.
Please HELP
ThanksHi, Raju
See:
http://support.microsoft.com/kb/328306
http://support.microsoft.com/kb/827422
Razvan|||I also have this same error. Did you find the solution?
I searched the entire net but couldnt find a solution.
If you try disabling and enabling the network connection, it will work again
. Very strange.
Please do post if you got solution.
Thanks in advance to anybody who can help in this matter
****************************************
******************************
Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET
resources...|||trest
"Razvan Socol" <rsocol@.gmail.com> schrieb im Newsbeitrag
news:1132744113.256414.11460@.g43g2000cwa.googlegroups.com...
> Hi, Raju
> See:
> http://support.microsoft.com/kb/328306
> http://support.microsoft.com/kb/827422
> Razvan
>
Sunday, February 19, 2012
connection
I get this error from sql server 2005 developer edition on windows. I ca't
seem to get any connection to work sqlnative client og file connection. I
have installed all features from the sql developer dvd.
* The connection "SourceConnectionOLEDB" is not found. This error is thrown
by Connections collection when the specific connection element is not found.
({58517491-4481-44D8-BD05-DAA10CBF420E})
/rkri
Have you enabled TCP/IP on your SQL Server developer edition installation? I
think it is disabled by default. Check the Configuration Manager.
Ben Nevarez, M.Sc.
MCDBA, OCP
"Ren K" <rkri000@.foa.dk> wrote in message
news:ObaCPXQ$FHA.356@.TK2MSFTNGP12.phx.gbl...
> Hi
> I get this error from sql server 2005 developer edition on windows. I
> ca't
> seem to get any connection to work sqlnative client og file connection. I
> have installed all features from the sql developer dvd.
> * The connection "SourceConnectionOLEDB" is not found. This error is
> thrown
> by Connections collection when the specific connection element is not
> found.
> ({58517491-4481-44D8-BD05-DAA10CBF420E})
> /rkri
>
>
|||I have a installed the sql server 2005 on a named instance called sql2005
and this is running side-by-side with sqlexpress and msde ( 2000). my tcp/tp
is enabled i checked this under protocols for sql2005, I have enabled named
pipes and shared memory ( this was enabled by default ). I don't understand
I never had any problems whatsoever with sql server 2000 and are already
looking forward to the first service pack.
Thanks for the reply
/rkri
"Ben Nevarez" <bnevarez@.sjm.com> skrev i en meddelelse
news:uJhHClQ$FHA.4028@.tk2msftngp13.phx.gbl...
> Have you enabled TCP/IP on your SQL Server developer edition installation?
> I think it is disabled by default. Check the Configuration Manager.
> Ben Nevarez, M.Sc.
> MCDBA, OCP
>
> "Ren K" <rkri000@.foa.dk> wrote in message
> news:ObaCPXQ$FHA.356@.TK2MSFTNGP12.phx.gbl...
>
connection
I get this error from sql server 2005 developer edition on windows. I ca't
seem to get any connection to work sqlnative client og file connection. I
have installed all features from the sql developer dvd.
* The connection "SourceConnectionOLEDB" is not found. This error is thrown
by Connections collection when the specific connection element is not found.
({58517491-4481-44D8-BD05-DAA10CBF420E})
/rkriHave you enabled TCP/IP on your SQL Server developer edition installation? I
think it is disabled by default. Check the Configuration Manager.
Ben Nevarez, M.Sc.
MCDBA, OCP
"Ren K" <rkri000@.foa.dk> wrote in message
news:ObaCPXQ$FHA.356@.TK2MSFTNGP12.phx.gbl...
> Hi
> I get this error from sql server 2005 developer edition on windows. I
> ca't
> seem to get any connection to work sqlnative client og file connection. I
> have installed all features from the sql developer dvd.
> * The connection "SourceConnectionOLEDB" is not found. This error is
> thrown
> by Connections collection when the specific connection element is not
> found.
> ({58517491-4481-44D8-BD05-DAA10CBF420E})
> /rkri
>
>|||I have a installed the sql server 2005 on a named instance called sql2005
and this is running side-by-side with sqlexpress and msde ( 2000). my tcp/tp
is enabled i checked this under protocols for sql2005, I have enabled named
pipes and shared memory ( this was enabled by default ). I don't understand
I never had any problems whatsoever with sql server 2000 and are already
looking forward to the first service pack.
Thanks for the reply
/rkri
"Ben Nevarez" <bnevarez@.sjm.com> skrev i en meddelelse
news:uJhHClQ$FHA.4028@.tk2msftngp13.phx.gbl...
> Have you enabled TCP/IP on your SQL Server developer edition installation?
> I think it is disabled by default. Check the Configuration Manager.
> Ben Nevarez, M.Sc.
> MCDBA, OCP
>
> "Ren K" <rkri000@.foa.dk> wrote in message
> news:ObaCPXQ$FHA.356@.TK2MSFTNGP12.phx.gbl...
>
Tuesday, February 14, 2012
Connecting to SSIS in Management Studio.
Hi:
I have 4 named instances of SQL 2005 running on one of our sales server (dont ask me why I have 4 instances.Its a beefy box btw). All the instances have SSIS Packages (around 6-7 in each instance) saved to the SQL server and not to the file system. The issue is every time i need to look at the packages or export the packages from SSMS I have to edit the MsDtsSrvr.ini.xml and type in the named instance name within the <ServerName></ServerName> tag . I then have to restart my SSIS. I dont see an easier approach to this method.
This is causing me a lot of unnecessary time waste. is there anyway this can be automated where in i can pass the instance name dynamically to the ini file or even more best, can I have all the instance names in the ini file and some how look at the packages in each Instance. I am not sure how having all the instance names in the ini file woud resolve the issue though.
I know I can use BIDS which is much more flexible and a recommended approach but need a solution for looking at SSIS packages through SSMS in all of the 4 instances. I look forward to recommendations from anyone who have better ideas and suggestions.
Thank you
AK
you could create a console app that edits the xml file and re-starts ssis.|||Thanks Duane. Do you happen to have an example code sample on how to do that?. I can build looking from that.
Thanks again
AK
|||unfortunately, i don't have a code example to share with you. however, writing such an application should be fairly straightforward (provided that you know .NET). the .NET system.xml namespace provides a number of classes to manipulate xml data. also, the system.serviceprocess namespace provides classes to manipulate windows services.Ankith wrote:
Thanks Duane. Do you happen to have an example code sample on how to do that?. I can build looking from that.
Thanks again
AK
i hope this helps.
|||Hi Duane:
I got this working. I am posting the code snippet for the benefit of others. I have created a SQL Agent job that changes the server name in the XML ini file and restarts SSIS. Restarting I do it through the Job step. Works great.
if (File.Exists(xmlFile))
{
XmlDocument doc = new XmlDocument();
doc.Load(xmlFile);
XmlNode node = doc.SelectSingleNode(@."//*[local-name()='ServerName']");
if (node == null)
{
Console.Write("Node does not exist");
}
else
{
node.InnerText = value;
}
node = null;
doc.Save(xmlFile);
Thanks again for your help.
AK
|||Instead of switching between the servers, you can simply add them all to the SSIS service config file! Simply copy the <FOLDER> tag (till the end - </FOLDER>) as many times as you have SQL instances, give each one unique <NAME>, save config file and restart the SSIS service:...
<TopLevelFolders>
<Folder xsi:type="SqlServerFolder">
<Name>Sql1</Name>
<ServerName>.\Instance1</ServerName>
</Folder>
<Folder xsi:type="SqlServerFolder">
<Name>Sql2</Name>
<ServerName>.\Instance2</ServerName>
</Folder>
<Folder xsi:type="SqlServerFolder">
<Name>Sql3</Name>
<ServerName>.\Instance3</ServerName>
</Folder>
</TopLevelFolders>
...|||
WOW!!!. Thats cool. Thanks Michael.I used your solution and it works great and I dont need my code anymore. DBAs who dont have much experience with C# will find your method really helpful.
Thanks for posting it.
Best Regards
AK
Connecting to SSIS in Management Studio.
Hi:
I have 4 named instances of SQL 2005 running on one of our sales server (dont ask me why I have 4 instances.Its a beefy box btw). All the instances have SSIS Packages (around 6-7 in each instance) saved to the SQL server and not to the file system. The issue is every time i need to look at the packages or export the packages from SSMS I have to edit the MsDtsSrvr.ini.xml and type in the named instance name within the <ServerName></ServerName> tag . I then have to restart my SSIS. I dont see an easier approach to this method.
This is causing me a lot of unnecessary time waste. is there anyway this can be automated where in i can pass the instance name dynamically to the ini file or even more best, can I have all the instance names in the ini file and some how look at the packages in each Instance. I am not sure how having all the instance names in the ini file woud resolve the issue though.
I know I can use BIDS which is much more flexible and a recommended approach but need a solution for looking at SSIS packages through SSMS in all of the 4 instances. I look forward to recommendations from anyone who have better ideas and suggestions.
Thank you
AK
you could create a console app that edits the xml file and re-starts ssis.|||Thanks Duane. Do you happen to have an example code sample on how to do that?. I can build looking from that.
Thanks again
AK
|||unfortunately, i don't have a code example to share with you. however, writing such an application should be fairly straightforward (provided that you know .NET). the .NET system.xml namespace provides a number of classes to manipulate xml data. also, the system.serviceprocess namespace provides classes to manipulate windows services.Ankith wrote:
Thanks Duane. Do you happen to have an example code sample on how to do that?. I can build looking from that.
Thanks again
AK
i hope this helps.
|||Hi Duane:
I got this working. I am posting the code snippet for the benefit of others. I have created a SQL Agent job that changes the server name in the XML ini file and restarts SSIS. Restarting I do it through the Job step. Works great.
if (File.Exists(xmlFile))
{
XmlDocument doc = new XmlDocument();
doc.Load(xmlFile);
XmlNode node = doc.SelectSingleNode(@."//*[local-name()='ServerName']");
if (node == null)
{
Console.Write("Node does not exist");
}
else
{
node.InnerText = value;
}
node = null;
doc.Save(xmlFile);
Thanks again for your help.
AK
|||Instead of switching between the servers, you can simply add them all to the SSIS service config file! Simply copy the <FOLDER> tag (till the end - </FOLDER>) as many times as you have SQL instances, give each one unique <NAME>, save config file and restart the SSIS service:...
<TopLevelFolders>
<Folder xsi:type="SqlServerFolder">
<Name>Sql1</Name>
<ServerName>.\Instance1</ServerName>
</Folder>
<Folder xsi:type="SqlServerFolder">
<Name>Sql2</Name>
<ServerName>.\Instance2</ServerName>
</Folder>
<Folder xsi:type="SqlServerFolder">
<Name>Sql3</Name>
<ServerName>.\Instance3</ServerName>
</Folder>
</TopLevelFolders>
...|||
WOW!!!. Thats cool. Thanks Michael.I used your solution and it works great and I dont need my code anymore. DBAs who dont have much experience with C# will find your method really helpful.
Thanks for posting it.
Best Regards
AK
Friday, February 10, 2012
Connecting to SQL Server 2005 remotely via windows authentication
Hi
I have installed SQL Server 2005 onto a server and then on my client machine I have installed SQL Server 2005 and the Server Management Studio.
When installing it on the server I chose all the defaults so have not setup an sql username or password to connect as I thought I could use Windows.
I go to the Server Management and registered servers, create a new one and enter the ip address of the server and choose Windows Authentication. The following error keeps appearing though and I am not sure what settings/where to check:
Login failed for user ''. The user is not associated with a trusted SQL Server connection. (.Net SqlClient Data Provider)
I have checked and think port 1443 is open on the server, tcpip is enabled but when I choose Windows authentication I cannot enter a username or password as it is greyed out. It has completed the username but no password and these are not the correct ones to connect to the server - I wish to wish the same one I use for RDC.
Or should I try SQL Authentication and if so how would I set this up? Cannot see on the server in SQL Configuration where I could set this?
Hope someone who knows a lot more than me on this can help!
Thanks for your time - this has been driving me mad for days now and everything I print off the internet is not help so any feed back or more useful links to loo up would be great.
Welcome :-) !This error can have several causes. You have the login dialog to SQL Server authentication, but the server only accepts Windows authentication. YOu select Windows Authentication but no user token is passed to the server as the server and the client are not in the same domain .You cannot enter a password as the authentication is integrated, which means that the user was already authenticated and only the token is passed to the Server. For this case the authentication can only take place if the user has a (for the server) valid user token (User is in the same domain or any trusted domain)
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de
|||Hi
Thanks for the very helpful response. I am now going through Support for our externally hosted server which I have installed SQL Server 2005 onto. It appears I will need to set it up with SQL Authentication mode as I am of course on a different domain to the server I want to connect to so thank you for putting me on the right track with that one.
On a similar note - with SQL Authentication - setting up a new username & password I had read that it would need a username from the database. Is this only if you are directing it to a specific database? We will have lots of databases on our server once we have set it up and so only want to link direct to the SQL server and only then choose the database to work with.
No worries if you cannot help as you have been a great help so far.
Thanks for the welcome to this forum!
Sonia
|||User are created on a server level. These principals can be granted access to the server, which does not mean per se that they are able to access any database unless they are mapped to a specific (database)user or role (like the sysadmin role is mapped to the dbo automatically) in the database. YOu will only have to map him to a database if he needs access to it. No need to create a user for a login in a database if he does not need or is not allowed to retrieve any information from the db.HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.d
Connecting to Sql Server 2005 Express from three projects
I have set up a solution in Visual web developer 2005 express which is made up of three projects:
Website(this is the solution)
Admin (Sub directory of website)
members (Sub Directory of Website)
All three projects need to share the same database. However for devlopment purposes I only have Sql Server 2005 Express. Is this possible?
Any pointer would be great.
Thanks in advance
1. connectivity to a database can be done from any web page/any project
2. A database can hold many tables
3. Since it can have many tables, you can have any kind of and as much data you want there, even from different projects
The base answer is yes - there's no problem here - I guess we'd need a more exact question to get any further along.
|||Besides using SQL Surface Area Configuration tool to configure SQL 2005 Express Edition with Advanced Services (SSEA) for allowing remote connections using TCP/IP only, I created an SQL user with password using SQL Management Studio Express in Security-Logins. This user was granted access to a specific database on the Server (a WinXP SP2 machine).Then I tried to connect to SSEA from another machine using OLEDB Provider for SQL Server, SQL Server authentication with above username and password, typed in the Database name, typed Server Name as\\MachineName\SQLExpress, but could not connect. What might have gone wrong? What more settings, if any need to be done on the Server end? I am not sure what roles need to be assigned to the SQL User, so I ticked all.
Mark Nongkhlaw
|||Is communucation at all possible between the two boxes? My point - might be a firewall stopping that traffic?|||Hi
What I mean is if I have three projects, they will have three app_data folders. Now, so far I have only got Sql Server 2005 express to work when there is a mdb file in the app_data folder and it is attached to the sql server. Now if I have to do this for three separate projects I surely will not be able to share the same database between the three.
So the connection string I am currently using is
<addname="LocalSqlServer"connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|aspnetdb.mdf"providerName="System.Data.SqlClient"/>
Can you connect to a sql server 2005 express database in the old fashion way with out having to use theAttachDBFilename?
The database will be running on the same machine as the website so I guess it can be considered a local connection (I understand that there are difficulties with remote connections) .
I hope this makes more sense.
Cheers Steve
|||Finally I understand your problem :)
Have you tried to specify a full path?
AttachDBFileName=c:\the-path-to-othersite-data-directory\aspnetdb.mdf
|||
And yes you can use SQLExpress as a "regular" database - that's what I do (never uses AttachFile) so connecting with for example
Server=SH-W2003CP\SQLEXPRESS;Database=kbmentor;Trusted_Connection=False;uid=sa;pwd=stefan;
is fine.
|||Thanks,aspcode.net- The culprit WAS the WinXP firewall. I configured exceptions for SQL Server Express and SQL Browser and it now works.
Mark
|||Thanks guys, I too have now managed to get my site(s) to work.