Wednesday, March 7, 2012
Cannot connect weird issue
I am getting the following errors when I try to connect to SQL from a XP
workstation:
Connection Failed.
SQL State '01000'
SQL Server Error:10061
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]
ConnectionOpen(COnnect()).
Connection Failed.
SQL State '08001'
SQL Server Error:17
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]SQL Server does not exist
or access denied.
But when I connect from a different PC I can connect fine. I have changed
network cables and switch ports for this PC but still the same errors appear.
I can bring a laptop over to where the PC is that is having the problem,
unplug the pc from the network and plug the la[top in using same line and the
laptop will connect right up to the SQL server no problem.
TIA
Phil Andersen
There are some issues with Windows XP, you have to open the appropiate
ports:
841252 How to manually enable TCP/IP on Windows XP Service Pack 2 for SQL
Server 2000
839980 How to use a script to programmatically open ports for SQL Server to
use on systems that are running Windows XP Service Pack 2
839269 You may not be able to connect to an instance of SQL Server that is
configured to use the Named Pipes server network library on a computer that
is running Windows XP Service Pack 2
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
"Phil Andersen" <PhilAndersen@.discussions.microsoft.com> schrieb im
Newsbeitrag news:F546FC62-5C16-4ED3-889A-E4F541FC0953@.microsoft.com...
> Hello,
> I am getting the following errors when I try to connect to SQL from a XP
> workstation:
> Connection Failed.
> SQL State '01000'
> SQL Server Error:10061
> [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]
> ConnectionOpen(COnnect()).
> Connection Failed.
> SQL State '08001'
> SQL Server Error:17
> [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]SQL Server does not
> exist
> or access denied.
> But when I connect from a different PC I can connect fine. I have changed
> network cables and switch ports for this PC but still the same errors
> appear.
> I can bring a laptop over to where the PC is that is having the problem,
> unplug the pc from the network and plug the la[top in using same line and
> the
> laptop will connect right up to the SQL server no problem.
> TIA
> Phil Andersen
>
|||I am using service pack 1
"Jens Sü?meyer" wrote:
> There are some issues with Windows XP, you have to open the appropiate
> ports:
> 841252 How to manually enable TCP/IP on Windows XP Service Pack 2 for SQL
> Server 2000
>
> 839980 How to use a script to programmatically open ports for SQL Server to
> use on systems that are running Windows XP Service Pack 2
>
> 839269 You may not be able to connect to an instance of SQL Server that is
> configured to use the Named Pipes server network library on a computer that
> is running Windows XP Service Pack 2
>
> --
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
> "Phil Andersen" <PhilAndersen@.discussions.microsoft.com> schrieb im
> Newsbeitrag news:F546FC62-5C16-4ED3-889A-E4F541FC0953@.microsoft.com...
>
>
|||ARe you sure you are using the same connection string ? Or with what kind of
program are you connecting ? If you have installed the client components yo
could try to make a broadcast for SQL Servers via OSL -L on the commandline.
There wasnt much information about your client components...
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
"Phil Andersen" <PhilAndersen@.discussions.microsoft.com> schrieb im
Newsbeitrag news:D324055E-80BD-40B7-9928-4E5C434E547D@.microsoft.com...[vbcol=seagreen]
>I am using service pack 1
>
> "Jens Smeyer" wrote:
|||OK in ODBC I switched from using TCP/IP to using NAMED PIPE and that made it
work. Still can't figure out why it all of the sudden needed this change and
only on like 5 machines out of 50
"Jens Sü?meyer" wrote:
> ARe you sure you are using the same connection string ? Or with what kind of
> program are you connecting ? If you have installed the client components yo
> could try to make a broadcast for SQL Servers via OSL -L on the commandline.
> There wasn′t much information about your client components...
> --
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
> "Phil Andersen" <PhilAndersen@.discussions.microsoft.com> schrieb im
> Newsbeitrag news:D324055E-80BD-40B7-9928-4E5C434E547D@.microsoft.com...
>
>
|||Hi Phil,
There was a issue on that on the newsgroups, so i post it here (Thanks to
Ashwin Kowtha for that):
1)Ping the SQL Server by name. See if it returns an IP address
2)If the IP returned by Ping is not the same IP as should be, you have a
problem right there.
3) Check if you have any static entries for your SQL Server in your LMHOSTS
or HOSTS file on the
client.
4) If you do, make sure that the IP is mapped to the correct name and vice
versa.
5) Connections going through by IP and named pipes, so you have basic NT and
SQL connectivity.
Check with your NT network admins to see if Name Resolution is working well.
6) run Select @.@.servername on the SQL server and see if the correct name is
being returned.
7) Instead of using Dynamically determine port, if connecting to a default
instance, try giving
the actual port number SQL is listening on.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
"Phil Andersen" <PhilAndersen@.discussions.microsoft.com> schrieb im
Newsbeitrag news:248A248F-1D75-4837-B2C0-B1B362F62619@.microsoft.com...[vbcol=seagreen]
> OK in ODBC I switched from using TCP/IP to using NAMED PIPE and that made
> it
> work. Still can't figure out why it all of the sudden needed this change
> and
> only on like 5 machines out of 50
> "Jens Smeyer" wrote:
Cannot connect weird issue
I am getting the following errors when I try to connect to SQL from a XP
workstation:
Connection Failed.
SQL State '01000'
SQL Server Error:10061
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]
ConnectionOpen(COnnect()).
Connection Failed.
SQL State '08001'
SQL Server Error:17
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]SQL Server do
es not exist
or access denied.
But when I connect from a different PC I can connect fine. I have changed
network cables and switch ports for this PC but still the same errors appear
.
I can bring a laptop over to where the PC is that is having the problem,
unplug the pc from the network and plug the la[top in using same line an
d the
laptop will connect right up to the SQL server no problem.
TIA
Phil AndersenThere are some issues with Windows XP, you have to open the appropiate
ports:
841252 How to manually enable TCP/IP on Windows XP Service Pack 2 for SQL
Server 2000
839980 How to use a script to programmatically open ports for SQL Server to
use on systems that are running Windows XP Service Pack 2
839269 You may not be able to connect to an instance of SQL Server that is
configured to use the Named Pipes server network library on a computer that
is running Windows XP Service Pack 2
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"Phil Andersen" <PhilAndersen@.discussions.microsoft.com> schrieb im
Newsbeitrag news:F546FC62-5C16-4ED3-889A-E4F541FC0953@.microsoft.com...
> Hello,
> I am getting the following errors when I try to connect to SQL from a XP
> workstation:
> Connection Failed.
> SQL State '01000'
> SQL Server Error:10061
> [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]
> ConnectionOpen(COnnect()).
> Connection Failed.
> SQL State '08001'
> SQL Server Error:17
> [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]SQL Server
does not
> exist
> or access denied.
> But when I connect from a different PC I can connect fine. I have changed
> network cables and switch ports for this PC but still the same errors
> appear.
> I can bring a laptop over to where the PC is that is having the problem,
> unplug the pc from the network and plug the la[top in using same line
and
> the
> laptop will connect right up to the SQL server no problem.
> TIA
> Phil Andersen
>|||I am using service pack 1
"Jens Sü?meyer" wrote:
> There are some issues with Windows XP, you have to open the appropiate
> ports:
> 841252 How to manually enable TCP/IP on Windows XP Service Pack 2 for SQL
> Server 2000
>
> 839980 How to use a script to programmatically open ports for SQL Server t
o
> use on systems that are running Windows XP Service Pack 2
>
> 839269 You may not be able to connect to an instance of SQL Server that is
> configured to use the Named Pipes server network library on a computer tha
t
> is running Windows XP Service Pack 2
>
> --
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
> "Phil Andersen" <PhilAndersen@.discussions.microsoft.com> schrieb im
> Newsbeitrag news:F546FC62-5C16-4ED3-889A-E4F541FC0953@.microsoft.com...
>
>|||ARe you sure you are using the same connection string ? Or with what kind of
program are you connecting ? If you have installed the client components yo
could try to make a broadcast for SQL Servers via OSL -L on the commandline.
There wasnt much information about your client components...
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"Phil Andersen" <PhilAndersen@.discussions.microsoft.com> schrieb im
Newsbeitrag news:D324055E-80BD-40B7-9928-4E5C434E547D@.microsoft.com...[vbcol=seagreen]
>I am using service pack 1
>
> "Jens Smeyer" wrote:
>|||OK in ODBC I switched from using TCP/IP to using NAMED PIPE and that made it
work. Still can't figure out why it all of the sudden needed this change and
only on like 5 machines out of 50
"Jens Sü?meyer" wrote:
> ARe you sure you are using the same connection string ? Or with what kind
of
> program are you connecting ? If you have installed the client components y
o
> could try to make a broadcast for SQL Servers via OSL -L on the commandlin
e.
> There wasn′t much information about your client components...
> --
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
> "Phil Andersen" <PhilAndersen@.discussions.microsoft.com> schrieb im
> Newsbeitrag news:D324055E-80BD-40B7-9928-4E5C434E547D@.microsoft.com...
>
>|||Hi Phil,
There was a issue on that on the newsgroups, so i post it here (Thanks to
Ashwin Kowtha for that):
1)Ping the SQL Server by name. See if it returns an IP address
2)If the IP returned by Ping is not the same IP as should be, you have a
problem right there.
3) Check if you have any static entries for your SQL Server in your LMHOSTS
or HOSTS file on the
client.
4) If you do, make sure that the IP is mapped to the correct name and vice
versa.
5) Connections going through by IP and named pipes, so you have basic NT and
SQL connectivity.
Check with your NT network admins to see if Name Resolution is working well.
6) run Select @.@.servername on the SQL server and see if the correct name is
being returned.
7) Instead of using Dynamically determine port, if connecting to a default
instance, try giving
the actual port number SQL is listening on.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"Phil Andersen" <PhilAndersen@.discussions.microsoft.com> schrieb im
Newsbeitrag news:248A248F-1D75-4837-B2C0-B1B362F62619@.microsoft.com...[vbcol=seagreen]
> OK in ODBC I switched from using TCP/IP to using NAMED PIPE and that made
> it
> work. Still can't figure out why it all of the sudden needed this change
> and
> only on like 5 machines out of 50
> "Jens Smeyer" wrote:
>
Cannot connect w/ Java app but can connect w/ .Net app - SQL Server Express 2005
The error I get is: "com.microsoft.sqlserver.jdbc.SQLServerException: Cannot open database "CORNERS" requested by the login. The login failed." An interesing note - I get the same message if the database is not running.
SQL Server Express 2005 is installed in mixed mode.
Here is my connection string in the .Net appplication: <add key="connectString" value="Server=(local);UID=sa;PWD=myPasswd;Database=CORNERS" />.
These are my values in my Java app web.xml -
<init-param>
<param-name>DBDriver</param-name>
<param-value>com.microsoft.sqlserver.jdbc.SQLServerDriver</param-value>
</init-param>
<init-param>
<param-name>DBURL</param-name> <param-value>jdbc:sqlserver://localhost\sqlexpress:1055;databaseName=CORNERS</param-value>
<init-param>
<param-name>DBUser</param-name>
<param-value>sa</param-value>
</init-param>
<init-param>
<param-name>DBPwd</param-name>
<param-value>myPasswd</param-value>
</init-param>.
And yes, the port is 1055 - I checked to find it.
I am using Microsoft SQL Server 2005 JDBC Driver 1.0 (sqljdbc_1.0.809.102).
Does anyone have any idea what is wrong so that the login fails in the Java application but works in the .Net application?
Mostlikely, you have a syntax error in your connection string.
jdbc:sqlserver://localhost\sqlexpress:1055;databaseName=CORNERS
please refer to http://msdn2.microsoft.com/en-us/library/ms378428.aspx
you can try
jdbc:sqlserver://localhost:1055;databaseName=CORNERS,
|||I tried your suggestion and it does not work. I get the same error. I tried many different variations of the connection string and none of them have worked.I think it is important to note that I get this error even if the database is NOT running.
This leads me to believe it's a problem with the driver. I have the sqljdbc.jar located in my Tomcat\common\lib directory. Is this incorrect?|||Can you get a trace with FINEST level turned on?|||How do I turn the trace on? And to the finest level? And will this make a difference considering that I get the same message whether or not the database is actually running?|||
I'm having a similar problem. However I am using context.xml to define the connection pool as:
<Resource name="jdbc/SqlServerLocal"
auth="Container"
type="javax.sql.DataSource"
username="PortalUser"
password="********"
driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://servername\\SQLEXPRESS:1433"
maxActive="10"
maxIdle="4"
maxWait="100" />
and this works on my Windows development machine... but when I ftp the *.war file to the Linux server, I get the following message:
Cannot load JDBC driver class 'com.microsoft.sqlserver.jdbc.SQLServerDriver'
I put the 'sqljdbc.jar' file in the /common/lib path for both installations.
|||Adisciullo,
Please refer to the following site for information regarding turning tracing on:
http://msdn2.microsoft.com/en-us/library/ms378517.aspx
Please post the results so we can further diagnose this.
Additionally, does this problem also reproduce with the v1.1 driver. You can find it at: http://www.microsoft.com/downloads/details.aspx?FamilyId=6D483869-816A-44CB-9787-A866235EFC7C&displaylang=en
Thanks,
Jaaved Mohammed
Saturday, February 25, 2012
Cannot connect via Web Application...
I am writing a web part which requires me to connect to a local sql
database.
I wrote a class which handles the connection and reading of the table.
When I try to call .Open on the connection, it fails, the exception is
something to do with permission.
I used the same class to connect with a console application and a
windows application, and it works fine. I am able to connect and read
the table.
Can anyone shed some light on what is the difference between
connecting/accessing to a database via Web Application as opposed to a
Non-Web App.
TIAI think your problem has something to do with permission as the error
indicates. If you are writing an ASP.Net web page then your web application
is running as the ASPUSER Windows user and chances are this use does not
have permissions to connect to the database. When you run as a Windows
application you run as you and you probably have admin permissions on the
box which gives you SA permissions in the database so you can do whatever
you want. Confirm that you are running as ASPUSER and then create a login
and user for it in SQL Server.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"IV" <Imtiaz.Vohra@.vtechsr.com> wrote in message
news:1168476873.734347.313800@.k58g2000hse.googlegroups.com...
>I am using SQLServer 2000, Visual Studio 2003, C#.
> I am writing a web part which requires me to connect to a local sql
> database.
> I wrote a class which handles the connection and reading of the table.
> When I try to call .Open on the connection, it fails, the exception is
> something to do with permission.
> I used the same class to connect with a console application and a
> windows application, and it works fine. I am able to connect and read
> the table.
> Can anyone shed some light on what is the difference between
> connecting/accessing to a database via Web Application as opposed to a
> Non-Web App.
> TIA
>|||Roger,
Thanks for the reply.
I ran SQL Server Enterprise Manager and for that database, I checked
the Users.
there are two, dbo and guest, both having full permissions.
How would I confirm tthat I am running as ASPUSER and create a login
for it?
Thanks,
IV
Roger Wolter[MSFT] wrote:[vbcol=seagreen]
> I think your problem has something to do with permission as the error
> indicates. If you are writing an ASP.Net web page then your web applicati
on
> is running as the ASPUSER Windows user and chances are this use does not
> have permissions to connect to the database. When you run as a Windows
> application you run as you and you probably have admin permissions on the
> box which gives you SA permissions in the database so you can do whatever
> you want. Confirm that you are running as ASPUSER and then create a login
> and user for it in SQL Server.
> --
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "IV" <Imtiaz.Vohra@.vtechsr.com> wrote in message
> news:1168476873.734347.313800@.k58g2000hse.googlegroups.com...|||Log in as an admin. USE the database where your tables are and execute
these commands (substituting the name of you machine for servername)
CREATE LOGIN [servername\ASPNET] FROM WINDOWS
CREATE USER [servername\ASPNET] FROM LOGIN [servername\ASPNET]
http://msdn2.microsoft.com/en-us/library/ms189751.aspx
http://msdn2.microsoft.com/en-us/library/ms173463.aspx
You will then have to grant this user access to the objects it needs to
access for your application
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"IV" <Imtiaz.Vohra@.vtechsr.com> wrote in message
news:1168487427.667116.147270@.p59g2000hsd.googlegroups.com...
> Roger,
> Thanks for the reply.
> I ran SQL Server Enterprise Manager and for that database, I checked
> the Users.
> there are two, dbo and guest, both having full permissions.
> How would I confirm tthat I am running as ASPUSER and create a login
> for it?
> Thanks,
> IV
> Roger Wolter[MSFT] wrote:
>|||Roger,
I appreciate you taking the time to help me out.
I tried what you said and am still failing with the same exception.
Imtiaz
Roger Wolter[MSFT] wrote:[vbcol=seagreen]
> Log in as an admin. USE the database where your tables are and execute
> these commands (substituting the name of you machine for servername)
> CREATE LOGIN [servername\ASPNET] FROM WINDOWS
> CREATE USER [servername\ASPNET] FROM LOGIN [servername\ASPNET]
> http://msdn2.microsoft.com/en-us/library/ms189751.aspx
> http://msdn2.microsoft.com/en-us/library/ms173463.aspx
> You will then have to grant this user access to the objects it needs to
> access for your application
>
> --
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "IV" <Imtiaz.Vohra@.vtechsr.com> wrote in message
> news:1168487427.667116.147270@.p59g2000hsd.googlegroups.com...
Cannot connect via Web Application...
I am writing a web part which requires me to connect to a local sql
database.
I wrote a class which handles the connection and reading of the table.
When I try to call .Open on the connection, it fails, the exception is
something to do with permission.
I used the same class to connect with a console application and a
windows application, and it works fine. I am able to connect and read
the table.
Can anyone shed some light on what is the difference between
connecting/accessing to a database via Web Application as opposed to a
Non-Web App.
TIA
I think your problem has something to do with permission as the error
indicates. If you are writing an ASP.Net web page then your web application
is running as the ASPUSER Windows user and chances are this use does not
have permissions to connect to the database. When you run as a Windows
application you run as you and you probably have admin permissions on the
box which gives you SA permissions in the database so you can do whatever
you want. Confirm that you are running as ASPUSER and then create a login
and user for it in SQL Server.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"IV" <Imtiaz.Vohra@.vtechsr.com> wrote in message
news:1168476873.734347.313800@.k58g2000hse.googlegr oups.com...
>I am using SQLServer 2000, Visual Studio 2003, C#.
> I am writing a web part which requires me to connect to a local sql
> database.
> I wrote a class which handles the connection and reading of the table.
> When I try to call .Open on the connection, it fails, the exception is
> something to do with permission.
> I used the same class to connect with a console application and a
> windows application, and it works fine. I am able to connect and read
> the table.
> Can anyone shed some light on what is the difference between
> connecting/accessing to a database via Web Application as opposed to a
> Non-Web App.
> TIA
>
|||Roger,
Thanks for the reply.
I ran SQL Server Enterprise Manager and for that database, I checked
the Users.
there are two, dbo and guest, both having full permissions.
How would I confirm tthat I am running as ASPUSER and create a login
for it?
Thanks,
IV
Roger Wolter[MSFT] wrote:[vbcol=seagreen]
> I think your problem has something to do with permission as the error
> indicates. If you are writing an ASP.Net web page then your web application
> is running as the ASPUSER Windows user and chances are this use does not
> have permissions to connect to the database. When you run as a Windows
> application you run as you and you probably have admin permissions on the
> box which gives you SA permissions in the database so you can do whatever
> you want. Confirm that you are running as ASPUSER and then create a login
> and user for it in SQL Server.
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "IV" <Imtiaz.Vohra@.vtechsr.com> wrote in message
> news:1168476873.734347.313800@.k58g2000hse.googlegr oups.com...
|||Log in as an admin. USE the database where your tables are and execute
these commands (substituting the name of you machine for servername)
CREATE LOGIN [servername\ASPNET] FROM WINDOWS
CREATE USER [servername\ASPNET] FROM LOGIN [servername\ASPNET]
http://msdn2.microsoft.com/en-us/library/ms189751.aspx
http://msdn2.microsoft.com/en-us/library/ms173463.aspx
You will then have to grant this user access to the objects it needs to
access for your application
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"IV" <Imtiaz.Vohra@.vtechsr.com> wrote in message
news:1168487427.667116.147270@.p59g2000hsd.googlegr oups.com...
> Roger,
> Thanks for the reply.
> I ran SQL Server Enterprise Manager and for that database, I checked
> the Users.
> there are two, dbo and guest, both having full permissions.
> How would I confirm tthat I am running as ASPUSER and create a login
> for it?
> Thanks,
> IV
> Roger Wolter[MSFT] wrote:
>
|||Roger,
I appreciate you taking the time to help me out.
I tried what you said and am still failing with the same exception.
Imtiaz
Roger Wolter[MSFT] wrote:[vbcol=seagreen]
> Log in as an admin. USE the database where your tables are and execute
> these commands (substituting the name of you machine for servername)
> CREATE LOGIN [servername\ASPNET] FROM WINDOWS
> CREATE USER [servername\ASPNET] FROM LOGIN [servername\ASPNET]
> http://msdn2.microsoft.com/en-us/library/ms189751.aspx
> http://msdn2.microsoft.com/en-us/library/ms173463.aspx
> You will then have to grant this user access to the objects it needs to
> access for your application
>
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "IV" <Imtiaz.Vohra@.vtechsr.com> wrote in message
> news:1168487427.667116.147270@.p59g2000hsd.googlegr oups.com...
Cannot connect via Linked Server
password. We get an error #17: SQL Server does not exist or access denied. We also get the same behaviour while trying an OPENROWSET query from the Server1\Instance1 Query Analyzer. All other SQL Server instances we have installed (on other machines)
can connect to Server2\Instance2 with a SQLOLEDB linked server, no problems.
As far as I can tell, this error is only happening when using the SQL Server. I can connect to the remote (Server2\Instance2) server using osql from Server1, and I can even connect to Server2\Instance2 by using a SQLOLEDB connection from a desktop app (f
or example, I can test the connection successfully in a UDL using SQLOLEDB to the remote server from Server1).
We are only using named pipes. I have verified that all client and all server network utilities are set exclusively to named pipes. This is true. I have also performed a network trace on the Server1 server. It does not even attempt to contact the Serv
er2 machine. I have also network traced a different SQL Server instance on another machine that can connect to Server2\Instance2 and it's network trace shows a very clear, immediate connection to the Server2.
What other steps can I take to troubleshoot this problem? I think that I have hit all the common trouble points in setting up a linked server.
Thanks,
Frank
Update: We noticed that there was an additional NIC card on the Server1 server that had an APIPA IP address. We have disabled this NIC and now the network trace is showing some communication between Server1 and Server2.
Basically, the trace shows Server1 attempts to connect using SMB to set the session up on Server2. Server2 responds with an NT error 22, STATUS_MORE_PROCESSING_REQUIRED, then a few frames later, it tries to open the IPC$ pipe on Server2. Server2 respond
s with an NT error 34, STATUS_ACCESS_DENIED. So why is SMB not allowing connections to the IPC$ pipe? I can log in to the Server1 machine under the same account as SQL Server is running as and issue a successful "net use \\Server2\IPC$" without a proble
m. The network trace requests from Server1 for the net use look similar to those generated by SQL Server linked server. Why does one get an access denied and the other does not?
Thanks,
Frank
|||Hi Frank,
I learned you are failed to create linked Server between Server1\Instance1
and Server2\Instance2. The error "SQL Server does not exist or access
denied." occurred.
1. Please check the Server Network Utility for named pipes and make sure it
is the default value.
\\.\pipe\MSSQL$ Instance2\sql\query
2. Please check to see if UDP port 1434 is enabled.
3. Please try to add the linked Server using sp_addlinkedserver in QA
(Query Analyzer). What's the result? If there is any error occurring,
please provide the detailed error message.
For more information regarding sp_addlinkedserver, please refer to the
article on SQL Server Books Online.
Topic: "sp_addlinkedserver"
4. Please check the application/system log on both Servers and see if there
is any error information when the "linked Server" error occurred.
5. Please try to create an alias for Server2\Instance2 and then create the
linked Server. Does the same problem still persist?
Also, such issues tend to be complex and take up extensive research time.
I'd like to set your expectations that it may take a while for us to help
you narrow down the problem and we may eventually redirect you to PSS to
continue working with a dedicated Support Professional. If this is
critical, I'd recommend contacting PSS and opening a Support incident
troubleshoot this further. If you need any help in this regard, please let
me know.
Regards,
Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
|||Hi Yuan, I have completed the following steps for troubleshooting from your post. My comments are indented below each of your suggestions:
1. Please check the Server Network Utility for named pipes and make sure it
is the default value.
\\.\pipe\MSSQL$ Instance2\sql\query
I have checked the Server & Client network utilities: named pipes is default and the only protocol. That was stated in my original post.
2. Please check to see if UDP port 1434 is enabled.
Yes, port 1434 UDP is listening on the Server2 machine.
3. Please try to add the linked Server using sp_addlinkedserver in QA
(Query Analyzer). What's the result? If there is any error occurring,
please provide the detailed error message.
For more information regarding sp_addlinkedserver, please refer to the
article on SQL Server Books Online.
Topic: "sp_addlinkedserver"
Adding the linked server is not the problem. I can do it either through Enterprise Manager or the stored procedure. It is when I try to connect to the linked server (for example, when EM queries for table names from the linked server) that I get
Error #17 SQL Server does not exist or access denied, as stated in my original post.
4. Please check the application/system log on both Servers and see if there
is any error information when the "linked Server" error occurred.
I have been monitoring the event log (all application, security and system) for any errors on either system and there is nothing.
5. Please try to create an alias for Server2\Instance2 and then create the
linked Server. Does the same problem still persist?
I have tried to create an alias with the same results. No connectivity; access denied.
I have hit most of these normal troubleshooting steps. I don't usually jump to a network trace before trying things like this. The SMB network trace for opening the named pipe shows an access denied error from the Server2. What other issues might cause
this?
Thanks,
Frank
|||Hi Frank,
This issue is very strange. Please try the following steps to see if they
are helpful.
1. Try to create a new linked server using SQL Server directly but not OLE
DB provider for SQL Server. In the meantime, please specify a SQL account
in the general tab to connect to Server2\instance2 server. After creating
this linked server, please try to perform the following sql statements. It
is best to grant the admin permission of server2\instance2 to this test SQL
account.
Select * from OPENQUERY(<Linked Server Name>, 'SQL statements')
Select * from <Linked server Name>X<Table Name>
Does the same error message "SQL Server does not exist or access denied"
still persist? Is there any other error message occurring? It is
appreciated you can provide the completely error message.
2. Please use MDAC checker on your Server1 and provide the result.
HOW TO: Check for MDAC Version
http://support.microsoft.com/default...b;EN-US;301202
I am looking forward to hearing from you soon.
Regards,
Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
|||Yuan, we have tried creating a SQL Server without using the OLEDB provider and this failed in the same manner as the prior failures. Both the openquery and the four part fully qualified name queries failed with Error #17, SQL Server does not exist or acc
ess denied.
The MDAC is 2.7SP1 on Server1, 2.8 on Server2...
Any help at this point would be greatly appreciated...
Thanks,
Frank
-- "Yuan Shao" wrote: --
Hi Frank,
This issue is very strange. Please try the following steps to see if they
are helpful.
1. Try to create a new linked server using SQL Server directly but not OLE
DB provider for SQL Server. In the meantime, please specify a SQL account
in the general tab to connect to Server2\instance2 server. After creating
this linked server, please try to perform the following sql statements. It
is best to grant the admin permission of server2\instance2 to this test SQL
account.
Select * from OPENQUERY(<Linked Server Name>, 'SQL statements')
Select * from <Linked server Name>?X<Table Name>
Does the same error message "SQL Server does not exist or access denied"
still persist? Is there any other error message occurring? It is
appreciated you can provide the completely error message.
2. Please use MDAC checker on your Server1 and provide the result.
HOW TO: Check for MDAC Version
http://support.microsoft.com/default...b;EN-US;301202
I am looking forward to hearing from you soon.
Regards,
Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
|||Hi Frank,
Thanks for your feedback. After reviewing our discussion in detail, I
noticed you test the connection successfully in a UDL using SQLOLEDB to the
remote server (server2/instance2) from Server1. However, you still got the
error "SQL Server does not exist or access denied." using linked server
I would like you to check if this is a permission problem. Please try to
create a linked server with sa login and check to see if the same error
persists. I have attached a linkedserver.zip file with my notification to
help describe the configuration of linked server using sa login.
I am looking forward to hearing from you soon.
Regards,
Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
|||Yuan, we have tried connecting to the linked server using the sa password and it still results in the original failure: Error 17, SQL Server does not exist or access denied. It seems like it is the named pipes connectivity shutting the door down rather t
han SQL Server, although I cannot verify this as neither SQL Server nor the operating system are logging this (despite having all failure logging turned on both the OS local security policy and in SQL Server). Any other ideas?
Thanks,
Frank
|||Have you tried a connection method other than named pipes. Try making TcpIP and secondary connection method and setting up an alias using IP.
Are both servers on the same segment?
Sometimes netbios names are not passed across segments.
Have you tried rebooting the server1 since disabling the NIC. Sometimes it needs to rebroadcast its existance on the NIC.
Thanks
Jeff
|||Hello Frank,
Looking at the nature of this issue, it would require intensive
troubleshooting which would be done quickly and effectively with direct
assistance from a Microsoft Support Professional through Microsoft Product
Support Services. You can contact Microsoft Product Support directly to
discuss additional support options you may have available, by contacting us
at 1-(800)936-5800 or by choosing one of the options listed at
http://support.microsoft.com/default...=sz;en-us;top.
If this is not an urgent issue and your would like us to create an incident
for you and have Microsoft Customer Service Representative contact you
directly, please send email to (remove "online." from this no Spam email
address): mailto:dscommhf@.online.microsoft.com with the following
information,
*Include "Followup: <Tomcat IssueID>" in the email Subject.
*Location of the post
*Subject Line
*First Name, Last Name
*MSDN Subscriber ID
*Company name (if any)
*Phone number
*e-mail address
Thanks for using MSDN Newsgroups.
Vikrant Dalwale
Microsoft SQL Server Support Professional
This posting is provided "AS IS" with no warranties, and confers no rights.
Get secure !! For info, please visit http://www.microsoft.com/security.
Please reply to Newsgroups only.
| Thread-Topic: Cannot connect via Linked Server
| thread-index: AcQh0Df+wj3plzMnQ3+eAqcmfTrgkg==
| X-WN-Post: microsoft.public.sqlserver.connect
| From: "=?Utf-8?B?RnJhbmsgSm9uZXM=?=" <frank@.bogusfiosincfake.com>
| References: <99E987D2-0636-4917-8627-8E1A87789198@.microsoft.com>
<4B4AE818-15A4-4C50-97DC-7370D8DC8D49@.microsoft.com>
<3tFzedKHEHA.612@.cpmsftngxa06.phx.gbl>
| Subject: RE: Cannot connect via Linked Server
| Date: Tue, 13 Apr 2004 20:26:04 -0700
| Lines: 4
| Message-ID: <50E78236-79B1-4D3F-9BFE-CB02692DB966@.microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.sqlserver.connect
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.sqlserver.connect:40978
| NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.180
| X-Tomcat-NG: microsoft.public.sqlserver.connect
|
| Yuan, we have tried connecting to the linked server using the sa password
and it still results in the original failure: Error 17, SQL Server does not
exist or access denied. It seems like it is the named pipes connectivity
shutting the door down rather than SQL Server, although I cannot verify
this as neither SQL Server nor the operating system are logging this
(despite having all failure logging turned on both the OS local security
policy and in SQL Server). Any other ideas?
Thanks,
Frank
|
Cannot connect via Linked Server
lled. Server1\Instance1 has a linked server to Server2\Instance2. The link
ed server is using the SQLOLEODB provider. This linked server is setup with
remote login and a correct
password. We get an error #17: SQL Server does not exist or access denied.
We also get the same behaviour while trying an OPENROWSET query from the Se
rver1\Instance1 Query Analyzer. All other SQL Server instances we have inst
alled (on other machines)
can connect to Server2\Instance2 with a SQLOLEDB linked server, no problems.
As far as I can tell, this error is only happening when using the SQL Server
. I can connect to the remote (Server2\Instance2) server using osql from Se
rver1, and I can even connect to Server2\Instance2 by using a SQLOLEDB conne
ction from a desktop app (f
or example, I can test the connection successfully in a UDL using SQLOLEDB t
o the remote server from Server1).
We are only using named pipes. I have verified that all client and all serv
er network utilities are set exclusively to named pipes. This is true. I h
ave also performed a network trace on the Server1 server. It does not even
attempt to contact the Serv
er2 machine. I have also network traced a different SQL Server instance on
another machine that can connect to Server2\Instance2 and it's network trace
shows a very clear, immediate connection to the Server2.
What other steps can I take to troubleshoot this problem? I think that I ha
ve hit all the common trouble points in setting up a linked server.
Thanks,
FrankUpdate: We noticed that there was an additional NIC card on the Server1 serv
er that had an APIPA IP address. We have disabled this NIC and now the netw
ork trace is showing some communication between Server1 and Server2.
Basically, the trace shows Server1 attempts to connect using SMB to set the
session up on Server2. Server2 responds with an NT error 22, STATUS_MORE_PR
OCESSING_REQUIRED, then a few frames later, it tries to open the IPC$ pipe o
n Server2. Server2 respond
s with an NT error 34, STATUS_ACCESS_DENIED. So why is SMB not allowing con
nections to the IPC$ pipe? I can log in to the Server1 machine under the sa
me account as SQL Server is running as and issue a successful "net use \\Ser
ver2\IPC$" without a proble
m. The network trace requests from Server1 for the net use look similar to
those generated by SQL Server linked server. Why does one get an access den
ied and the other does not?
Thanks,
Frank|||Hi Frank,
I learned you are failed to create linked Server between Server1\Instance1
and Server2\Instance2. The error "SQL Server does not exist or access
denied." occurred.
1. Please check the Server Network Utility for named pipes and make sure it
is the default value.
\\.\pipe\MSSQL$ Instance2\sql\query
2. Please check to see if UDP port 1434 is enabled.
3. Please try to add the linked Server using sp_addlinkedserver in QA
(Query Analyzer). What's the result? If there is any error occurring,
please provide the detailed error message.
For more information regarding sp_addlinkedserver, please refer to the
article on SQL Server Books Online.
Topic: "sp_addlinkedserver"
4. Please check the application/system log on both Servers and see if there
is any error information when the "linked Server" error occurred.
5. Please try to create an alias for Server2\Instance2 and then create the
linked Server. Does the same problem still persist?
Also, such issues tend to be complex and take up extensive research time.
I'd like to set your expectations that it may take a while for us to help
you narrow down the problem and we may eventually redirect you to PSS to
continue working with a dedicated Support Professional. If this is
critical, I'd recommend contacting PSS and opening a Support incident
troubleshoot this further. If you need any help in this regard, please let
me know.
Regards,
Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.|||Hi Yuan, I have completed the following steps for troubleshooting from your
post. My comments are indented below each of your suggestions:
1. Please check the Server Network Utility for named pipes and make sure it
is the default value.
\\.\pipe\MSSQL$ Instance2\sql\query
I have checked the Server & Client network utilities: named pipes is default
and the only protocol. That was stated in my original post.
2. Please check to see if UDP port 1434 is enabled.
Yes, port 1434 UDP is listening on the Server2 machine.
3. Please try to add the linked Server using sp_addlinkedserver in QA
(Query Analyzer). What's the result? If there is any error occurring,
please provide the detailed error message.
For more information regarding sp_addlinkedserver, please refer to the
article on SQL Server Books Online.
Topic: "sp_addlinkedserver"
Adding the linked server is not the problem. I can do it either through Ent
erprise Manager or the stored procedure. It is when I try to connect to the
linked server (for example, when EM queries for table names from the linked
server) that I get
Error #17 SQL Server does not exist or access denied, as stated in my origin
al post.
4. Please check the application/system log on both Servers and see if there
is any error information when the "linked Server" error occurred.
I have been monitoring the event log (all application, security and system)
for any errors on either system and there is nothing.
5. Please try to create an alias for Server2\Instance2 and then create the
linked Server. Does the same problem still persist?
I have tried to create an alias with the same results. No connectivity; acc
ess denied.
I have hit most of these normal troubleshooting steps. I don't usually jump
to a network trace before trying things like this. The SMB network trace f
or opening the named pipe shows an access denied error from the Server2. Wh
at other issues might cause
this?
Thanks,
Frank|||Hi Frank,
This issue is very strange. Please try the following steps to see if they
are helpful.
1. Try to create a new linked server using SQL Server directly but not OLE
DB provider for SQL Server. In the meantime, please specify a SQL account
in the general tab to connect to Server2\instance2 server. After creating
this linked server, please try to perform the following sql statements. It
is best to grant the admin permission of server2\instance2 to this test SQL
account.
Select * from OPENQUERY(<Linked Server Name>, 'SQL statements')
Select * from <Linked server Name>_<Table Name>
Does the same error message "SQL Server does not exist or access denied"
still persist? Is there any other error message occurring? It is
appreciated you can provide the completely error message.
2. Please use MDAC checker on your Server1 and provide the result.
HOW TO: Check for MDAC Version
http://support.microsoft.com/defaul...kb;EN-US;301202
I am looking forward to hearing from you soon.
Regards,
Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.|||Yuan, we have tried creating a SQL Server without using the OLEDB provider a
nd this failed in the same manner as the prior failures. Both the openquery
and the four part fully qualified name queries failed with Error #17, SQL S
erver does not exist or acc
ess denied.
The MDAC is 2.7SP1 on Server1, 2.8 on Server2...
Any help at this point would be greatly appreciated...
Thanks,
Frank
-- "Yuan Shao" wrote: --
Hi Frank,
This issue is very strange. Please try the following steps to see if they
are helpful.
1. Try to create a new linked server using SQL Server directly but not OLE
DB provider for SQL Server. In the meantime, please specify a SQL account
in the general tab to connect to Server2\instance2 server. After creating
this linked server, please try to perform the following sql statements. It
is best to grant the admin permission of server2\instance2 to this test SQL
account.
Select * from OPENQUERY(<Linked Server Name>, 'SQL statements')
Select * from <Linked server Name>?_<Table Name>
Does the same error message "SQL Server does not exist or access denied"
still persist? Is there any other error message occurring? It is
appreciated you can provide the completely error message.
2. Please use MDAC checker on your Server1 and provide the result.
HOW TO: Check for MDAC Version
http://support.microsoft.com/defaul...kb;EN-US;301202
I am looking forward to hearing from you soon.
Regards,
Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.|||Hi Frank,
Thanks for your feedback. After reviewing our discussion in detail, I
noticed you test the connection successfully in a UDL using SQLOLEDB to the
remote server (server2/instance2) from Server1. However, you still got the
error "SQL Server does not exist or access denied." using linked server
I would like you to check if this is a permission problem. Please try to
create a linked server with sa login and check to see if the same error
persists. I have attached a linkedserver.zip file with my notification to
help describe the configuration of linked server using sa login.
I am looking forward to hearing from you soon.
Regards,
Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.|||Yuan, we have tried connecting to the linked server using the sa password an
d it still results in the original failure: Error 17, SQL Server does not ex
ist or access denied. It seems like it is the named pipes connectivity shut
ting the door down rather t
han SQL Server, although I cannot verify this as neither SQL Server nor the
operating system are logging this (despite having all failure logging turned
on both the OS local security policy and in SQL Server). Any other ideas?
Thanks,
Frank|||Have you tried a connection method other than named pipes. Try making TcpIP
and secondary connection method and setting up an alias using IP.
Are both servers on the same segment?
Sometimes netbios names are not passed across segments.
Have you tried rebooting the server1 since disabling the NIC. Sometimes it
needs to rebroadcast its existance on the NIC.
Thanks
Jeff|||Hello Frank,
Looking at the nature of this issue, it would require intensive
troubleshooting which would be done quickly and effectively with direct
assistance from a Microsoft Support Professional through Microsoft Product
Support Services. You can contact Microsoft Product Support directly to
discuss additional support options you may have available, by contacting us
at 1-(800)936-5800 or by choosing one of the options listed at
http://support.microsoft.com/defaul...d=sz;en-us;top.
If this is not an urgent issue and your would like us to create an incident
for you and have Microsoft Customer Service Representative contact you
directly, please send email to (remove "online." from this no Spam email
address): mailto:dscommhf@.online.microsoft.com with the following
information,
*Include "Followup: <Tomcat IssueID>" in the email Subject.
*Location of the post
*Subject Line
*First Name, Last Name
*MSDN Subscriber ID
*Company name (if any)
*Phone number
*e-mail address
Thanks for using MSDN Newsgroups.
Vikrant Dalwale
Microsoft SQL Server Support Professional
This posting is provided "AS IS" with no warranties, and confers no rights.
Get secure !! For info, please visit http://www.microsoft.com/security.
Please reply to Newsgroups only.
| Thread-Topic: Cannot connect via Linked Server
| thread-index: AcQh0Df+wj3plzMnQ3+eAqcmfTrgkg==
| X-WN-Post: microsoft.public.sqlserver.connect
| From: "examnotes" <frank@.bogusfiosincfake.com>
| References: <99E987D2-0636-4917-8627-8E1A87789198@.microsoft.com>
<4B4AE818-15A4-4C50-97DC-7370D8DC8D49@.microsoft.com>
<3tFzedKHEHA.612@.cpmsftngxa06.phx.gbl>
| Subject: RE: Cannot connect via Linked Server
| Date: Tue, 13 Apr 2004 20:26:04 -0700
| Lines: 4
| Message-ID: <50E78236-79B1-4D3F-9BFE-CB02692DB966@.microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.sqlserver.connect
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.sqlserver.connect:40978
| NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.180
| X-Tomcat-NG: microsoft.public.sqlserver.connect
|
| Yuan, we have tried connecting to the linked server using the sa password
and it still results in the original failure: Error 17, SQL Server does not
exist or access denied. It seems like it is the named pipes connectivity
shutting the door down rather than SQL Server, although I cannot verify
this as neither SQL Server nor the operating system are logging this
(despite having all failure logging turned on both the OS local security
policy and in SQL Server). Any other ideas?
Thanks,
Frank
|