Tuesday, March 27, 2012

Connecting to SQL Server 2005 Express

I am having major issues connecting to SQL Server 2005 Express from Visual Basic 2005 Express, which I have tried on multiple PCs but to no avail. Can somebody please explain to me what I'm doing wrong?

1) I install SQL Server 2005 Express and Visual Basic 2005 Express (With .NET framework and SQL native client of course)
2) I open SQL Server using Management Studio and going in with windows authentication. It automatically sets the log on name to computername\SQLEXPRESS.
3) I create a new database called Test and add one table to it
4) I go into Visual Basic 2005 and create a new project.
5) I go to the projects application settings (Properties - Settings).
6) I set up a new connection string, choosing SQL server as the conection type and then on the Connection Properties window it asks me to select the mdf file for the database. I choose the file Test.mdf from the directory C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\
7) I click on Test Connection.

When I do this on two out of the three home PCs I get the error:
Unable to open the physical file "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\Test.mdf".Operating system error 32: "32 (error not found)".
An attempt to attach an auto-named database for file C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\Test.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

The third PC gives me a different error:

Cannot open user default database. Login failed. Login failed for user 'DAVE\David'.

I get the same errors when I try to use a connection string inside the code directly. Does anyone have a clue as to why these errors are occuring? Do I need to set up security or something else on the database first, or is there another reason? If anyone can please help me get to the bottom of this or provide a web address where I can get the answer (step by step instructions on how to connect) then I would be most grateful.

error code 32 means:
"The process cannot access the file because it is being used by another process."

So, either use a different file name for your connection in Visual Basic 2005, or try disconnect your connection in SQL Server using Management Studio.

|||

pse post the Connection string... it seems like u r trying to attach a db called Test....

in the second error .. check what is the Default Database given for user DAVE\David.... the default database should exists and this user should be a user of that db.... for debuggin purpose ... just change the default database of this user to Master and try... it will connect...

Madhu

|||

Hi, I get the same error as the original poster of this thread. I have no other database with similar name or anything, and i have not, as far as i know, any other connections to this database, since I just created it. Do you have any idea of how I should go about this?

Thanks

Niclas

sqlsql

Connecting to SQL Server 2005 - Not Allow Remote Connections

I use ASP.NET 2.0 and VS.NET 2005.

I have the following expression in my code:

string connectionString = "server=\'localhost\'; user id=\'sa\'; password=\'\'; Database=\'Northwind\'";

When I executed the code I have the following error message:

"An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)."

The Microsoft Access was successfully connected in the Server Explorer window.

How do I solve this problem?

Thanks,

Andy.

Try this thread for the two links you need to get it going. Hope this helps.

http://forums.asp.net/thread/1381596.aspx

|||

From your link, I found the following link http://support.microsoft.com/default.aspx?scid=kb%3bEN-US%3b914277. I have followed all the instructions from that page, but I still receive the same error message.

I am not sure which version of SQL I am using. From the "start" -> "All Programs", I can only see "Microsoft SQL Server". It was installed, when I installed Microsoft Visual Studio 2005 Professional.

Andy.

|||If you have the professional you should have the Developer edition CD separately, copy the content to your hard drive and install it as a named instance and then use the instructions for the developer edition. Hope this helps.

Connecting to SQL Server 2005

I have successfully installed SQL Server 2005 on a server that also has SQL
Server 2000. Using SQL Server 2005 interface, how could I connect to a
named instance of a SQL Server 2005 database? As I try, it keeps connecting
me to the SQL Server 2000 db. Is this something you set up in CLient tools?
Please let me know, I connect to the SQL Server using a temp dns name.
Thanks,
Here is what I what to achieve:
category1
content2
content3
content4
content5
content6Please disregard this text. Came from an old message.
"Here is what I what to achieve:
category1
content2
content3
content4
content5
content6"
<programmingcodeATjards.com> wrote in message
news:e83mL7OrGHA.4864@.TK2MSFTNGP03.phx.gbl...
>I have successfully installed SQL Server 2005 on a server that also has SQL
>Server 2000. Using SQL Server 2005 interface, how could I connect to a
>named instance of a SQL Server 2005 database? As I try, it keeps
>connecting me to the SQL Server 2000 db. Is this something you set up in
>CLient tools? Please let me know, I connect to the SQL Server using a temp
>dns name.
> Thanks,
>
> Here is what I what to achieve:
> category1
> content2
> content3
> content4
> content5
> content6
>
>|||<programmingcodeATjards.com> wrote in message
news:e83mL7OrGHA.4864@.TK2MSFTNGP03.phx.gbl...
> I have successfully installed SQL Server 2005 on a server that also has
SQL
> Server 2000. Using SQL Server 2005 interface, how could I connect to a
> named instance of a SQL Server 2005 database? As I try, it keeps
connecting
> me to the SQL Server 2000 db. Is this something you set up in CLient
tools?
> Please let me know, I connect to the SQL Server using a temp dns name.
> Thanks,
>
Not sure what you're trying, but generally it's servername\instancename. If
not instance name is provided it deafults to the default instance.

>
> Here is what I what to achieve:
> category1
> content2
> content3
> content4
> content5
> content6
>
>

Connecting to SQL Server 2005

Hello!
I was wondering if I need to install something on the client in order to
establish ODBC/OLEDB connection to SQL Server 2005. Currently, I have ADO
2.6 installed. Are there any changes in ODBC/OLEDB drivers for SQL Server
2005?
Thanks,
IgorHi
It is best to use MDAC 2.8, but 2.6 will connect to SQL Server 2005, but you
will not be able to use the new datatypes that SQL Server 2005 has
introduced.
The ODBC/OLEDB drivers no longer ship with SQL Server, as it is now a
function of the Operating System to update them.
The new way to connect to SQL Server 2005 is SQL Native Client (SQLNCLI)
"Provider=SQLNCLI"
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"imarchenko" <igormarchenko@.hotmail.com> wrote in message
news:ulvm%23pcCGHA.2300@.TK2MSFTNGP15.phx.gbl...
> Hello!
> I was wondering if I need to install something on the client in order
> to establish ODBC/OLEDB connection to SQL Server 2005. Currently, I have
> ADO 2.6 installed. Are there any changes in ODBC/OLEDB drivers for SQL
> Server 2005?
> Thanks,
> Igor
>|||"Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
news:%2326c1IiCGHA.3984@.TK2MSFTNGP14.phx.gbl...
> Hi
> It is best to use MDAC 2.8, but 2.6 will connect to SQL Server 2005, but
> you will not be able to use the new datatypes that SQL Server 2005 has
> introduced.
> The ODBC/OLEDB drivers no longer ship with SQL Server, as it is now a
> function of the Operating System to update them.
> The new way to connect to SQL Server 2005 is SQL Native Client (SQLNCLI)
> "Provider=SQLNCLI"
>
This is not quite right. MDAC is part of the operating system, but SQL
Native Client is not.
The SQL Native Client is a seperate install. It is included in the SQL
Server distribution and available here:
http://msdn.microsoft.com/data/sqlnative/default.aspx
There are now 3! OleDb providers for SQL Server. Two in MDAC: MSDASQL
(deprecated) and SQLOLEDB (current). Plus one in the SQL Native Client
(SQLNCLI). SQLNCLI is the best, but you must install it.
SQL Native Client also has a new ODBC driver.
David|||David,
I am able to connect to SQL Server 2005 using SQL Native Client but
I got en error 'Server unavailable or access denied ...' when trying to
connect using Microsoft OLE DB provider for SQL Server. I am trying to
connect by setting up properties of UDL file on the same box where SQL
Server is installed. Did I get it right that I have to install latest
drivers on client computers from the link your provided?
Thanks,
Igor
"David Browne" <davidbaxterbrowne no potted meat@.hotmail.com> wrote in
message news:O$2MO8jCGHA.2664@.TK2MSFTNGP15.phx.gbl...
> "Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
> news:%2326c1IiCGHA.3984@.TK2MSFTNGP14.phx.gbl...
> This is not quite right. MDAC is part of the operating system, but SQL
> Native Client is not.
>
> The SQL Native Client is a seperate install. It is included in the SQL
> Server distribution and available here:
> http://msdn.microsoft.com/data/sqlnative/default.aspx
> There are now 3! OleDb providers for SQL Server. Two in MDAC: MSDASQL
> (deprecated) and SQLOLEDB (current). Plus one in the SQL Native Client
> (SQLNCLI). SQLNCLI is the best, but you must install it.
> SQL Native Client also has a new ODBC driver.
> David
>|||David,
I wa able to connect by enabling remote connections using Surface Area.
Thanks,
Igor
"imarchenko" <igormarchenko@.hotmail.com> wrote in message
news:%23t2FLdxCGHA.724@.TK2MSFTNGP10.phx.gbl...
> David,
> I am able to connect to SQL Server 2005 using SQL Native Client but
> I got en error 'Server unavailable or access denied ...' when trying to
> connect using Microsoft OLE DB provider for SQL Server. I am trying to
> connect by setting up properties of UDL file on the same box where SQL
> Server is installed. Did I get it right that I have to install latest
> drivers on client computers from the link your provided?
> Thanks,
> Igor
>
> "David Browne" <davidbaxterbrowne no potted meat@.hotmail.com> wrote in
> message news:O$2MO8jCGHA.2664@.TK2MSFTNGP15.phx.gbl...
>

Connecting to SQL Server 2005

Hi all,
I have Windows XP SP2 and SQL Server 2005 CTP installed on my machine.
I am trying to connect to the database in a ASP.net application but no matter how much i try i get the following error message : System.Data.SqlClient.SQLException:SQL Server does not exist or Access denied

I have tried to fix the problmm by checking in all the online blogs and trying out whatever is being suggested , still no luck!!!Sad

Would appreciate if anybody could help me

Thanks.
sshettyThe folks on the SQL Server Data Access forum (http://forums.microsoft.com/msdn/ShowForum.aspx?ForumID=87) should be able to help you out with this one.

Raman Iyer
SQL Server Data Mining

Connecting to sql server 2005

I want to connect to database using sql server 2005 through Visual web developer 2005 express edition . what will be the connection string for this....

keywords under * * are for your own variable.

connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ *datafile name *.mdf;Integrated Security=True;User Instance=True"

if it is a database in a local drive

and if you are using a web server ,

connectionString="data source=*ip address * ;user id=userid;password=pass"

|||

The following link might help you..

http://www.connectionstrings.com/?carrier=sqlserver2005

|||

sagar Khatri wrote:

keywords under * * are for your own variable.

connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ *datafile name *.mdf;Integrated Security=True;User Instance=True"

if it is a database in a local drive

In fact that is not the right explanation. The above mentioned syntax is used when you use the SQL Server 2005 Express feature of user instances. The above mentioned sample assumes that yxou have a local SQL Server Express instance (configured with the instance name of SQLEXPRESS). User instances are used to temporary attach datafile to SQL Server instances.

sagar Khatri wrote:

and if you are using a web server ,

connectionString="data source=*ip address * ;user id=userid;password=pass"

This has nothing to do with a web server. The above mentioned syntax is used when you have a SQL Server attached database. No matter which middle tier (either an application you wrote or a web server is connecting to the database server)=, you are able to have multiple conenctions from multiple applications to this database, other then the user instance where only one application can create a user instance and have access to the database at a time.

Jens K. Suessmeyer

http://www.sqlserver2005.de

sqlsql

Connecting to SQL Server 2005

I installed the SQL Server 2005 Trial and am now having trouble connecting. When I bring up the ASP.NET Configuration tool and Go to "Provider configuration" "Select a single provider for all site management data" AspNetSqlProvider Test I get the following message.

"Could not establish a connection to the database.
If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider. "

I have already run the aspnet_regsql command-line utility.

Can anybody give me some information on how to set this up.

I am currently working with the club web site starter kit.

I first recommend you go grab this awesome management tool for the express edts :

http://www.microsoft.com/downloads/details.aspx?familyid=82afbd59-57a4-455e-a2d6-1d4c98d40f6e&displaylang=en

I would then first check to see if your connections to the DB work with this tool and copy the connection strings it gives you and use them in your app. Also, you can configure ASPNETDB from the web.config level and dont have to use the web tool. This way you can test directoly to ASPNETDB. I havent used the club starter kit but im sure it either uses app_data or aspnetdb in the db. All you have to do is point to the right one. I wrote a couple blogs on this :

http://eramseur.blogspot.com/2005/12/aspnet-20-create-custom-provider-for_10.html

I would also check out scotts entry :
http://weblogs.asp.net/scottgu/archive/2006/02/24/438953.aspx

He has another article about how to get membershp up in 15 minutes and you should look at that too.

Connecting to SQL Server 2005

Hello!
I was wondering if I need to install something on the client in order to
establish ODBC/OLEDB connection to SQL Server 2005. Currently, I have ADO
2.6 installed. Are there any changes in ODBC/OLEDB drivers for SQL Server
2005?
Thanks,
Igor
Hi
It is best to use MDAC 2.8, but 2.6 will connect to SQL Server 2005, but you
will not be able to use the new datatypes that SQL Server 2005 has
introduced.
The ODBC/OLEDB drivers no longer ship with SQL Server, as it is now a
function of the Operating System to update them.
The new way to connect to SQL Server 2005 is SQL Native Client (SQLNCLI)
"Provider=SQLNCLI"
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"imarchenko" <igormarchenko@.hotmail.com> wrote in message
news:ulvm%23pcCGHA.2300@.TK2MSFTNGP15.phx.gbl...
> Hello!
> I was wondering if I need to install something on the client in order
> to establish ODBC/OLEDB connection to SQL Server 2005. Currently, I have
> ADO 2.6 installed. Are there any changes in ODBC/OLEDB drivers for SQL
> Server 2005?
> Thanks,
> Igor
>
|||"Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
news:%2326c1IiCGHA.3984@.TK2MSFTNGP14.phx.gbl...
> Hi
> It is best to use MDAC 2.8, but 2.6 will connect to SQL Server 2005, but
> you will not be able to use the new datatypes that SQL Server 2005 has
> introduced.
> The ODBC/OLEDB drivers no longer ship with SQL Server, as it is now a
> function of the Operating System to update them.
> The new way to connect to SQL Server 2005 is SQL Native Client (SQLNCLI)
> "Provider=SQLNCLI"
>
This is not quite right. MDAC is part of the operating system, but SQL
Native Client is not.
The SQL Native Client is a seperate install. It is included in the SQL
Server distribution and available here:
http://msdn.microsoft.com/data/sqlnative/default.aspx
There are now 3! OleDb providers for SQL Server. Two in MDAC: MSDASQL
(deprecated) and SQLOLEDB (current). Plus one in the SQL Native Client
(SQLNCLI). SQLNCLI is the best, but you must install it.
SQL Native Client also has a new ODBC driver.
David
|||David,
I am able to connect to SQL Server 2005 using SQL Native Client but
I got en error 'Server unavailable or access denied ...' when trying to
connect using Microsoft OLE DB provider for SQL Server. I am trying to
connect by setting up properties of UDL file on the same box where SQL
Server is installed. Did I get it right that I have to install latest
drivers on client computers from the link your provided?
Thanks,
Igor
"David Browne" <davidbaxterbrowne no potted meat@.hotmail.com> wrote in
message news:O$2MO8jCGHA.2664@.TK2MSFTNGP15.phx.gbl...
> "Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
> news:%2326c1IiCGHA.3984@.TK2MSFTNGP14.phx.gbl...
> This is not quite right. MDAC is part of the operating system, but SQL
> Native Client is not.
>
> The SQL Native Client is a seperate install. It is included in the SQL
> Server distribution and available here:
> http://msdn.microsoft.com/data/sqlnative/default.aspx
> There are now 3! OleDb providers for SQL Server. Two in MDAC: MSDASQL
> (deprecated) and SQLOLEDB (current). Plus one in the SQL Native Client
> (SQLNCLI). SQLNCLI is the best, but you must install it.
> SQL Native Client also has a new ODBC driver.
> David
>
|||David,
I wa able to connect by enabling remote connections using Surface Area.
Thanks,
Igor
"imarchenko" <igormarchenko@.hotmail.com> wrote in message
news:%23t2FLdxCGHA.724@.TK2MSFTNGP10.phx.gbl...
> David,
> I am able to connect to SQL Server 2005 using SQL Native Client but
> I got en error 'Server unavailable or access denied ...' when trying to
> connect using Microsoft OLE DB provider for SQL Server. I am trying to
> connect by setting up properties of UDL file on the same box where SQL
> Server is installed. Did I get it right that I have to install latest
> drivers on client computers from the link your provided?
> Thanks,
> Igor
>
> "David Browne" <davidbaxterbrowne no potted meat@.hotmail.com> wrote in
> message news:O$2MO8jCGHA.2664@.TK2MSFTNGP15.phx.gbl...
>

Connecting to SQL Server 2005

Hi,
I am having ongoing problems connecting to the server. I thought I had it
solved thanks to help from a prev post:
C:\>sqlcmd -S dimension9150\SQLExpress
HResult 0xFFFFFFFF, Level 16, State 1
SQL Network Interfaces: Error Locating Server/Instance Specified
[xFFFFFFFF].
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.
C:\>sqlcmd -S dimension9150\SQLExpress,1433
1> exit
C:\>
Now at least i can connect to the server using the sqlcmd utility however I
am unable to get a connection string to connect.
cmdCommand.ActiveConnection =
"Server=dimension9150;Database=IPS;Trusted_Connect ion=True"
This simply returns an error number -2147467259
As with the sqlcmd utility do I need to specify port 1433 in my connection
sting ?
I am not running the SQL Browser service as I understand it is better not to
for security reasons and understand this makes connecting harder ?
I am running a firewall program on the server "Norton Internet Security"
however as it was not stopping sqlcmd from working I had assumed it would
not be a problem for my connection string either.
Any help would be greatly appreciated.
Thanks in advance...
If you don't use the SQL Browser service, you would need to specify the port
in your case.
Linchi
"McHenry" wrote:

> Hi,
> I am having ongoing problems connecting to the server. I thought I had it
> solved thanks to help from a prev post:
> C:\>sqlcmd -S dimension9150\SQLExpress
> HResult 0xFFFFFFFF, Level 16, State 1
> SQL Network Interfaces: Error Locating Server/Instance Specified
> [xFFFFFFFF].
> 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.
> C:\>sqlcmd -S dimension9150\SQLExpress,1433
> 1> exit
> C:\>
>
> Now at least i can connect to the server using the sqlcmd utility however I
> am unable to get a connection string to connect.
> cmdCommand.ActiveConnection =
> "Server=dimension9150;Database=IPS;Trusted_Connect ion=True"
> This simply returns an error number -2147467259
> As with the sqlcmd utility do I need to specify port 1433 in my connection
> sting ?
> I am not running the SQL Browser service as I understand it is better not to
> for security reasons and understand this makes connecting harder ?
> I am running a firewall program on the server "Norton Internet Security"
> however as it was not stopping sqlcmd from working I had assumed it would
> not be a problem for my connection string either.
> Any help would be greatly appreciated.
>
> Thanks in advance...
>
>

Connecting to SQL Server 2005

Hello!
I was wondering if I need to install something on the client in order to
establish ODBC/OLEDB connection to SQL Server 2005. Currently, I have ADO
2.6 installed. Are there any changes in ODBC/OLEDB drivers for SQL Server
2005?
Thanks,
IgorHi
It is best to use MDAC 2.8, but 2.6 will connect to SQL Server 2005, but you
will not be able to use the new datatypes that SQL Server 2005 has
introduced.
The ODBC/OLEDB drivers no longer ship with SQL Server, as it is now a
function of the Operating System to update them.
The new way to connect to SQL Server 2005 is SQL Native Client (SQLNCLI)
"Provider=SQLNCLI"
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"imarchenko" <igormarchenko@.hotmail.com> wrote in message
news:ulvm%23pcCGHA.2300@.TK2MSFTNGP15.phx.gbl...
> Hello!
> I was wondering if I need to install something on the client in order
> to establish ODBC/OLEDB connection to SQL Server 2005. Currently, I have
> ADO 2.6 installed. Are there any changes in ODBC/OLEDB drivers for SQL
> Server 2005?
> Thanks,
> Igor
>|||"Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
news:%2326c1IiCGHA.3984@.TK2MSFTNGP14.phx.gbl...
> Hi
> It is best to use MDAC 2.8, but 2.6 will connect to SQL Server 2005, but
> you will not be able to use the new datatypes that SQL Server 2005 has
> introduced.
> The ODBC/OLEDB drivers no longer ship with SQL Server, as it is now a
> function of the Operating System to update them.
> The new way to connect to SQL Server 2005 is SQL Native Client (SQLNCLI)
> "Provider=SQLNCLI"
>
This is not quite right. MDAC is part of the operating system, but SQL
Native Client is not.
The SQL Native Client is a seperate install. It is included in the SQL
Server distribution and available here:
http://msdn.microsoft.com/data/sqlnative/default.aspx
There are now 3! OleDb providers for SQL Server. Two in MDAC: MSDASQL
(deprecated) and SQLOLEDB (current). Plus one in the SQL Native Client
(SQLNCLI). SQLNCLI is the best, but you must install it.
SQL Native Client also has a new ODBC driver.
David|||David,
I am able to connect to SQL Server 2005 using SQL Native Client but
I got en error 'Server unavailable or access denied ...' when trying to
connect using Microsoft OLE DB provider for SQL Server. I am trying to
connect by setting up properties of UDL file on the same box where SQL
Server is installed. Did I get it right that I have to install latest
drivers on client computers from the link your provided?
Thanks,
Igor
"David Browne" <davidbaxterbrowne no potted meat@.hotmail.com> wrote in
message news:O$2MO8jCGHA.2664@.TK2MSFTNGP15.phx.gbl...
> "Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
> news:%2326c1IiCGHA.3984@.TK2MSFTNGP14.phx.gbl...
>> Hi
>> It is best to use MDAC 2.8, but 2.6 will connect to SQL Server 2005, but
>> you will not be able to use the new datatypes that SQL Server 2005 has
>> introduced.
>> The ODBC/OLEDB drivers no longer ship with SQL Server, as it is now a
>> function of the Operating System to update them.
>> The new way to connect to SQL Server 2005 is SQL Native Client (SQLNCLI)
>> "Provider=SQLNCLI"
> This is not quite right. MDAC is part of the operating system, but SQL
> Native Client is not.
>
> The SQL Native Client is a seperate install. It is included in the SQL
> Server distribution and available here:
> http://msdn.microsoft.com/data/sqlnative/default.aspx
> There are now 3! OleDb providers for SQL Server. Two in MDAC: MSDASQL
> (deprecated) and SQLOLEDB (current). Plus one in the SQL Native Client
> (SQLNCLI). SQLNCLI is the best, but you must install it.
> SQL Native Client also has a new ODBC driver.
> David
>|||David,
I wa able to connect by enabling remote connections using Surface Area.
Thanks,
Igor
"imarchenko" <igormarchenko@.hotmail.com> wrote in message
news:%23t2FLdxCGHA.724@.TK2MSFTNGP10.phx.gbl...
> David,
> I am able to connect to SQL Server 2005 using SQL Native Client but
> I got en error 'Server unavailable or access denied ...' when trying to
> connect using Microsoft OLE DB provider for SQL Server. I am trying to
> connect by setting up properties of UDL file on the same box where SQL
> Server is installed. Did I get it right that I have to install latest
> drivers on client computers from the link your provided?
> Thanks,
> Igor
>
> "David Browne" <davidbaxterbrowne no potted meat@.hotmail.com> wrote in
> message news:O$2MO8jCGHA.2664@.TK2MSFTNGP15.phx.gbl...
>> "Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
>> news:%2326c1IiCGHA.3984@.TK2MSFTNGP14.phx.gbl...
>> Hi
>> It is best to use MDAC 2.8, but 2.6 will connect to SQL Server 2005, but
>> you will not be able to use the new datatypes that SQL Server 2005 has
>> introduced.
>> The ODBC/OLEDB drivers no longer ship with SQL Server, as it is now a
>> function of the Operating System to update them.
>> The new way to connect to SQL Server 2005 is SQL Native Client (SQLNCLI)
>> "Provider=SQLNCLI"
>>
>> This is not quite right. MDAC is part of the operating system, but SQL
>> Native Client is not.
>>
>> The SQL Native Client is a seperate install. It is included in the SQL
>> Server distribution and available here:
>> http://msdn.microsoft.com/data/sqlnative/default.aspx
>> There are now 3! OleDb providers for SQL Server. Two in MDAC: MSDASQL
>> (deprecated) and SQLOLEDB (current). Plus one in the SQL Native Client
>> (SQLNCLI). SQLNCLI is the best, but you must install it.
>> SQL Native Client also has a new ODBC driver.
>> David
>

Connecting to SQL Server 2005

I have successfully installed SQL Server 2005 on a server that also has SQL
Server 2000. Using SQL Server 2005 interface, how could I connect to a
named instance of a SQL Server 2005 database? As I try, it keeps connecting
me to the SQL Server 2000 db. Is this something you set up in CLient tools?
Please let me know, I connect to the SQL Server using a temp dns name.
Thanks,
Here is what I what to achieve:
category1
content2
content3
content4
content5
content6Please disregard this text. Came from an old message.
"Here is what I what to achieve:
category1
content2
content3
content4
content5
content6"
<programmingcodeATjards.com> wrote in message
news:e83mL7OrGHA.4864@.TK2MSFTNGP03.phx.gbl...
>I have successfully installed SQL Server 2005 on a server that also has SQL
>Server 2000. Using SQL Server 2005 interface, how could I connect to a
>named instance of a SQL Server 2005 database? As I try, it keeps
>connecting me to the SQL Server 2000 db. Is this something you set up in
>CLient tools? Please let me know, I connect to the SQL Server using a temp
>dns name.
> Thanks,
>
> Here is what I what to achieve:
> category1
> content2
> content3
> content4
> content5
> content6
>
>|||<programmingcodeATjards.com> wrote in message
news:e83mL7OrGHA.4864@.TK2MSFTNGP03.phx.gbl...
> I have successfully installed SQL Server 2005 on a server that also has
SQL
> Server 2000. Using SQL Server 2005 interface, how could I connect to a
> named instance of a SQL Server 2005 database? As I try, it keeps
connecting
> me to the SQL Server 2000 db. Is this something you set up in CLient
tools?
> Please let me know, I connect to the SQL Server using a temp dns name.
> Thanks,
>
Not sure what you're trying, but generally it's servername\instancename. If
not instance name is provided it deafults to the default instance.
>
> Here is what I what to achieve:
> category1
> content2
> content3
> content4
> content5
> content6
>
>sqlsql

Connecting to SQL Server 2005

Hi,
I am having ongoing problems connecting to the server. I thought I had it
solved thanks to help from a prev post:
C:\>sqlcmd -S dimension9150\SQLExpress
HResult 0xFFFFFFFF, Level 16, State 1
SQL Network Interfaces: Error Locating Server/Instance Specified
[xFFFFFFFF].
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.
C:\>sqlcmd -S dimension9150\SQLExpress,1433
1> exit
C:\>
Now at least i can connect to the server using the sqlcmd utility however I
am unable to get a connection string to connect.
cmdCommand.ActiveConnection =
" Server=dimension9150;Database=IPS;Truste
d_Connection=True"
This simply returns an error number -2147467259
As with the sqlcmd utility do I need to specify port 1433 in my connection
sting ?
I am not running the SQL Browser service as I understand it is better not to
for security reasons and understand this makes connecting harder ?
I am running a firewall program on the server "Norton Internet Security"
however as it was not stopping sqlcmd from working I had assumed it would
not be a problem for my connection string either.
Any help would be greatly appreciated.
Thanks in advance...If you don't use the SQL Browser service, you would need to specify the port
in your case.
Linchi
"McHenry" wrote:

> Hi,
> I am having ongoing problems connecting to the server. I thought I had it
> solved thanks to help from a prev post:
> C:\>sqlcmd -S dimension9150\SQLExpress
> HResult 0xFFFFFFFF, Level 16, State 1
> SQL Network Interfaces: Error Locating Server/Instance Specified
> [xFFFFFFFF].
> 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 do
es
> not
> allow remote connections..
> Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.
> C:\>sqlcmd -S dimension9150\SQLExpress,1433
> 1> exit
> C:\>
>
> Now at least i can connect to the server using the sqlcmd utility however
I
> am unable to get a connection string to connect.
> cmdCommand.ActiveConnection =
> " Server=dimension9150;Database=IPS;Truste
d_Connection=True"
> This simply returns an error number -2147467259
> As with the sqlcmd utility do I need to specify port 1433 in my connection
> sting ?
> I am not running the SQL Browser service as I understand it is better not
to
> for security reasons and understand this makes connecting harder ?
> I am running a firewall program on the server "Norton Internet Security"
> however as it was not stopping sqlcmd from working I had assumed it would
> not be a problem for my connection string either.
> Any help would be greatly appreciated.
>
> Thanks in advance...
>
>|||I have exactly the same problem.
I had SQL SERVER 2005 running but I cleaned all out for a reinstall
and now I get exactly the error you get.
c:\sqlcmd -S dimension9150\SQLExpress,1433 gets the same error
I have set shared memory, pipes, tcp/ip, set ports to no avail
"McHenry" wrote:

> Hi,
> I am having ongoing problems connecting to the server. I thought I had it
> solved thanks to help from a prev post:
> C:\>sqlcmd -S dimension9150\SQLExpress
> HResult 0xFFFFFFFF, Level 16, State 1
> SQL Network Interfaces: Error Locating Server/Instance Specified
> [xFFFFFFFF].
> 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 do
es
> not
> allow remote connections..
> Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.
> C:\>sqlcmd -S dimension9150\SQLExpress,1433
> 1> exit
> C:\>
>
> Now at least i can connect to the server using the sqlcmd utility however
I
> am unable to get a connection string to connect.
> cmdCommand.ActiveConnection =
> " Server=dimension9150;Database=IPS;Truste
d_Connection=True"
> This simply returns an error number -2147467259
> As with the sqlcmd utility do I need to specify port 1433 in my connection
> sting ?
> I am not running the SQL Browser service as I understand it is better not
to
> for security reasons and understand this makes connecting harder ?
> I am running a firewall program on the server "Norton Internet Security"
> however as it was not stopping sqlcmd from working I had assumed it would
> not be a problem for my connection string either.
> Any help would be greatly appreciated.
>
> Thanks in advance...
>
>

Connecting to SQL Server 2000 via VB6 program on Vista

I am having difficulty connecting to SQL Server 2000 on one of our
servers via a VB6 program on Vista. I can connect fine to a different
server, but it gives me the following error with the server in
question:
"Unable to connect to database. Please check your internet connection
Error# -2147467259
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
access denied"
Using the program, I am able to access the database just fine while
running on Windows XP, but when I run the program on Vista, it gives
me that error message for that server. If I change the connection
string to a different server address, it works fine on Vista. What
differences in the servers might cause this?
Here is my connection string:
"driver={SQL Server};Server=ipaddress;Uid=userID;Pwd=pwd;databa se=db"
Is the firewall open for port 1433?
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant, Dad, Grandpa
Microsoft MVP
INETA Speaker
www.betav.com
www.betav.com/blog/billva
www.hitchhikerguides.net
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
------
"TerpZebra" <terpzebra@.gmail.com> wrote in message
news:1184775545.291016.192510@.i38g2000prf.googlegr oups.com...
>I am having difficulty connecting to SQL Server 2000 on one of our
> servers via a VB6 program on Vista. I can connect fine to a different
> server, but it gives me the following error with the server in
> question:
> "Unable to connect to database. Please check your internet connection
> Error# -2147467259
> [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
> access denied"
> Using the program, I am able to access the database just fine while
> running on Windows XP, but when I run the program on Vista, it gives
> me that error message for that server. If I change the connection
> string to a different server address, it works fine on Vista. What
> differences in the servers might cause this?
> Here is my connection string:
> "driver={SQL Server};Server=ipaddress;Uid=userID;Pwd=pwd;databa se=db"
>
|||TerpZebra (terpzebra@.gmail.com) writes:
> I am having difficulty connecting to SQL Server 2000 on one of our
> servers via a VB6 program on Vista. I can connect fine to a different
> server, but it gives me the following error with the server in
> question:
> "Unable to connect to database. Please check your internet connection
> Error# -2147467259
> [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
> access denied"
> Using the program, I am able to access the database just fine while
> running on Windows XP, but when I run the program on Vista, it gives
> me that error message for that server. If I change the connection
> string to a different server address, it works fine on Vista. What
> differences in the servers might cause this?
> Here is my connection string:
> "driver={SQL Server};Server=ipaddress;Uid=userID;Pwd=pwd;databa se=db"
Difficult to say. Is SQL Server running on port 1433 on both servers?
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
|||The SQL Server Config tools will tell you what port(s) have been assigned.
SS 2000 broadcasts and handles the incoming requests and maps to the ports,
but if the firewall blocks them...
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant, Dad, Grandpa
Microsoft MVP
INETA Speaker
www.betav.com
www.betav.com/blog/billva
www.hitchhikerguides.net
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
------
"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns9971F1A126FADYazorman@.127.0.0.1...
> TerpZebra (terpzebra@.gmail.com) writes:
> Difficult to say. Is SQL Server running on port 1433 on both servers?
>
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
|||On Jul 18, 3:50 pm, "William Vaughn" <billvaNoS...@.betav.com> wrote:[vbcol=seagreen]
> Is the firewall open for port 1433?
> --
> ____________________________________
> William (Bill) Vaughn
> Author, Mentor, Consultant, Dad, Grandpa
> Microsoft MVP
> INETA Speakerwww.betav.comwww.betav.com/blog/billvawww.hitchhikerguides.netwww.betav.com/blog/billvawww.betav.com
> Please reply only to the newsgroup so that others can benefit.
> This posting is provided "AS IS" with no warranties, and confers no rights.
> __________________________________
> Visitwww.hitchhikerguides.netto get more information on my latest book:
> Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
> and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
> ------
> "TerpZebra" <terpze...@.gmail.com> wrote in message
> news:1184775545.291016.192510@.i38g2000prf.googlegr oups.com...
>
>
Yes, it is open for port 1433. I can connect to a separate Server
using the same connection string, except for the IP address, and it
works fine.
I can also connect to both Servers using the application on Windows XP
|||So, there is something different about this particular server--assuming you
can connect to other servers from the client.
Have you run the surface area config tool on the target server?
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant, Dad, Grandpa
Microsoft MVP
INETA Speaker
www.betav.com
www.betav.com/blog/billva
www.hitchhikerguides.net
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
------
"TerpZebra" <terpzebra@.gmail.com> wrote in message
news:1184866009.025953.319470@.q75g2000hsh.googlegr oups.com...
> On Jul 18, 3:50 pm, "William Vaughn" <billvaNoS...@.betav.com> wrote:
> Yes, it is open for port 1433. I can connect to a separate Server
> using the same connection string, except for the IP address, and it
> works fine.
> I can also connect to both Servers using the application on Windows XP
>
|||William Vaughn (billvaNoSPAM@.betav.com) writes:
> So, there is something different about this particular server--assuming
> you can connect to other servers from the client. Have you run the
> surface area config tool on the target server?
As that server is running SQL 2000, there is not likely to be a surface-
area config tool.
But, yes, something appears to be special with that server.
TerpZebra, could you post the first 50 lines or so of the error log
for that server instance?
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
|||The SQL Server configuation tools will have to do. Make sure the defaults
are over-ridden to make the server visible. Since SP3a SQL Server 2000 is
configured to be invisible to the net. The TCP/IP protocol is disabled. See
http://www.databasejournal.com/features/mssql/article.php/3334851. He
discusses the SQL Server Network Utility that's used to make these
configuration changes.
hth
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant, Dad, Grandpa
Microsoft MVP
INETA Speaker
www.betav.com
www.betav.com/blog/billva
www.hitchhikerguides.net
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
------
"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns9972E8971EADFYazorman@.127.0.0.1...
> William Vaughn (billvaNoSPAM@.betav.com) writes:
> As that server is running SQL 2000, there is not likely to be a surface-
> area config tool.
> But, yes, something appears to be special with that server.
> TerpZebra, could you post the first 50 lines or so of the error log
> for that server instance?
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

Connecting to SQL Server 2000 via VB6 program on Vista

I am having difficulty connecting to SQL Server 2000 on one of our
servers via a VB6 program on Vista. I can connect fine to a different
server, but it gives me the following error with the server in
question:
"Unable to connect to database. Please check your internet connection
Error# -2147467259
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
access denied"
Using the program, I am able to access the database just fine while
running on Windows XP, but when I run the program on Vista, it gives
me that error message for that server. If I change the connection
string to a different server address, it works fine on Vista. What
differences in the servers might cause this?
Here is my connection string:
"driver={SQL Server};Server=ipaddress;Uid=userID;Pwd=
pwd;database=db"Is the firewall open for port 1433?
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant, Dad, Grandpa
Microsoft MVP
INETA Speaker
www.betav.com
www.betav.com/blog/billva
www.hitchhikerguides.net
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
----
---
"TerpZebra" <terpzebra@.gmail.com> wrote in message
news:1184775545.291016.192510@.i38g2000prf.googlegroups.com...
>I am having difficulty connecting to SQL Server 2000 on one of our
> servers via a VB6 program on Vista. I can connect fine to a different
> server, but it gives me the following error with the server in
> question:
> "Unable to connect to database. Please check your internet connection
> Error# -2147467259
> [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist o
r
> access denied"
> Using the program, I am able to access the database just fine while
> running on Windows XP, but when I run the program on Vista, it gives
> me that error message for that server. If I change the connection
> string to a different server address, it works fine on Vista. What
> differences in the servers might cause this?
> Here is my connection string:
> "driver={SQL Server};Server=ipaddress;Uid=userID;Pwd=
pwd;database=db"
>|||TerpZebra (terpzebra@.gmail.com) writes:
> I am having difficulty connecting to SQL Server 2000 on one of our
> servers via a VB6 program on Vista. I can connect fine to a different
> server, but it gives me the following error with the server in
> question:
> "Unable to connect to database. Please check your internet connection
> Error# -2147467259
> [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist o
r
> access denied"
> Using the program, I am able to access the database just fine while
> running on Windows XP, but when I run the program on Vista, it gives
> me that error message for that server. If I change the connection
> string to a different server address, it works fine on Vista. What
> differences in the servers might cause this?
> Here is my connection string:
> "driver={SQL Server};Server=ipaddress;Uid=userID;Pwd=
pwd;database=db"
Difficult to say. Is SQL Server running on port 1433 on both servers?
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|||The SQL Server Config tools will tell you what port(s) have been assigned.
SS 2000 broadcasts and handles the incoming requests and maps to the ports,
but if the firewall blocks them...
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant, Dad, Grandpa
Microsoft MVP
INETA Speaker
www.betav.com
www.betav.com/blog/billva
www.hitchhikerguides.net
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
----
---
"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns9971F1A126FADYazorman@.127.0.0.1...
> TerpZebra (terpzebra@.gmail.com) writes:
> Difficult to say. Is SQL Server running on port 1433 on both servers?
>
>
> --
> 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|||On Jul 18, 3:50 pm, "William Vaughn" <billvaNoS...@.betav.com> wrote:[vbcol=seagreen]
> Is the firewall open for port 1433?
> --
> ____________________________________
> William (Bill) Vaughn
> Author, Mentor, Consultant, Dad, Grandpa
> Microsoft MVP
> INETA Speakerwww.betav.comwww.betav.com/blog/billvawww.hitchhikerguides.ne
twww.betav.com/blog/billvawww.betav.com
> Please reply only to the newsgroup so that others can benefit.
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> __________________________________
> Visitwww.hitchhikerguides.netto get more information on my latest book:
> Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
> and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
> ----
---
> "TerpZebra" <terpze...@.gmail.com> wrote in message
> news:1184775545.291016.192510@.i38g2000prf.googlegroups.com...
>
>
>
>
Yes, it is open for port 1433. I can connect to a separate Server
using the same connection string, except for the IP address, and it
works fine.
I can also connect to both Servers using the application on Windows XP|||So, there is something different about this particular server--assuming you
can connect to other servers from the client.
Have you run the surface area config tool on the target server?
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant, Dad, Grandpa
Microsoft MVP
INETA Speaker
www.betav.com
www.betav.com/blog/billva
www.hitchhikerguides.net
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
----
---
"TerpZebra" <terpzebra@.gmail.com> wrote in message
news:1184866009.025953.319470@.q75g2000hsh.googlegroups.com...
> On Jul 18, 3:50 pm, "William Vaughn" <billvaNoS...@.betav.com> wrote:
> Yes, it is open for port 1433. I can connect to a separate Server
> using the same connection string, except for the IP address, and it
> works fine.
> I can also connect to both Servers using the application on Windows XP
>|||William Vaughn (billvaNoSPAM@.betav.com) writes:
> So, there is something different about this particular server--assuming
> you can connect to other servers from the client. Have you run the
> surface area config tool on the target server?
As that server is running SQL 2000, there is not likely to be a surface-
area config tool.
But, yes, something appears to be special with that server.
TerpZebra, could you post the first 50 lines or so of the error log
for that server instance?
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|||The SQL Server configuation tools will have to do. Make sure the defaults
are over-ridden to make the server visible. Since SP3a SQL Server 2000 is
configured to be invisible to the net. The TCP/IP protocol is disabled. See
http://www.databasejournal.com/feat...le.php/3334851. He
discusses the SQL Server Network Utility that's used to make these
configuration changes.
hth
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant, Dad, Grandpa
Microsoft MVP
INETA Speaker
www.betav.com
www.betav.com/blog/billva
www.hitchhikerguides.net
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
----
---
"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns9972E8971EADFYazorman@.127.0.0.1...
> William Vaughn (billvaNoSPAM@.betav.com) writes:
> As that server is running SQL 2000, there is not likely to be a surface-
> area config tool.
> But, yes, something appears to be special with that server.
> TerpZebra, could you post the first 50 lines or so of the error log
> for that server instance?
>
> --
> 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

Connecting to SQL Server 2000 via VB6 program on Vista

I am having difficulty connecting to SQL Server 2000 on one of our
servers via a VB6 program on Vista. I can connect fine to a different
server, but it gives me the following error with the server in
question:

"Unable to connect to database. Please check your internet connection
Error# -2147467259
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
access denied"

Using the program, I am able to access the database just fine while
running on Windows XP, but when I run the program on Vista, it gives
me that error message for that server. If I change the connection
string to a different server address, it works fine on Vista. What
differences in the servers might cause this?

Here is my connection string:
"driver={SQL Server};Server=ipaddress;Uid=userID;Pwd=pwd;databa se=db"Is the firewall open for port 1433?

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant, Dad, Grandpa
Microsoft MVP
INETA Speaker
www.betav.com
www.betav.com/blog/billva
www.hitchhikerguides.net
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
------------------------------------

"TerpZebra" <terpzebra@.gmail.comwrote in message
news:1184775545.291016.192510@.i38g2000prf.googlegr oups.com...

Quote:

Originally Posted by

>I am having difficulty connecting to SQL Server 2000 on one of our
servers via a VB6 program on Vista. I can connect fine to a different
server, but it gives me the following error with the server in
question:
>
"Unable to connect to database. Please check your internet connection
Error# -2147467259
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
access denied"
>
Using the program, I am able to access the database just fine while
running on Windows XP, but when I run the program on Vista, it gives
me that error message for that server. If I change the connection
string to a different server address, it works fine on Vista. What
differences in the servers might cause this?
>
Here is my connection string:
"driver={SQL Server};Server=ipaddress;Uid=userID;Pwd=pwd;databa se=db"
>

|||TerpZebra (terpzebra@.gmail.com) writes:

Quote:

Originally Posted by

I am having difficulty connecting to SQL Server 2000 on one of our
servers via a VB6 program on Vista. I can connect fine to a different
server, but it gives me the following error with the server in
question:
>
"Unable to connect to database. Please check your internet connection
Error# -2147467259
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
access denied"
>
Using the program, I am able to access the database just fine while
running on Windows XP, but when I run the program on Vista, it gives
me that error message for that server. If I change the connection
string to a different server address, it works fine on Vista. What
differences in the servers might cause this?
>
Here is my connection string:
"driver={SQL Server};Server=ipaddress;Uid=userID;Pwd=pwd;databa se=db"


Difficult to say. Is SQL Server running on port 1433 on both servers?

--
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|||The SQL Server Config tools will tell you what port(s) have been assigned.
SS 2000 broadcasts and handles the incoming requests and maps to the ports,
but if the firewall blocks them...

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant, Dad, Grandpa
Microsoft MVP
INETA Speaker
www.betav.com
www.betav.com/blog/billva
www.hitchhikerguides.net
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
------------------------------------

"Erland Sommarskog" <esquel@.sommarskog.sewrote in message
news:Xns9971F1A126FADYazorman@.127.0.0.1...

Quote:

Originally Posted by

TerpZebra (terpzebra@.gmail.com) writes:

Quote:

Originally Posted by

>I am having difficulty connecting to SQL Server 2000 on one of our
>servers via a VB6 program on Vista. I can connect fine to a different
>server, but it gives me the following error with the server in
>question:
>>
>"Unable to connect to database. Please check your internet connection
> Error# -2147467259
>[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
>access denied"
>>
>Using the program, I am able to access the database just fine while
>running on Windows XP, but when I run the program on Vista, it gives
>me that error message for that server. If I change the connection
>string to a different server address, it works fine on Vista. What
>differences in the servers might cause this?
>>
>Here is my connection string:
>"driver={SQL Server};Server=ipaddress;Uid=userID;Pwd=pwd;databa se=db"


>
Difficult to say. Is SQL Server running on port 1433 on both servers?
>
>
>
>
--
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

|||On Jul 18, 3:50 pm, "William Vaughn" <billvaNoS...@.betav.comwrote:

Quote:

Originally Posted by

Is the firewall open for port 1433?
>
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant, Dad, Grandpa
Microsoft MVP
INETA Speakerwww.betav.comwww.betav.com/blog/billvawww.hitchhikerguides.netwww.betav.com/blog/billvawww.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visitwww.hitchhikerguides.netto get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
------------------------------------
>
"TerpZebra" <terpze...@.gmail.comwrote in message
>
news:1184775545.291016.192510@.i38g2000prf.googlegr oups.com...
>

Quote:

Originally Posted by

I am having difficulty connecting to SQL Server 2000 on one of our
servers via a VB6 program on Vista. I can connect fine to a different
server, but it gives me the following error with the server in
question:


>

Quote:

Originally Posted by

"Unable to connect to database. Please check your internet connection
Error# -2147467259
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
access denied"


>

Quote:

Originally Posted by

Using the program, I am able to access the database just fine while
running on Windows XP, but when I run the program on Vista, it gives
me that error message for that server. If I change the connection
string to a different server address, it works fine on Vista. What
differences in the servers might cause this?


>

Quote:

Originally Posted by

Here is my connection string:
"driver={SQL Server};Server=ipaddress;Uid=userID;Pwd=pwd;databa se=db"


Yes, it is open for port 1433. I can connect to a separate Server
using the same connection string, except for the IP address, and it
works fine.

I can also connect to both Servers using the application on Windows XP|||So, there is something different about this particular server--assuming you
can connect to other servers from the client.
Have you run the surface area config tool on the target server?

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant, Dad, Grandpa
Microsoft MVP
INETA Speaker
www.betav.com
www.betav.com/blog/billva
www.hitchhikerguides.net
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
------------------------------------

"TerpZebra" <terpzebra@.gmail.comwrote in message
news:1184866009.025953.319470@.q75g2000hsh.googlegr oups.com...

Quote:

Originally Posted by

On Jul 18, 3:50 pm, "William Vaughn" <billvaNoS...@.betav.comwrote:

Quote:

Originally Posted by

>Is the firewall open for port 1433?
>>
>--
>____________________________________
>William (Bill) Vaughn
>Author, Mentor, Consultant, Dad, Grandpa
>Microsoft MVP
>INETA
>Speakerwww.betav.comwww.betav.com/blog/billvawww.hitchhikerguides.netwww.betav.com/blog/billvawww.betav.com
>Please reply only to the newsgroup so that others can benefit.
>This posting is provided "AS IS" with no warranties, and confers no
>rights.
>__________________________________
>Visitwww.hitchhikerguides.netto get more information on my latest book:
>Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
>and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
>------------------------------------
>>
>"TerpZebra" <terpze...@.gmail.comwrote in message
>>
>news:1184775545.291016.192510@.i38g2000prf.googlegr oups.com...
>>

Quote:

Originally Posted by

>I am having difficulty connecting to SQL Server 2000 on one of our
servers via a VB6 program on Vista. I can connect fine to a different
server, but it gives me the following error with the server in
question:


>>

Quote:

Originally Posted by

"Unable to connect to database. Please check your internet connection
Error# -2147467259
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
access denied"


>>

Quote:

Originally Posted by

Using the program, I am able to access the database just fine while
running on Windows XP, but when I run the program on Vista, it gives
me that error message for that server. If I change the connection
string to a different server address, it works fine on Vista. What
differences in the servers might cause this?


>>

Quote:

Originally Posted by

Here is my connection string:
"driver={SQL Server};Server=ipaddress;Uid=userID;Pwd=pwd;databa se=db"


>
Yes, it is open for port 1433. I can connect to a separate Server
using the same connection string, except for the IP address, and it
works fine.
>
I can also connect to both Servers using the application on Windows XP
>

|||William Vaughn (billvaNoSPAM@.betav.com) writes:

Quote:

Originally Posted by

So, there is something different about this particular server--assuming
you can connect to other servers from the client. Have you run the
surface area config tool on the target server?


As that server is running SQL 2000, there is not likely to be a surface-
area config tool.

But, yes, something appears to be special with that server.

TerpZebra, could you post the first 50 lines or so of the error log
for that server instance?

--
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|||The SQL Server configuation tools will have to do. Make sure the defaults
are over-ridden to make the server visible. Since SP3a SQL Server 2000 is
configured to be invisible to the net. The TCP/IP protocol is disabled. See
http://www.databasejournal.com/feat...cle.php/3334851. He
discusses the SQL Server Network Utility that's used to make these
configuration changes.

hth

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant, Dad, Grandpa
Microsoft MVP
INETA Speaker
www.betav.com
www.betav.com/blog/billva
www.hitchhikerguides.net
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
------------------------------------

"Erland Sommarskog" <esquel@.sommarskog.sewrote in message
news:Xns9972E8971EADFYazorman@.127.0.0.1...

Quote:

Originally Posted by

William Vaughn (billvaNoSPAM@.betav.com) writes:

Quote:

Originally Posted by

>So, there is something different about this particular server--assuming
>you can connect to other servers from the client. Have you run the
>surface area config tool on the target server?


>
As that server is running SQL 2000, there is not likely to be a surface-
area config tool.
>
But, yes, something appears to be special with that server.
>
TerpZebra, could you post the first 50 lines or so of the error log
for that server instance?
>
>
>
--
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

Connecting to SQL Server 2000 Via Internet

Hi guys,

I would like to know how to connect SQL Server-2000 via Internet. I have software developed by VB it is working under Intranet but I need to have it's database connected Via internet remotely.

Thanks

Quote:

Originally Posted by riyazrasheed1234

Hi guys,

I would like to know how to connect SQL Server-2000 via Internet. I have software developed by VB it is working under Intranet but I need to have it's database connected Via internet remotely.

Thanks


This should be the same process as before. Are you having an issue? What errors are you getting?|||

Quote:

Originally Posted by Motoma

This should be the same process as before. Are you having an issue? What errors are you getting?


Still I did not tried. I just trying to find code for the Connection!sqlsql

connecting to SQL Server 2000 using JDBC

I've download Microsoft SQL Server 2000 JDBC Driver. All these files are being installed and saved in a folder called sql. For example, the IP adress is 255.255.255.255 , I updated the code and saved it as test1.java in this manner:

import java.sql.*;
/**
* Microsoft SQL Server JDBC test program
*/
public class test1 {
public test1() throws Exception {
// Get connection
DriverManager.registerDriver(new
com.microsoft.jdbc.sqlserver.SQLServerDriver());
Connection connection = DriverManager.getConnection(
"jdbc:microsoft:sqlserver:@.255.255.255","abc","abc");
if (connection != null) {
System.out.println();
System.out.println("Successfully connected");
System.out.println();
// Meta data
DatabaseMetaData meta = connection.getMetaData();
System.out.println("\nDriver Information");
System.out.println("Driver Name: "
+ meta.getDriverName());
System.out.println("Driver Version: "
+ meta.getDriverVersion());
System.out.println("\nDatabase Information ");
System.out.println("Database Name: "
+ meta.getDatabaseProductName());
System.out.println("Database Version: "+
meta.getDatabaseProductVersion());
}
} // Test
public static void main (String args[]) throws Exception {
test1 test = new test1();
}
}

I'm able to compile but when I run the program, the given error is:

Exception in thread "main" java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Unable to connect. Invalid URL.
at com.microsoft.jdbc.base.BaseExceptions.createExcep tion(Unknown Source
)
at com.microsoft.jdbc.base.BaseExceptions.getExceptio n(Unknown Source)
at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager .java:512)
at java.sql.DriverManager.getConnection(DriverManager .java:171)
at test1.<init>(test1.java:10)
at test1.main(test1.java:31)

I have checked that the given IP address is correct, so please can anyone enlighten me about the problem.

Thanks.You must set your database name and port number such as following
Connection connection = DriverManager.getConnection(
"jdbc:microsoft:sqlserver:@.255.255.255:1433;Databas eName=MyDB","abc","abc");

You can also use your computer name in url

"jdbc:microsoft:sqlserver://MYSERVER:1433;DatabaseName=MYDB","USERID","PASSWORD"

Originally posted by diablos00
I've download Microsoft SQL Server 2000 JDBC Driver. All these files are being installed and saved in a folder called sql. For example, the IP adress is 255.255.255.255 , I updated the code and saved it as test1.java in this manner:

import java.sql.*;
/**
* Microsoft SQL Server JDBC test program
*/
public class test1 {
public test1() throws Exception {
// Get connection
DriverManager.registerDriver(new
com.microsoft.jdbc.sqlserver.SQLServerDriver());
Connection connection = DriverManager.getConnection(
"jdbc:microsoft:sqlserver:@.255.255.255","abc","abc");
if (connection != null) {
System.out.println();
System.out.println("Successfully connected");
System.out.println();
// Meta data
DatabaseMetaData meta = connection.getMetaData();
System.out.println("\nDriver Information");
System.out.println("Driver Name: "
+ meta.getDriverName());
System.out.println("Driver Version: "
+ meta.getDriverVersion());
System.out.println("\nDatabase Information ");
System.out.println("Database Name: "
+ meta.getDatabaseProductName());
System.out.println("Database Version: "+
meta.getDatabaseProductVersion());
}
} // Test
public static void main (String args[]) throws Exception {
test1 test = new test1();
}
}

I'm able to compile but when I run the program, the given error is:

Exception in thread "main" java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Unable to connect. Invalid URL.
at com.microsoft.jdbc.base.BaseExceptions.createExcep tion(Unknown Source
)
at com.microsoft.jdbc.base.BaseExceptions.getExceptio n(Unknown Source)
at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager .java:512)
at java.sql.DriverManager.getConnection(DriverManager .java:171)
at test1.<init>(test1.java:10)
at test1.main(test1.java:31)

I have checked that the given IP address is correct, so please can anyone enlighten me about the problem.

Thanks.|||I had the same problem,

The problem is that the Microsoft jdbc driver used unicode and Ianywhere can't handle it.

Use an other jdbc driver from a 3de party will solve this problem.

I used the jdbc driver from datadirect (Type 4 jdbc driver) and this one
was working perfectly. Only thing is you have to pay for it.

I hope i could help you with this.

Greetz|||Microsofts JDBC driver works just fine. In fact it's an old data direct Type 4 driver. Make sure you have the service pack 1 jdbc driver. Here's the exact connection url I use with no problems.

jdbc:jtds:sqlserver://tlmssql3:1388/db1;USER=appsrv1;PASSWORD=password;TDS=8.0

Connecting to SQL Server 2000 thru a VPN?

Is this even possible?
I'm coding a VB.NET WinForms app and an ASP.NET app that will access a MS
SQL 2000 Server. I've been told that when I move into a "production"
environment that I must go thru a VPN. I'm no VPN expert, but this doesn't
make much sense to me especially since the remote clients running my VB.NET
WinForms app may not have teh VPN setup.
If VPN can be used as a tunnel to access a SQL 2000 Server, can someone tell
me what needs to be in place on the client side and what would I use for a
connection string to get to the SQL 2000 Server thru the VPN.
I can't find any info on MSDN that even mentions how to connect to a SQL
2000 Server thru VPN.
Thanks, Rob.
Hi Rob,
The VPN session needs to be established prior to executing your VB.NET
app. There's not a specific connection string to do this.
Here's a sample kb article on how to setup a VPN with our firewall server ,
ISA Server.
837355 How to configure a VPN server by using Internet Security and
http://support.microsoft.com/?id=837355
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.

Connecting to SQL Server 2000 on Windows 2003 Server using sql-dmo

Hi
I have a strange problem connecting to a local SQL Server 2000 on a machine
running Windows 2003 Server.
I'm using a plain connection as shown in the code below:
Dim oServer as New SQLDMO.SQLServer
With oServer
.LoginTimeout = -1
.LoginSecure = True 'Use NT Authentication
.AutoReConnect = False
.Connect (strServerName)
End With
I'm connecting through the IP of the machine.
The problem is:
When I have a system32\drivers\etc\hosts entry specified pointing at the
same machine, then I cannot connect to the SQL Server using NT Authenticatio
n.
I can however still connect by using SA user.
Error is:
Runtime error '-2147203052 (80044814)':
[Microsoft][ODBC SQL Server Driver][SQL Server] Login failed for user
'(null)'. Reason: Not associated with a trusted SQL Server connection.
If I remove the hosts entry I can connect without problems using both NT
authentication and SA user.
It doesn't make any difference about the problem if I'm running NT
authentication mode or mixed mode.
This code having this problem has run without problems on Windows 2000
server, so it is an issue with Windows 2003 server.
Does anyone have a clue to what might cause this problem?
Thanx in advance
/BrianJust a note, if other people should have the same problem.
A temporary work-around is to define the entry in the Hosts entry as an
Alias in
SQL Server - Client Network Utility.
/Brian
"Brian Nielsen" wrote:

> Hi
> I have a strange problem connecting to a local SQL Server 2000 on a machin
e
> running Windows 2003 Server.
> I'm using a plain connection as shown in the code below:
> Dim oServer as New SQLDMO.SQLServer
> With oServer
> .LoginTimeout = -1
> .LoginSecure = True 'Use NT Authentication
> .AutoReConnect = False
> .Connect (strServerName)
> End With
> I'm connecting through the IP of the machine.
> The problem is:
> When I have a system32\drivers\etc\hosts entry specified pointing at the
> same machine, then I cannot connect to the SQL Server using NT Authenticat
ion.
> I can however still connect by using SA user.
> Error is:
> Runtime error '-2147203052 (80044814)':
> [Microsoft][ODBC SQL Server Driver][SQL Server] Login failed for user
> '(null)'. Reason: Not associated with a trusted SQL Server connection.
> If I remove the hosts entry I can connect without problems using both NT
> authentication and SA user.
> It doesn't make any difference about the problem if I'm running NT
> authentication mode or mixed mode.
> This code having this problem has run without problems on Windows 2000
> server, so it is an issue with Windows 2003 server.
> Does anyone have a clue to what might cause this problem?
> Thanx in advance
> /Brian

Connecting to sql server 2000 on Godaddy error: (provider: Named Pipes Provider, error: 40

Facts:

1. I am using my account on Godaddy trying to connect to my sql server db.

2. I can get into my db using user id and password.

3. Godaddy's help file shows this for a connection string:

connectstr = "Driver={SQL Server};SERVER=" & db_server & ";DATABASE=" &
db_name & ";UID=" & db_username & ";PWD=" & db_userpassword

4. My connection string: "Server=whsql-v09.prod.mesa1.secureserver.net;uid=dbasolutions;pwd=***;database=DB_87972;" & _
"Trusted_Connection=False providerName=System.Data.SqlClient"

{password **** out}

5. Get error message

An error has occurred while establishing a connection to the server.
When connecting to SQL Server 2005, this failure may be caused by the
fact that under the default settings SQL Server does not allow remote connections.
(provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

I tried to email Godaddy's help desk with this information.

There first response: We do not allow remote connections to our sql server database.

There second response was to read the help file!

Does anybody have any suggestions?

Thanks in advance,

bswanson

Finally, I did get a tech support who would give me an ear. He got this script from his tech support to test my connection:

mssqltest.aspx

<%@. Import Namespace="System.Data.SqlClient" %>
<%
Dim oSQLConn As SqlConnection = New SqlConnection()
oSQLConn.ConnectionString ="Server=whsql-v09.prod.mesa1.secureserver.net;uid=dbasolutions;pwd=*****;database=DB_87972;"
try
oSQLConn.Open()
catch dag as exception
response.write(dag.message)
End try
Response.write("Connection Open!")
%>

Now we know we are connecting to sql server!

The next issue I realized that I was facing is that the code on the server was not recompiling. It was on the 1.1 framework running on asp.net 2.0.

The code was upgraded to asp.net 2.0 and uploaded again. Still it bombed. In an effort to get it working the debugger was turned on.

The next problem turned out to be in the <compilers> . The compiler option is not allowed. After deleting this code:

compilerOptions="/define:Debug=True /define:Trace=True /imports:Microsoft.VisualBasic,System,System.Collections,System.Configuration,System.Data,System.Drawing,System.Web,System.Web.UI,System.Web.UI.HtmlControls,System.Web.UI.WebControls"

out of the compilers, it worked!

On my local machines, I have not had trouble with recompiling. But on Godaddy, it did not recompile.

Hope this can help someone. I am open to suggestions.

Thanks,

Bswanson

Connecting to SQL Server 2000 on another subnet

Hi Folks,

I'm very new to SQL Server. I have a home network. My primary connection
to the internet is using "Gateway 1" a linksys router, of which, my server
is a LAN node on that router. I have another LAN node connecting to the WAN
node of the "Gateway 2" a wireless USR router to use with my laptop. Using
the wireless laptop, I am on a different subnet than the Server. I'd like
to make a connection to the server through Visual Studio.net but I can't
seem to do it. I'm using TCP/IP with a port different than the default port
(let's call it port 2110, even though it's not). I do have port forwarding
on Gateway1 and I've tried everything from just the server internal IP
address, the external IP address, IP address with port designation, URL with
port designation, nothing seems to work. Any ideas?

Thanks!
RickIt sounds more like you need to configure Gateway2 (not Gateway1)
correctly, if you want to connect to the server from your laptop? The
KB article below might help, but if not, you may get better help in a
networking group of some sort. If you haven't already, you probably
need to use ping, tracert, nslookup etc to make sure you can at least
resolve the server's name and 'see' it on the LAN.

http://support.microsoft.com/kb/287932

Simonsqlsql

Connecting to SQL Server 2000 Named Instances

We are having all kinds of issues with named instances for SQL 2000.

I am trying to connect to a SQL Server 2000 named instance on a different subnet and get an error. I cannot connect with ODBC or our web app.

I am using the port number for the alias that I created in the SQL Client Utility. We can connect to default instances without a problem, but not the named instances.

The SQL Server is 2000 build 2040 (Service pack 4 with a hot fix.) The server is listening on port 1223. In the ODBC connection I click on the Network Config and create an alias with the named instance such as SQLVSN\SQLNI and specify port 1223. I have also tried adding the port to the connection string in the ASP include file (SQLVSN\SQLNI,1223). If I do the same thing with a default instance on the network, both the app and ODBC work fine. It is only when I use a named instance.

Very frustrated. Thanks for any help you can provideIt shouldn't be much different. Here is a connection string in ASP which I use for our internal webpage.


Set objConn = Server.CreateObject("ADODB.Connection")
Set objrs = Server.CreateObject("ADODB.Recordset")

objConn.Open "Driver={SQL Server};" & _
"Server=SERVERNAME\INSTANCENAME;" & _
"Database=DATABASENAME;" & _
"Network=NETWORKNAME;" & _
"Uid=USERNAME;" & _
"Pwd=PASSWORD"

str = "SELECT bla bla FROM bla bla WHERE bla bla;"
set objrs=objConn.execute(str)

I know all about security and dynamic SQL queries; this is just a proof of concept|||That's what we have. The app works on one of the servers that are on the same subnet, but not the one on a different subnet.

The one that is on the other subnet can't connect when I try to create an ODBC connection as a test. This goes for all named instances in the company, for which we have quite a few because we have several SQL Server Cluster Groups setup. However, I can create an ODBC connection to a default instance with no problem what so ever.

I have to be overlooking something when it comes to named instances.

Connecting to SQL Server 2000 Named Instances

I have the following problem;

I fully understand that to connect to a named instance of SQL Server you need to use the ServerName\SQLInstanceName. The problem I have is that I have a SQL Server in a different zone. I can connect to the Default instance by IP Address or the ServerName.zone.domain.org. (e.g. MySQLServer.zone1.mydomain.org).

However, the same thing does not work for the Named Instance. It seems to be named instance or nothing.

How can I connect to this named instance across network zones?:Suse the instance name with the ip address, like 1.2.3.4\myInstance and you ought to be fine.

-PatP|||That did it. Thanks!!! :beer:

Connecting to sql server 2000 in a lan

Hi there,

I have 2 servers on our compny'ssql server does not exist or access denied lan, one with fixed ip and the other one with internal ip. I installed SQL server 2000 on the one with internal ip and I want to access it from the other server. when I want to register sql server instanse , I can see the name of that instance in the list but I can't register it. I keep reciving this error : sql server does not exist or access denied!

Could any one told me what to do?

http://www.connectionstrings.com/

|||

Hi,

According to your problem, the following suggestion may be helpful to you.

1, Does firewall exist in your local network? Please adjust your security level of the Firewall.

2, When connecting to the db server, be sure that the SqlServer is running as well as the 1433 port is opening.

3, Have you installed service pack for your SqlServer2000? Because the port of TCP/IP and UDP is denied due to some security known issue on those edition without service pack.

Thanks.

connecting to sql server 2000 from sql server 2005 management studio

My web site is hosted by a third party, and the back-end is a sql server 2000 database. I was routinely running queries over the internet against the database using Query Analyzer. I just installed sql server 2005. Is it possible to run a sql query against a table in the sql server 2000 database from within sql server 2005 management studio? I haven't found anything in the docs explaining how to connect to sql server 2000. Any help would be appreciated.

You can just connect to the SQL Server 200 as you connected before and are connecting now with your Business Management Studio. Its downwards compatible.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

|||Hi there,

If all you want to do is access your SQL Server 2000 database using SQL Server 2005 Management Studio then you just need to add another connection in your Object Explorer. I believe the steps are:

1) Go File > Connect Object Explorer (NB. alternately you can click on the "Connect Object Explorer" button in the Object Explorer window

2) A dialog will appear where you specify the server name, auth type (SQL Server, Windows), username and password.

Enter the server name (should be the same as the name of the server you connect to in Query Analyzer) and other details as appropriate (the same config you used in Query Analyzer should apply here).

3) A node for your SQL Server 2000 server should appear in the Object Explorer. To query against the database, an easy way is to click on the database (you'll need to expand a few nodes in Obejct Explorer) and then click the "New Query" button (or go File > New > Query With Current Connection).

If your intent is to have your SQL Server 2005 database and define queries for that database that reference the SQL Server 2000 database then you'll need to define a linked server from the SQL Server 2005 instance to the SQL Server 2000 instance. There should be details on how to do this in Books Online.

Hope that helps a bit but sorry if it doesn't & I've missed the mark completely.