Showing posts with label errors. Show all posts
Showing posts with label errors. Show all posts

Wednesday, March 7, 2012

Cannot connect weird issue

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
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

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 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:
>

Sunday, February 19, 2012

Cannot connect to SQL Express db with visual c++

I've installed both SQL Server Express and Visual C++. I'm trying to connect to a SQL database, but keep receiving various errors. This is what I've done so far.

1. Eventually, I used the surface area manager to allow a remote connect.

2. The server and my development environment exist on the same virtual machine, I created with Virtual Pc.

3. I'm running Vista as my operating system.

4. My Data Source wizard looks like this:

Data Source: MS SQL Database File

Database file name: C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\ETS.mdf

If I use Windows Authen I get the following error:

Unable to open physical file "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\ETS_log.ldf" Operating System Error 5: (Access is Denied). An attempt to attach to an auto-named database for file C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\ETS.mdf failed. A database with the same name exist , or specified file cannot be opened, or it is located on a UNC share.

If I use SQL Server Authen I get the following error:

Failed to generate a user instance of SQL Server. Only an integrated connection can generate a user instance. The connection will be closed.

I'm new to this. I really would like help in knowing what these errors mean and how to get pass them. But this is very, very, very, frustrating. First off, there was no instructions on allowing remote connections. I stumble upon it myself. Giving permission to the file, stumble upon myself. I spent 4 days with a You do not have permission to open file error. Didn't realize I didn't have permission.

I need a step by step on what to do. I can be emailed at gregw.energytaxsolutions@.hotmail.com if need be.

If this is in the wrong place, moderator please move to the correct area.

Redirected from visual c++ express forum to SQL Server Express forum.

In case you are disagree with the movement, please feel free to point it out so that we can have further discuss.

|||

hi,

you are using the User Instance feature of SQLExpress edition and this "method" only supports Windows authenticated connections and not mixed mode connections with standard SQL Server logins...

the other problem regards the permissions on the folder containing the referenced database file... the path must be accessible by the user instance.. please read the linked article about that..

regards

|||Thank you for the direction to the article, it was really informative (although I didn't quite understand everything it was talking about). I did get the overall jist of what it was trying to tell me. I have a lot to learn. If anyone knows of a good source of where to start, I would really appreciate it.|||

hi Gregw,

additional information about User Instances can be found at http://msdn2.microsoft.com/en-us/library/ms143684.aspx, http://msdn2.microsoft.com/en-us/library/ms345154.aspx, http://msdn2.microsoft.com/en-us/library/ms254504.aspx..

regards

Sunday, February 12, 2012

Cannot connect to Database in Server Management Studio

I currently can't connecto to my database in SQL Server 2005 (enterprise) but as soon as I try to use any functions, I get cryptic errors found below. I am about to pull my hair out. Everything was working fine for around 4 days and now everything just blows up. I've tried using both sql authentification and also windows:

Errors I'm getting (print screens):

http://www.photopizzaz.biz/junk/sqlserver_2005_errors_and_resolutions.doc

SQL logs:

http://www.photopizzaz.biz/junk/logs.txt

Event log errors are:

Event Type: Error
Event Source: MSSQLSERVER
Event Category: (4)
Event ID: 17809
Date: 12/21/2005
Time: 11:18:34 PM
User: N/A
Computer: BG-SQL2005
Description:
Could not connect because the maximum number of '4' user connections has already been reached. The system administrator can use sp_configure to increase the maximum value. The connection has been closed. [CLIENT: <local machine>]

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 91 45 00 00 14 00 00 00 ?E......
0008: 0b 00 00 00 42 00 47 00 ....B.G.
0010: 2d 00 53 00 51 00 4c 00 -.S.Q.L.
0018: 32 00 30 00 30 00 35 00 2.0.0.5.
0020: 00 00 00 00 00 00 ......

Event Type: Failure Audit
Event Source: MSSQLSERVER
Event Category: (4)
Event ID: 18456
Date: 12/21/2005
Time: 10:34:03 PM
User: N/A
Computer: BG-SQL2005
Description:
Login failed for user 'sa'. [CLIENT: <local machine>]

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 18 48 00 00 0e 00 00 00 .H......
0008: 0b 00 00 00 42 00 47 00 ....B.G.
0010: 2d 00 53 00 51 00 4c 00 -.S.Q.L.
0018: 32 00 30 00 30 00 35 00 2.0.0.5.
0020: 00 00 07 00 00 00 6d 00 ......m.
0028: 61 00 73 00 74 00 65 00 a.s.t.e.
0030: 72 00 00 00 r...

Event Type: Information
Event Source: MSSQLSERVER
Event Category: (2)
Event ID: 8561
Date: 12/21/2005
Time: 10:19:51 PM
User: N/A
Computer: BG-SQL2005
Description:
Recovery of any in-doubt distributed transactions involving Microsoft Distributed Transaction Coordinator (MS DTC) has completed. This is an informational message only. No user action is required.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 71 21 00 00 0a 00 00 00 q!......
0008: 0b 00 00 00 42 00 47 00 ....B.G.
0010: 2d 00 53 00 51 00 4c 00 -.S.Q.L.
0018: 32 00 30 00 30 00 35 00 2.0.0.5.
0020: 00 00 07 00 00 00 6d 00 ......m.
0028: 61 00 73 00 74 00 65 00 a.s.t.e.
0030: 72 00 00 00 r...

Event Type: Error
Event Source: Report Server Windows Service (MSSQLSERVER)
Event Category: Management
Event ID: 107
Date: 12/21/2005
Time: 4:46:14 PM
User: N/A
Computer: BG-SQL2005
Description:
Report Server Windows Service (MSSQLSERVER) cannot connect to the report server database.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

The cause seems to be explained in the event log that you attached:

Event ID: 17809
Date: 12/21/2005
Time: 11:18:34 PM
User: N/A
Computer: BG-SQL2005
Description:
Could not connect because the maximum number of '4' user connections has already been reached. The system administrator can use sp_configure to increase the maximum value. The connection has been closed. [CLIENT: <local machine>]

Have you tried increasing the number of user connections?

Thanks
Laurentiu

|||issue resolved, reinstalled SQL Server 2005 completely