Showing posts with label machine. Show all posts
Showing posts with label machine. Show all posts

Tuesday, March 27, 2012

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 (Local Machine)

Hi all,

Apologies if this is a dumb question, but I'm tearing my hair out over the basics when I should be spending time learning ASP.NET 2.0 and C#. I've searched the archives and a lot of people seem to be getting the same error as me, but when trying to connect from remote machines.

I'm getting what seems to be a standard 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'm not trying to connect remotely, I'm on my developer machine. The error comes up when trying to connect from within VS2005 (Tools, Connect to Database). It also comes up if I create a new web-site and go to the ASP.NET configuration tool (this is, I guess, trying to create the necessary database behind the scenes but is unable to connect to the database).

I suspect the error might be related to one or more of the following ...

September last year I installed VS2005 Express and SQL*SERVER Express. Both were fully un-installed when I bought VS2005 Professional before installing the new product.

When I set up SQL*SERVER 2005 Developer I remember choosing an option to have a separate user on my PC with administrative rights. Actually I don't recall much about what I chose but I can't find out where those permissions are managed from.

I've followed various instructions to check that remote access is enabled (despite the fact that I'm local, not remote). TCP and Named Pipes are both enabled (and I stopped then restarted SQL Server). I've checked that the service is started.

The odd thing is that I have had an application connect with the following string ...

SSLCon = new SqlConnection(@."Server=(local)\SSLMJ;Integrated Security = True;" + "Database=SSLTESTRESULTS");

Though the application connection seems to work ok, I think I'm missing out lots of developer functionality because I can't get VS2005 to see the database or server.

Help ?

Further info ...

I found and checked my machine.config file which has the following section ...

<connectionStrings>

<add name="LocalSqlServer" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" />

</connectionStrings>

Could the reference to SQLEXPRESS be causing my problem ? How do I correct this ?

|||Tried commenting out the line beginning <add, but no effect.|||If you are connecting to the Express Edition instance on the same machine as it is running, you do NOT need to configure remote connections. Take a look at your services and see if the SQL Browser service is running. If it isn't running, start the service and try connecting again.|||

Thanks Michael. Using the Surface Area tool I've checked that the database engine and broswer are both running. Agent is not running. Remote Connections are set to both local and remote using both TCP and Named Pipes. However, I'm connecting locally (or trying to).

I'm using SQL Server 2005, not Express.

I don't understand why my application code can connect, but VS2005 can't ?

|||

Sorted - though I don't know why this worked.

Without changing any setup info ...

- went to configure my SqlDataSource as normal

- Instead of expanding the listbox for "Server Name" and finding it empty I typed the fully qualified name "MICKSPC\SSLMJ"

- expanded the list of database names - there they were !

I'd still like to know why VS couldn't find my server ? Any ideas ? "MicksPC" is there in Server Explorer. Expanding it shows the following ...

- Crystal Reports Services

- Event Logs

- Management Classes

- Management Events

- Message Queues

- Performance Counters

- Services

Under services is listed "SQL Server (SSLMJ)" and the properties for that service show it is running with a service name of MSSQL$SSLMJ.

Connecting to SQL Server & XP Service Pack 2

I installed XP Service Pack 2 on my desktop machine which had SQL Server 2000
running on it prior to the install. I have a C# web application that runs
against a local SQL Server database which I cannot get to work now that I
have installed the XP service pack. I have read all of the Microsoft "HOW To"
documents about configuring SQL Server for the Service Pack but I still
cannot get the Web Appliation to communicate with the database. I always get
the "SQL Server does not exist or access denied." error message. I have tried
the following:
1. Added Port 1433 (TCP/IP) to the Firewall Exception List (1433 is the
static port SQL Server is using)
2. Added Port 445 (TCP/IP) to the Firewall Exception List
3. Added the sqlserver.exe file to the Firewall Exception List
The database connection string I am using in the web application is:
server=local;uid=sa;pwd=<password>;database=Resear ch
At this point I am not sure what else to try. I cannot connect to the
database if the Firewall is turned off. Should this be the case? Any
assistance is much appreciated.
Sincerely,
Tom Hessen
Hi Tom,
I had the same problem and decided to look at the other end of the
connection. I was running SQL Server ( Service Pack 2 ). When I upgraded
to SQL Server ( Service Pack 3a ) everything started working again.
"Tom Hessen" <Tom Hessen@.discussions.microsoft.com> wrote in message news:<645A76F5-D701-4411-9720-1C6AC67A7ED5@.microsoft.com>...
> I installed XP Service Pack 2 on my desktop machine which had SQL Server 2000
> running on it prior to the install. I have a C# web application that runs
> against a local SQL Server database which I cannot get to work now that I
> have installed the XP service pack. I have read all of the Microsoft "HOW To"
> documents about configuring SQL Server for the Service Pack but I still
> cannot get the Web Appliation to communicate with the database. I always get
> the "SQL Server does not exist or access denied." error message. I have tried
> the following:
> 1. Added Port 1433 (TCP/IP) to the Firewall Exception List (1433 is the
> static port SQL Server is using)
> 2. Added Port 445 (TCP/IP) to the Firewall Exception List
> 3. Added the sqlserver.exe file to the Firewall Exception List
> The database connection string I am using in the web application is:
> server=local;uid=sa;pwd=<password>;database=Resear ch
> At this point I am not sure what else to try. I cannot connect to the
> database if the Firewall is turned off. Should this be the case? Any
> assistance is much appreciated.
> Sincerely,
> Tom Hessen
|||Hi Tom,
I've had a little trouble posting, but hopefully this will get through.
I also did everything you listed below. It did not work for me
either ( for a java client ).
I then decided to look at the other end of the connection. I was running
SQLServer ( Service Pack 2 ). When I upgraded to SQLServer ( Service Pack
3a ) everything started working again.
Hope this helps,
Mike S.
"Tom Hessen" <Tom Hessen@.discussions.microsoft.com> wrote in message news:<645A76F5-D701-4411-9720-1C6AC67A7ED5@.microsoft.com>...
> I installed XP Service Pack 2 on my desktop machine which had SQL Server 2000
> running on it prior to the install. I have a C# web application that runs
> against a local SQL Server database which I cannot get to work now that I
> have installed the XP service pack. I have read all of the Microsoft "HOW To"
> documents about configuring SQL Server for the Service Pack but I still
> cannot get the Web Appliation to communicate with the database. I always get
> the "SQL Server does not exist or access denied." error message. I have tried
> the following:
> 1. Added Port 1433 (TCP/IP) to the Firewall Exception List (1433 is the
> static port SQL Server is using)
> 2. Added Port 445 (TCP/IP) to the Firewall Exception List
> 3. Added the sqlserver.exe file to the Firewall Exception List
> The database connection string I am using in the web application is:
> server=local;uid=sa;pwd=<password>;database=Resear ch
> At this point I am not sure what else to try. I cannot connect to the
> database if the Firewall is turned off. Should this be the case? Any
> assistance is much appreciated.
> Sincerely,
> Tom Hessen
sqlsql

Connecting to SQL Server & XP Service Pack 2

I installed XP Service Pack 2 on my desktop machine which had SQL Server 2000
running on it prior to the install. I have a C# web application that runs
against a local SQL Server database which I cannot get to work now that I
have installed the XP service pack. I have read all of the Microsoft "HOW To"
documents about configuring SQL Server for the Service Pack but I still
cannot get the Web Appliation to communicate with the database. I always get
the "SQL Server does not exist or access denied." error message. I have tried
the following:
1. Added Port 1433 (TCP/IP) to the Firewall Exception List (1433 is the
static port SQL Server is using)
2. Added Port 445 (TCP/IP) to the Firewall Exception List
3. Added the sqlserver.exe file to the Firewall Exception List
The database connection string I am using in the web application is:
server=local;uid=sa;pwd=<password>;database=Research
At this point I am not sure what else to try. I cannot connect to the
database if the Firewall is turned off. Should this be the case? Any
assistance is much appreciated.
Sincerely,
Tom HessenHi Tom,
I had the same problem and decided to look at the other end of the
connection. I was running SQL Server ( Service Pack 2 ). When I upgraded
to SQL Server ( Service Pack 3a ) everything started working again.
"Tom Hessen" <Tom Hessen@.discussions.microsoft.com> wrote in message news:<645A76F5-D701-4411-9720-1C6AC67A7ED5@.microsoft.com>...
> I installed XP Service Pack 2 on my desktop machine which had SQL Server 2000
> running on it prior to the install. I have a C# web application that runs
> against a local SQL Server database which I cannot get to work now that I
> have installed the XP service pack. I have read all of the Microsoft "HOW To"
> documents about configuring SQL Server for the Service Pack but I still
> cannot get the Web Appliation to communicate with the database. I always get
> the "SQL Server does not exist or access denied." error message. I have tried
> the following:
> 1. Added Port 1433 (TCP/IP) to the Firewall Exception List (1433 is the
> static port SQL Server is using)
> 2. Added Port 445 (TCP/IP) to the Firewall Exception List
> 3. Added the sqlserver.exe file to the Firewall Exception List
> The database connection string I am using in the web application is:
> server=local;uid=sa;pwd=<password>;database=Research
> At this point I am not sure what else to try. I cannot connect to the
> database if the Firewall is turned off. Should this be the case? Any
> assistance is much appreciated.
> Sincerely,
> Tom Hessen|||Hi Tom,
I've had a little trouble posting, but hopefully this will get through.
I also did everything you listed below. It did not work for me
either ( for a java client ).
I then decided to look at the other end of the connection. I was running
SQLServer ( Service Pack 2 ). When I upgraded to SQLServer ( Service Pack
3a ) everything started working again.
Hope this helps,
Mike S.
"Tom Hessen" <Tom Hessen@.discussions.microsoft.com> wrote in message news:<645A76F5-D701-4411-9720-1C6AC67A7ED5@.microsoft.com>...
> I installed XP Service Pack 2 on my desktop machine which had SQL Server 2000
> running on it prior to the install. I have a C# web application that runs
> against a local SQL Server database which I cannot get to work now that I
> have installed the XP service pack. I have read all of the Microsoft "HOW To"
> documents about configuring SQL Server for the Service Pack but I still
> cannot get the Web Appliation to communicate with the database. I always get
> the "SQL Server does not exist or access denied." error message. I have tried
> the following:
> 1. Added Port 1433 (TCP/IP) to the Firewall Exception List (1433 is the
> static port SQL Server is using)
> 2. Added Port 445 (TCP/IP) to the Firewall Exception List
> 3. Added the sqlserver.exe file to the Firewall Exception List
> The database connection string I am using in the web application is:
> server=local;uid=sa;pwd=<password>;database=Research
> At this point I am not sure what else to try. I cannot connect to the
> database if the Firewall is turned off. Should this be the case? Any
> assistance is much appreciated.
> Sincerely,
> Tom Hessen

Connecting to SQL Server

Hi:

I installed SQL Express in one of my Notebook A (XP Pro SP2), I could start writing code with VB6 as it is in local machine (.\Sqlexpress)

At later stage, I used another Notebook B (XP pro SP1). I changed the notebook workgroup with the same name and try to connect to Notebook A with Ethernet Cable using SQLOLEDB to make connection, I had this Error Message

"Test Connection Failed because of an error initialising the provider.[DBNETLIB][Connection Open(Connect()).]SQL Server Does not Exist or Access Denied"

I look thru this forum, I quoted Jens K. Suessmeyer comment

This simply mean that in a network you either will need all users to have their own database OR dedicate a "server" (which can also be a workstation) to host the database as a server attached instance.

So I Presume I could used a PC/Notebook (not a Server) as Database Server?

If I used Windows NT Integrated Security, then I should create user accounts at Notebook A? Or Create User Accounts at SQL Server If i used "Used Specific User Name and Password" to Log in ?

My Intention is If I have 5 PC to log in to Server Automatically whenever they switch on the PC with the VB6 Program executing during start up. It make login to User as transparent as possible.

Thanks

"So I Presume I could used a PC/Notebook (not a Server) as Database Server?"

Yes, indeed you can.

If I used Windows NT Integrated Security, then I should create user accounts at Notebook A? Or Create User Accounts at SQL Server If i used "Used Specific User Name and Password" to Log in ?

If you are in a workgroup the (SQL Server) computers cannot verify the user of another computer as no trust exists between the computers (having the same workgroup name is not a trust). There is a workaround (I would name it hack), to use the same useraccount names and passwords on all computers to logon with Windows Authentication. I would suggest in that case to use SQL Server authentication instead.

"My Intention is If I have 5 PC to log in to Server Automatically whenever they switch on the PC with the VB6 Program executing during start up. It make login to User as transparent as possible."

Use SQL Server logins instead, if you don′t want any user interaction you should use a fixed user name to logon.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.d

Sunday, March 25, 2012

Connecting to SQL or MSDE difficulty !

Hey guys,
I am a newbie here, so please bear with me. I have installed SQL Server 2005 CTP on Machine A and MSDE on Machine B. Both these contain the PUBS database beside others. On Machine C, I have installed "ASP.Net Web Matrix" and I want to be able to connect to either Machine A or B to access the PUBS database. It connects to Machine B, when I put in the Servers IP address. But everytime I try to connect to Machine A, it gives me an error saying, "Unable to connect to the database. To connect to this server you must use SQL Server Management Studio or SQL Server Management objects(SMO) ".
I heard that connection strings are needed to access the SQL Server 2005 but I have no idea where to begin. Do I need to create special users to access the Server or will Windows authentication work ? Could anyone help me out in connecting to the SQL Server 2005 CTP?

Management studio is a separate install under management tools, within SQL Server you don't need permissions if you use integrated. When you install the management studio you can register the MSDE. Hope this helps.

|||I had no problems connecting to the MSDE-based server. It's the SQL Server 2005 that's the problem. Could you tell me what I have to do in Management Studio to get the ASP.Net Application that is running on a client machine to connect to it ? Is there some connection string I have to use ? What about this SMO thing ?
|||Try the link below for a walk through tutorial and related link and I would not use SMO (SQL Server Management Object) it is Microsoft property and experience have thought me not to use Microsoft property in my code when using SQL Server. Hope this helps.
http://weblogs.asp.net/scottgu/archive/2005/08/25/423703.aspx|||I tried all that but nothing seems to work. Could the firewall cause a problem ? If yes, then what can I do to rectify it ?|||Yes the firewall usually removes either TCP/IP or Named Pipes from your protocol stack in SQL Server, right click in Management studio and go to properties then Network Configuration and make sure both TCP/IP and Named Pipes is enabled. Hope this helps.|||I get connected to the SQL Server 2000 from a client machine using Web Matrix. I do this by entering the Server name of the SQL Server, say X250-122 and then connecting to a database on that Server. It gives me no problem at all.
When I try the same but in this case trying to connect to an instance of MSDE instead, named NetSDK, i.e. X250-122\NetSDK, on the same Server where SQL Server 2k is installed, then it gives me the following error :

" Unable to connect to the database. SQL Server does not exist or access denied. ConnectionOpen(Connect())".
I tried everything in my capacity that I could but there doesn't seem to be any solution. The protocols ( TCP/IP, Named Pipes) are enabled too. Could you please tell me how to go about this dilemma I am in. Is there a specific way of connecting to an MSDE instance from a client machine ? Please help !!|||The problem was Asp.net account permissions on the MSDE, register it in the full version and go to the security section in Enterprise Manager and configure the server permissions and then to the database and configure the database permissions for Asp.net in the MSDE instance. Another option is to run sp_grantlogin and sp_grantdbaccess in Query Analyzer against the database in the MSDE instance. Hope this helps.
|||I tried doing what you asked and it was already set by default. Ok, let me give you some more details...
I have a local account on each of these machines A, B, C, named say ROOT. SQL Server 2000 and an instance of MSDE named NetSDK is installed on Machine A. All 3 machines have Windows XP Professional with SP 2. Now if I try connecting M/c B or M/c C to the SQL Server on M/c A through the ROOT logins on each of those machines and using ASP.Net Web Matrix, it connects without any problems. But if I do the same trying to connect to NetSDK, it gives me the error I told you about.
I have given ROOT permissions on the SQL Server and the MSDE instance too. But only SQL Server goes through. Thanks for the help, by the way. I appreciate it !!
P.S. By registering the MSDE instance, what did you mean ? I have to register it under Enterprise Manager right ? Because I did that and under Security, there are logins for Machine A\ASPNET, Machine A\ROOT, etc. These are exactly the same as the ones on the SQL Server.
|||Another Problem has just cropped up !! I tried connecting from Machine A to SQL Server 2005 installed on Machine B using the same ROOT login and it didn't work giving me the following error - Unable to connect to the Database. To connect to this Server you must use SQL Server Management Studio or SQL SMO.
But when I tried connecting to Machine B from Query Analyzer i.e. FILE > Connect > Machine B...it works fine. Could you resolve this problem too besides the MSDE one. Thanks !!|||

By registering a server you can access all SQL Server in your network as local access and you do that at the very top of Enterprise Manager. What you do under security is creating a user access to the server not server registration. I have registered 68 SQL Servers in one XP pro box so you will not run into problem with the few instances you have. hope this helps.

|||I did register both the SQL Server and the MSDE instance named NetSDK, but just the SQL Server is granting access to users over the network and it's giving the same error as before. Is my way of accessing correct...i.e. say X250-122\NetSDK ?|||I tried this too... I created a user named ASPNET on the SQL Server machine and I granted the user access under EM for the MSDE instance NetSDK on the same machine. Then I tried logging in from another machine through WebMatrix and it logged in only to the SQL Server and not the NetSDK instance, giving me this error...Unable to connect to the database, Login Failed. Not associated with a trusted SQL Server connection. What could be the reason for that. I am getting access through all the accounts to the SQL Server but not the MSDE instance !!|||Create a new database in the MSDE do an INSERT INTO from the old database then create permissions for the Server under the security section for Asp.net and for the database in the database. Then you may have to delete the old database, I think you have run into orphaned permissions that are created in the Master but not usable in the database. Run a search for orphaned permissions in the BOL (books online). Hope this helps.|||Thanks...it works fine now. I appreciate your help !!

connecting to SQL on network machine

Hi,
I'm trying to use one of my machines as a database server, just for local network testing/development etc. This machine/server is on my local network via a router.
Can anyone advise me of how, when using VS 2005 Beta 2, to connect to my SQL Server 2005 installation on the server running on my network. ? In the 'add connection' dialogue, what do I put in the 'Server name:' field, (apart from server name...) is it the name of the machine or the IP address of the machine on the network ?
Any and all advise appreicated.
Thanks in advance.

Maybe u need to have the Client SQL and to open the enterprise manager to register a new server group
After that u can use it in ur program
HTH

|||

Hi Smiling,

Thanks for the response. I now have everything running/installed on sql 2005 (named pipes, tcp/ip etc) but still no luck, although I now have an error message:
'A connection was successfully established with the server, but then an error occured during the pre-login handshake.(provider: Named Pipes Provider, error: 0 -No process is on the other end of the pipe.)'
On my sql 2005 machine Named Pipes is Enabled and 'Local Access Only' is set to 'No'. If I disable Named Pipes I get the same error message !
I have tried your suggestion and registered new server group and specified Named Pipes as the Network Protocol etc. no luck.
any further advice appreciated.

|||i have the same problem.. i receive the same error message if i want toconnect to the database (sql 2005 beta 3) through vs2005.
any ideas ?

Connecting to SQL Express Database in C# Application

I'm trying to connect to a sql express database on my local machine, using the following connection string:

SqlConnection thisConnection = new SqlConnection(@."Data Source=C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\Test.mdf");

However, I keep getting an error message saying "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."

Why would my application be trying to connect remotely when the database is on my local machine? And how can I fix this problem?

Thanks

There 'should' be three major components to a connection string: source (or server), catalog (or database), and security information. You have only a source listed.

Check out legitimate SQL Server connection strings at: http://connectionstrings.com/?carrier=sqlserver2005

|||Thanks for the help!

Thursday, March 22, 2012

Connecting to SQL 2005 from other machines

The April CTP was working well but both the June and Sept CTP seem to be having problems with connections outside the local machine. It does not seem to matter how the connection is to be established (from code, from SQL managment studio etc) the same error comes up repeatedly.

Cannot connect to SEPTCTP.

A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: Named Pipes Provider, error: 0 - No process is on the other end of the pipe.) (Microsoft SQL Server, Error: 233)

Any suggestions besides rolling back to the April CTP (our current solution)?

Is the Named Pipes protocol enabled on server?
On server machine, run SQL Server configuration manager,
open SQL Server Network Configurations and enable Named Pipes.
Or switch client to use TCP/IP protocol rather than Named Pipes.

Thanks,
Michael.

P.S. This seems to be general SQL question, you might
get better response in SQL Server Database Engine group,
rather than in this SSIS-specific group.|||I'm not sure why, but we needed to access remote servers with their IP address AND a specific non-standard port once we upgraded to the newest CTP. This seemed fine for our test applications (we're not releasing anything until the final version is released).

Josh|||

This should be fine, provided that client is also configured

to use TCP/IP protocol and appropriate port. But the error

indicates the connection is using Named Pipes protocol.

It seems like the connection or SQL Client defaults is not

configured properly.

I'm not really a pro in SQL Client configuration, forum
SQL Server Database Engine might have people more
knowlegable in this area.

The answer may depend on whether you are using OLEDB or
ADO.NET connection managed, and in former case - SQL Native
OLEDB provider or Microsoft OLEDB provider for SQL Server.

Connecting to SQL 2005

I have insatlled SQL 2005 June CTP on a Windows XP Machine and I am able to
connect to the server within the same box. When I try to connect to the 2005
SQL server from an other desktop using SQL Server Management studio, I get a
timeout error. Can you please help me to fix this.
This is waht I get when I connect to the SQL server from another computer...
===================================
Cannot connect to CWXPTDVZPT62.
===================================
Timeout expired. The timeout period elapsed prior to completion of the
operation or the server is not responding. (.Net SqlClient Data Provider)
For help, click:
http://go.microsoft.com/fwlink?Prod...-2&LinkId=20476
Server Name: CWXPTDVZPT62
Error Number: -2
Severity: 11
State: 0
Program Location:
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
exception, Boolean breakConnection)
at
System.Data.SqlClient.TdsParser. ThrowExceptionAndWarning(TdsParserStateO
bjec
t
stateObj)
at
System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject
stateObj, UInt32 error, Boolean freePacket)
at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult
asyncResult, TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParserStateObject.ReadPacket(Int32
bytesExpected)
at System.Data.SqlClient.TdsParserStateObject.ReadBuffer()
at System.Data.SqlClient.TdsParserStateObject.ReadByte()
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,
SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean
enlistOK)
at
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
owningObject, SqlConnectionString connectionOptions, String newPassword,
Boolean redirectedUserInstance)
at
System.Data.SqlClient.SqlInternalConnectionTds..ctor(SqlConnectionString
connectionOptions, Object providerInfo, String newPassword, SqlConnection
owningObject, Boolean redirectedUserInstance)
at
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOpti
ons
options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
owningConnection)
at
System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbCon
nection owningConnection, DbConnectionPoolGroup poolGroup)
at
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
owningConnection)
at
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at
Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ObjectExplore
r.ValidateConnection(UIConnectionInfo ci, IServerType server)
at
Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUs
er()Hi Mahesh,
Starting with the June CTP version, remote access to an instance of SQL
Server 2005 is off by default. You can enable remote access by using the
Surface Area Configuration (SAC) tool.
On the local server:
1. Point to Start | All Programs | Microsoft SQL Server 2005 CTP |
Configuration Tools | SQL Server Surface Area Configuration
2. From the SAC tool, select Surface Area Configuration for Services and
Connections
3. Under Database Engine, select Remote Connections and then select the
Local and Remote Connections and one of the options under that.
4. Click Apply.
5. You'll need to stop and start the MSSQLSERVER service. You can do that
from the SAC as well. Just click Service under Database Engine and
stop/start the service.
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
"Mahesh" <Mahesh@.discussions.microsoft.com> wrote in message
news:1157ADD8-F678-429F-AB6F-AA22DB1977CD@.microsoft.com...
>I have insatlled SQL 2005 June CTP on a Windows XP Machine and I am able to
> connect to the server within the same box. When I try to connect to the
> 2005
> SQL server from an other desktop using SQL Server Management studio, I get
> a
> timeout error. Can you please help me to fix this.
> This is waht I get when I connect to the SQL server from another
> computer...
> ===================================
> Cannot connect to CWXPTDVZPT62.
> ===================================
> Timeout expired. The timeout period elapsed prior to completion of the
> operation or the server is not responding. (.Net SqlClient Data Provider)
> --
> For help, click:
> http://go.microsoft.com/fwlink?Prod...-2&LinkId=20476
> --
> Server Name: CWXPTDVZPT62
> Error Number: -2
> Severity: 11
> State: 0
>
> --
> Program Location:
> at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
> exception, Boolean breakConnection)
> at
> System.Data.SqlClient.TdsParser. ThrowExceptionAndWarning(TdsParserStateO
bj
ect
> stateObj)
> at
> System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObje
ct
> stateObj, UInt32 error, Boolean freePacket)
> at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult
> asyncResult, TdsParserStateObject stateObj)
> at System.Data.SqlClient.TdsParserStateObject.ReadPacket(Int32
> bytesExpected)
> at System.Data.SqlClient.TdsParserStateObject.ReadBuffer()
> at System.Data.SqlClient.TdsParserStateObject.ReadByte()
> at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,
> SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
> bulkCopyHandler, TdsParserStateObject stateObj)
> at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean
> enlistOK)
> at
> System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnecti
on
> owningObject, SqlConnectionString connectionOptions, String newPassword,
> Boolean redirectedUserInstance)
> at
> System.Data.SqlClient.SqlInternalConnectionTds..ctor(SqlConnectionString
> connectionOptions, Object providerInfo, String newPassword, SqlConnection
> owningObject, Boolean redirectedUserInstance)
> at
> System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOp
tions
> options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
> owningConnection)
> at
> System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC
onnection
> owningConnection, DbConnectionPoolGroup poolGroup)
> at
> System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
> owningConnection)
> at
> System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
> outerConnection, DbConnectionFactory connectionFactory)
> at System.Data.SqlClient.SqlConnection.Open()
> at
> Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ObjectExplo
rer.ValidateConnection(UIConnectionInfo
> ci, IServerType server)
> at
> Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThread
User()
>|||Gail
Thank you for the answer, I checked the Surface area configuration and set
the option to “Local and Remote connections” and select the option to
use
both TCP/IP and named Pipes”.
I tried again to register the 2005 SQL server from Management studio of
another computer. I was able to register/connect only when I selected the
option “Named Pipes” in Connect properties for Network Protocol. When Ne
twork
Protocol option was set to “default” I got Timeout errors.
Also, when I tried to connect to this 2005 SQL server thro SSIS using SQL
Native client, I was able to view the Databases, but when I tested the
connection I got a timeout error.
I can connect to the 2005 server using query analyzer or thro creating an
ODBC.
Please advice.
Thanks again for all your help
Mahesh
"Gail Erickson [MS]" wrote:

> Hi Mahesh,
> Starting with the June CTP version, remote access to an instance of SQL
> Server 2005 is off by default. You can enable remote access by using the
> Surface Area Configuration (SAC) tool.
> On the local server:
> 1. Point to Start | All Programs | Microsoft SQL Server 2005 CTP |
> Configuration Tools | SQL Server Surface Area Configuration
> 2. From the SAC tool, select Surface Area Configuration for Services and
> Connections
> 3. Under Database Engine, select Remote Connections and then select the
> Local and Remote Connections and one of the options under that.
> 4. Click Apply.
> 5. You'll need to stop and start the MSSQLSERVER service. You can do tha
t
> from the SAC as well. Just click Service under Database Engine and
> stop/start the service.
> --
> Gail Erickson [MS]
> SQL Server Documentation Team
> This posting is provided "AS IS" with no warranties, and confers no rights
> "Mahesh" <Mahesh@.discussions.microsoft.com> wrote in message
> news:1157ADD8-F678-429F-AB6F-AA22DB1977CD@.microsoft.com...
>
>|||Hi Mahesh,
Your follow-up questions are a bit out of area of experience. Please post
your questions to the Setup and DTS newsgroups at this link:
http://communities.microsoft.com/ne...p=sqlserver2005
They should be able to give you some advice.
--
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
"Mahesh" <Mahesh@.discussions.microsoft.com> wrote in message
news:8DC49354-F7FC-4979-94A9-3DB20CF6B71E@.microsoft.com...[vbcol=seagreen]
> Gail
> Thank you for the answer, I checked the Surface area configuration and set
> the option to "Local and Remote connections" and select the option to "use
> both TCP/IP and named Pipes".
> I tried again to register the 2005 SQL server from Management studio of
> another computer. I was able to register/connect only when I selected the
> option "Named Pipes" in Connect properties for Network Protocol. When
> Network
> Protocol option was set to "default" I got Timeout errors.
> Also, when I tried to connect to this 2005 SQL server thro SSIS using SQL
> Native client, I was able to view the Databases, but when I tested the
> connection I got a timeout error.
> I can connect to the 2005 server using query analyzer or thro creating an
> ODBC.
> Please advice.
> Thanks again for all your help
> Mahesh
> "Gail Erickson [MS]" wrote:
>

Connecting to SQL 2005

I have insatlled SQL 2005 June CTP on a Windows XP Machine and I am able to
connect to the server within the same box. When I try to connect to the 2005
SQL server from an other desktop using SQL Server Management studio, I get a
timeout error. Can you please help me to fix this.
This is waht I get when I connect to the SQL server from another computer...
===================================
Cannot connect to CWXPTDVZPT62.
===================================
Timeout expired. The timeout period elapsed prior to completion of the
operation or the server is not responding. (.Net SqlClient Data Provider)
For help, click:
http://go.microsoft.com/fwlink?ProdN...2&LinkId=20476
Server Name: CWXPTDVZPT62
Error Number: -2
Severity: 11
State: 0
Program Location:
at System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException
exception, Boolean breakConnection)
at
System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject
stateObj)
at
System.Data.SqlClient.TdsParserStateObject.ReadSni Error(TdsParserStateObject
stateObj, UInt32 error, Boolean freePacket)
at System.Data.SqlClient.TdsParserStateObject.ReadSni (DbAsyncResult
asyncResult, TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParserStateObject.ReadPac ket(Int32
bytesExpected)
at System.Data.SqlClient.TdsParserStateObject.ReadBuf fer()
at System.Data.SqlClient.TdsParserStateObject.ReadByt e()
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,
SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlInternalConnectionTds.Com pleteLogin(Boolean
enlistOK)
at
System.Data.SqlClient.SqlInternalConnectionTds.Ope nLoginEnlist(SqlConnection
owningObject, SqlConnectionString connectionOptions, String newPassword,
Boolean redirectedUserInstance)
at
System.Data.SqlClient.SqlInternalConnectionTds..ct or(SqlConnectionString
connectionOptions, Object providerInfo, String newPassword, SqlConnection
owningObject, Boolean redirectedUserInstance)
at
System.Data.SqlClient.SqlConnectionFactory.CreateC onnection(DbConnectionOptions
options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
owningConnection)
at
System.Data.ProviderBase.DbConnectionFactory.Creat eNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
at
System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection
owningConnection)
at
System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at
Microsoft.SqlServer.Management.UI.VSIntegration.Ob jectExplorer.ObjectExplorer.ValidateConnection(UIC onnectionInfo ci, IServerType server)
at
Microsoft.SqlServer.Management.UI.ConnectionDlg.Co nnector.ConnectionThreadUser()
Hi Mahesh,
Starting with the June CTP version, remote access to an instance of SQL
Server 2005 is off by default. You can enable remote access by using the
Surface Area Configuration (SAC) tool.
On the local server:
1. Point to Start | All Programs | Microsoft SQL Server 2005 CTP |
Configuration Tools | SQL Server Surface Area Configuration
2. From the SAC tool, select Surface Area Configuration for Services and
Connections
3. Under Database Engine, select Remote Connections and then select the
Local and Remote Connections and one of the options under that.
4. Click Apply.
5. You'll need to stop and start the MSSQLSERVER service. You can do that
from the SAC as well. Just click Service under Database Engine and
stop/start the service.
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
"Mahesh" <Mahesh@.discussions.microsoft.com> wrote in message
news:1157ADD8-F678-429F-AB6F-AA22DB1977CD@.microsoft.com...
>I have insatlled SQL 2005 June CTP on a Windows XP Machine and I am able to
> connect to the server within the same box. When I try to connect to the
> 2005
> SQL server from an other desktop using SQL Server Management studio, I get
> a
> timeout error. Can you please help me to fix this.
> This is waht I get when I connect to the SQL server from another
> computer...
> ===================================
> Cannot connect to CWXPTDVZPT62.
> ===================================
> Timeout expired. The timeout period elapsed prior to completion of the
> operation or the server is not responding. (.Net SqlClient Data Provider)
> --
> For help, click:
> http://go.microsoft.com/fwlink?ProdN...2&LinkId=20476
> --
> Server Name: CWXPTDVZPT62
> Error Number: -2
> Severity: 11
> State: 0
>
> --
> Program Location:
> at System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException
> exception, Boolean breakConnection)
> at
> System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject
> stateObj)
> at
> System.Data.SqlClient.TdsParserStateObject.ReadSni Error(TdsParserStateObject
> stateObj, UInt32 error, Boolean freePacket)
> at System.Data.SqlClient.TdsParserStateObject.ReadSni (DbAsyncResult
> asyncResult, TdsParserStateObject stateObj)
> at System.Data.SqlClient.TdsParserStateObject.ReadPac ket(Int32
> bytesExpected)
> at System.Data.SqlClient.TdsParserStateObject.ReadBuf fer()
> at System.Data.SqlClient.TdsParserStateObject.ReadByt e()
> at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,
> SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
> bulkCopyHandler, TdsParserStateObject stateObj)
> at System.Data.SqlClient.SqlInternalConnectionTds.Com pleteLogin(Boolean
> enlistOK)
> at
> System.Data.SqlClient.SqlInternalConnectionTds.Ope nLoginEnlist(SqlConnection
> owningObject, SqlConnectionString connectionOptions, String newPassword,
> Boolean redirectedUserInstance)
> at
> System.Data.SqlClient.SqlInternalConnectionTds..ct or(SqlConnectionString
> connectionOptions, Object providerInfo, String newPassword, SqlConnection
> owningObject, Boolean redirectedUserInstance)
> at
> System.Data.SqlClient.SqlConnectionFactory.CreateC onnection(DbConnectionOptions
> options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
> owningConnection)
> at
> System.Data.ProviderBase.DbConnectionFactory.Creat eNonPooledConnection(DbConnection
> owningConnection, DbConnectionPoolGroup poolGroup)
> at
> System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection
> owningConnection)
> at
> System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection
> outerConnection, DbConnectionFactory connectionFactory)
> at System.Data.SqlClient.SqlConnection.Open()
> at
> Microsoft.SqlServer.Management.UI.VSIntegration.Ob jectExplorer.ObjectExplorer.ValidateConnection(UIC onnectionInfo
> ci, IServerType server)
> at
> Microsoft.SqlServer.Management.UI.ConnectionDlg.Co nnector.ConnectionThreadUser()
>
|||Gail
Thank you for the answer, I checked the Surface area configuration and set
the option to “Local and Remote connections” and select the option to “use
both TCP/IP and named Pipes”.
I tried again to register the 2005 SQL server from Management studio of
another computer. I was able to register/connect only when I selected the
option “Named Pipes” in Connect properties for Network Protocol. When Network
Protocol option was set to “default” I got Timeout errors.
Also, when I tried to connect to this 2005 SQL server thro SSIS using SQL
Native client, I was able to view the Databases, but when I tested the
connection I got a timeout error.
I can connect to the 2005 server using query analyzer or thro creating an
ODBC.
Please advice.
Thanks again for all your help
Mahesh
"Gail Erickson [MS]" wrote:

> Hi Mahesh,
> Starting with the June CTP version, remote access to an instance of SQL
> Server 2005 is off by default. You can enable remote access by using the
> Surface Area Configuration (SAC) tool.
> On the local server:
> 1. Point to Start | All Programs | Microsoft SQL Server 2005 CTP |
> Configuration Tools | SQL Server Surface Area Configuration
> 2. From the SAC tool, select Surface Area Configuration for Services and
> Connections
> 3. Under Database Engine, select Remote Connections and then select the
> Local and Remote Connections and one of the options under that.
> 4. Click Apply.
> 5. You'll need to stop and start the MSSQLSERVER service. You can do that
> from the SAC as well. Just click Service under Database Engine and
> stop/start the service.
> --
> Gail Erickson [MS]
> SQL Server Documentation Team
> This posting is provided "AS IS" with no warranties, and confers no rights
> "Mahesh" <Mahesh@.discussions.microsoft.com> wrote in message
> news:1157ADD8-F678-429F-AB6F-AA22DB1977CD@.microsoft.com...
>
>
|||Hi Mahesh,
Your follow-up questions are a bit out of area of experience. Please post
your questions to the Setup and DTS newsgroups at this link:
http://communities.microsoft.com/new...=sqlserver2005
They should be able to give you some advice.
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
"Mahesh" <Mahesh@.discussions.microsoft.com> wrote in message
news:8DC49354-F7FC-4979-94A9-3DB20CF6B71E@.microsoft.com...[vbcol=seagreen]
> Gail
> Thank you for the answer, I checked the Surface area configuration and set
> the option to "Local and Remote connections" and select the option to "use
> both TCP/IP and named Pipes".
> I tried again to register the 2005 SQL server from Management studio of
> another computer. I was able to register/connect only when I selected the
> option "Named Pipes" in Connect properties for Network Protocol. When
> Network
> Protocol option was set to "default" I got Timeout errors.
> Also, when I tried to connect to this 2005 SQL server thro SSIS using SQL
> Native client, I was able to view the Databases, but when I tested the
> connection I got a timeout error.
> I can connect to the 2005 server using query analyzer or thro creating an
> ODBC.
> Please advice.
> Thanks again for all your help
> Mahesh
> "Gail Erickson [MS]" wrote:

Connecting to SQL 2005

I have insatlled SQL 2005 June CTP on a Windows XP Machine and I am able to
connect to the server within the same box. When I try to connect to the 2005
SQL server from an other desktop using SQL Server Management studio, I get a
timeout error. Can you please help me to fix this.
This is waht I get when I connect to the SQL server from another computer...
===================================
Cannot connect to CWXPTDVZPT62.
===================================
Timeout expired. The timeout period elapsed prior to completion of the
operation or the server is not responding. (.Net SqlClient Data Provider)
--
For help, click:
http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=-2&LinkId=20476
--
Server Name: CWXPTDVZPT62
Error Number: -2
Severity: 11
State: 0
--
Program Location:
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
exception, Boolean breakConnection)
at
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
stateObj)
at
System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject
stateObj, UInt32 error, Boolean freePacket)
at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult
asyncResult, TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParserStateObject.ReadPacket(Int32
bytesExpected)
at System.Data.SqlClient.TdsParserStateObject.ReadBuffer()
at System.Data.SqlClient.TdsParserStateObject.ReadByte()
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,
SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean
enlistOK)
at
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
owningObject, SqlConnectionString connectionOptions, String newPassword,
Boolean redirectedUserInstance)
at
System.Data.SqlClient.SqlInternalConnectionTds..ctor(SqlConnectionString
connectionOptions, Object providerInfo, String newPassword, SqlConnection
owningObject, Boolean redirectedUserInstance)
at
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions
options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
owningConnection)
at
System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
at
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
owningConnection)
at
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at
Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ObjectExplorer.ValidateConnection(UIConnectionInfo ci, IServerType server)
at
Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser()Hi Mahesh,
Starting with the June CTP version, remote access to an instance of SQL
Server 2005 is off by default. You can enable remote access by using the
Surface Area Configuration (SAC) tool.
On the local server:
1. Point to Start | All Programs | Microsoft SQL Server 2005 CTP |
Configuration Tools | SQL Server Surface Area Configuration
2. From the SAC tool, select Surface Area Configuration for Services and
Connections
3. Under Database Engine, select Remote Connections and then select the
Local and Remote Connections and one of the options under that.
4. Click Apply.
5. You'll need to stop and start the MSSQLSERVER service. You can do that
from the SAC as well. Just click Service under Database Engine and
stop/start the service.
--
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
"Mahesh" <Mahesh@.discussions.microsoft.com> wrote in message
news:1157ADD8-F678-429F-AB6F-AA22DB1977CD@.microsoft.com...
>I have insatlled SQL 2005 June CTP on a Windows XP Machine and I am able to
> connect to the server within the same box. When I try to connect to the
> 2005
> SQL server from an other desktop using SQL Server Management studio, I get
> a
> timeout error. Can you please help me to fix this.
> This is waht I get when I connect to the SQL server from another
> computer...
> ===================================> Cannot connect to CWXPTDVZPT62.
> ===================================> Timeout expired. The timeout period elapsed prior to completion of the
> operation or the server is not responding. (.Net SqlClient Data Provider)
> --
> For help, click:
> http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=-2&LinkId=20476
> --
> Server Name: CWXPTDVZPT62
> Error Number: -2
> Severity: 11
> State: 0
>
> --
> Program Location:
> at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
> exception, Boolean breakConnection)
> at
> System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
> stateObj)
> at
> System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject
> stateObj, UInt32 error, Boolean freePacket)
> at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult
> asyncResult, TdsParserStateObject stateObj)
> at System.Data.SqlClient.TdsParserStateObject.ReadPacket(Int32
> bytesExpected)
> at System.Data.SqlClient.TdsParserStateObject.ReadBuffer()
> at System.Data.SqlClient.TdsParserStateObject.ReadByte()
> at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,
> SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
> bulkCopyHandler, TdsParserStateObject stateObj)
> at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean
> enlistOK)
> at
> System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
> owningObject, SqlConnectionString connectionOptions, String newPassword,
> Boolean redirectedUserInstance)
> at
> System.Data.SqlClient.SqlInternalConnectionTds..ctor(SqlConnectionString
> connectionOptions, Object providerInfo, String newPassword, SqlConnection
> owningObject, Boolean redirectedUserInstance)
> at
> System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions
> options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
> owningConnection)
> at
> System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection
> owningConnection, DbConnectionPoolGroup poolGroup)
> at
> System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
> owningConnection)
> at
> System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
> outerConnection, DbConnectionFactory connectionFactory)
> at System.Data.SqlClient.SqlConnection.Open()
> at
> Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ObjectExplorer.ValidateConnection(UIConnectionInfo
> ci, IServerType server)
> at
> Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser()
>|||Gail
Thank you for the answer, I checked the Surface area configuration and set
the option to â'Local and Remote connectionsâ' and select the option to â'use
both TCP/IP and named Pipesâ'.
I tried again to register the 2005 SQL server from Management studio of
another computer. I was able to register/connect only when I selected the
option â'Named Pipesâ' in Connect properties for Network Protocol. When Network
Protocol option was set to â'defaultâ' I got Timeout errors.
Also, when I tried to connect to this 2005 SQL server thro SSIS using SQL
Native client, I was able to view the Databases, but when I tested the
connection I got a timeout error.
I can connect to the 2005 server using query analyzer or thro creating an
ODBC.
Please advice.
Thanks again for all your help
Mahesh
"Gail Erickson [MS]" wrote:
> Hi Mahesh,
> Starting with the June CTP version, remote access to an instance of SQL
> Server 2005 is off by default. You can enable remote access by using the
> Surface Area Configuration (SAC) tool.
> On the local server:
> 1. Point to Start | All Programs | Microsoft SQL Server 2005 CTP |
> Configuration Tools | SQL Server Surface Area Configuration
> 2. From the SAC tool, select Surface Area Configuration for Services and
> Connections
> 3. Under Database Engine, select Remote Connections and then select the
> Local and Remote Connections and one of the options under that.
> 4. Click Apply.
> 5. You'll need to stop and start the MSSQLSERVER service. You can do that
> from the SAC as well. Just click Service under Database Engine and
> stop/start the service.
> --
> Gail Erickson [MS]
> SQL Server Documentation Team
> This posting is provided "AS IS" with no warranties, and confers no rights
> "Mahesh" <Mahesh@.discussions.microsoft.com> wrote in message
> news:1157ADD8-F678-429F-AB6F-AA22DB1977CD@.microsoft.com...
> >I have insatlled SQL 2005 June CTP on a Windows XP Machine and I am able to
> > connect to the server within the same box. When I try to connect to the
> > 2005
> > SQL server from an other desktop using SQL Server Management studio, I get
> > a
> > timeout error. Can you please help me to fix this.
> >
> > This is waht I get when I connect to the SQL server from another
> > computer...
> > ===================================> >
> > Cannot connect to CWXPTDVZPT62.
> >
> > ===================================> >
> > Timeout expired. The timeout period elapsed prior to completion of the
> > operation or the server is not responding. (.Net SqlClient Data Provider)
> >
> > --
> > For help, click:
> > http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=-2&LinkId=20476
> >
> > --
> > Server Name: CWXPTDVZPT62
> > Error Number: -2
> > Severity: 11
> > State: 0
> >
> >
> > --
> > Program Location:
> >
> > at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
> > exception, Boolean breakConnection)
> > at
> > System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
> > stateObj)
> > at
> > System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject
> > stateObj, UInt32 error, Boolean freePacket)
> > at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult
> > asyncResult, TdsParserStateObject stateObj)
> > at System.Data.SqlClient.TdsParserStateObject.ReadPacket(Int32
> > bytesExpected)
> > at System.Data.SqlClient.TdsParserStateObject.ReadBuffer()
> > at System.Data.SqlClient.TdsParserStateObject.ReadByte()
> > at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,
> > SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
> > bulkCopyHandler, TdsParserStateObject stateObj)
> > at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean
> > enlistOK)
> > at
> > System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
> > owningObject, SqlConnectionString connectionOptions, String newPassword,
> > Boolean redirectedUserInstance)
> > at
> > System.Data.SqlClient.SqlInternalConnectionTds..ctor(SqlConnectionString
> > connectionOptions, Object providerInfo, String newPassword, SqlConnection
> > owningObject, Boolean redirectedUserInstance)
> > at
> > System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions
> > options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
> > owningConnection)
> > at
> > System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection
> > owningConnection, DbConnectionPoolGroup poolGroup)
> > at
> > System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
> > owningConnection)
> > at
> > System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
> > outerConnection, DbConnectionFactory connectionFactory)
> > at System.Data.SqlClient.SqlConnection.Open()
> > at
> > Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ObjectExplorer.ValidateConnection(UIConnectionInfo
> > ci, IServerType server)
> > at
> > Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser()
> >
> >
>
>|||Hi Mahesh,
Your follow-up questions are a bit out of area of experience. Please post
your questions to the Setup and DTS newsgroups at this link:
http://communities.microsoft.com/newsgroups/default.asp?icp=sqlserver2005
They should be able to give you some advice.
--
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
"Mahesh" <Mahesh@.discussions.microsoft.com> wrote in message
news:8DC49354-F7FC-4979-94A9-3DB20CF6B71E@.microsoft.com...
> Gail
> Thank you for the answer, I checked the Surface area configuration and set
> the option to "Local and Remote connections" and select the option to "use
> both TCP/IP and named Pipes".
> I tried again to register the 2005 SQL server from Management studio of
> another computer. I was able to register/connect only when I selected the
> option "Named Pipes" in Connect properties for Network Protocol. When
> Network
> Protocol option was set to "default" I got Timeout errors.
> Also, when I tried to connect to this 2005 SQL server thro SSIS using SQL
> Native client, I was able to view the Databases, but when I tested the
> connection I got a timeout error.
> I can connect to the 2005 server using query analyzer or thro creating an
> ODBC.
> Please advice.
> Thanks again for all your help
> Mahesh
> "Gail Erickson [MS]" wrote:
>> Hi Mahesh,
>> Starting with the June CTP version, remote access to an instance of SQL
>> Server 2005 is off by default. You can enable remote access by using the
>> Surface Area Configuration (SAC) tool.
>> On the local server:
>> 1. Point to Start | All Programs | Microsoft SQL Server 2005 CTP |
>> Configuration Tools | SQL Server Surface Area Configuration
>> 2. From the SAC tool, select Surface Area Configuration for Services and
>> Connections
>> 3. Under Database Engine, select Remote Connections and then select the
>> Local and Remote Connections and one of the options under that.
>> 4. Click Apply.
>> 5. You'll need to stop and start the MSSQLSERVER service. You can do
>> that
>> from the SAC as well. Just click Service under Database Engine and
>> stop/start the service.
>> --
>> Gail Erickson [MS]
>> SQL Server Documentation Team
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights
>> "Mahesh" <Mahesh@.discussions.microsoft.com> wrote in message
>> news:1157ADD8-F678-429F-AB6F-AA22DB1977CD@.microsoft.com...
>> >I have insatlled SQL 2005 June CTP on a Windows XP Machine and I am able
>> >to
>> > connect to the server within the same box. When I try to connect to the
>> > 2005
>> > SQL server from an other desktop using SQL Server Management studio, I
>> > get
>> > a
>> > timeout error. Can you please help me to fix this.
>> >
>> > This is waht I get when I connect to the SQL server from another
>> > computer...
>> > ===================================>> >
>> > Cannot connect to CWXPTDVZPT62.
>> >
>> > ===================================>> >
>> > Timeout expired. The timeout period elapsed prior to completion of the
>> > operation or the server is not responding. (.Net SqlClient Data
>> > Provider)
>> >
>> > --
>> > For help, click:
>> > http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=-2&LinkId=20476
>> >
>> > --
>> > Server Name: CWXPTDVZPT62
>> > Error Number: -2
>> > Severity: 11
>> > State: 0
>> >
>> >
>> > --
>> > Program Location:
>> >
>> > at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
>> > exception, Boolean breakConnection)
>> > at
>> > System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
>> > stateObj)
>> > at
>> > System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject
>> > stateObj, UInt32 error, Boolean freePacket)
>> > at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult
>> > asyncResult, TdsParserStateObject stateObj)
>> > at System.Data.SqlClient.TdsParserStateObject.ReadPacket(Int32
>> > bytesExpected)
>> > at System.Data.SqlClient.TdsParserStateObject.ReadBuffer()
>> > at System.Data.SqlClient.TdsParserStateObject.ReadByte()
>> > at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,
>> > SqlCommand cmdHandler, SqlDataReader dataStream,
>> > BulkCopySimpleResultSet
>> > bulkCopyHandler, TdsParserStateObject stateObj)
>> > at
>> > System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean
>> > enlistOK)
>> > at
>> > System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
>> > owningObject, SqlConnectionString connectionOptions, String
>> > newPassword,
>> > Boolean redirectedUserInstance)
>> > at
>> > System.Data.SqlClient.SqlInternalConnectionTds..ctor(SqlConnectionString
>> > connectionOptions, Object providerInfo, String newPassword,
>> > SqlConnection
>> > owningObject, Boolean redirectedUserInstance)
>> > at
>> > System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions
>> > options, Object poolGroupProviderInfo, DbConnectionPool pool,
>> > DbConnection
>> > owningConnection)
>> > at
>> > System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection
>> > owningConnection, DbConnectionPoolGroup poolGroup)
>> > at
>> > System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
>> > owningConnection)
>> > at
>> > System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
>> > outerConnection, DbConnectionFactory connectionFactory)
>> > at System.Data.SqlClient.SqlConnection.Open()
>> > at
>> > Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ObjectExplorer.ValidateConnection(UIConnectionInfo
>> > ci, IServerType server)
>> > at
>> > Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser()
>> >
>> >
>>

Connecting to Remote SQL Server

Hi all,

I have been encountering problems in connectiing to an sql server remotely. I have a SQL Server installed on a machine with a public IP. I am, running an application on one of my other Servers having a Public IP as well. Now i want to access the SQL Server Database of my first machine from my second machine, but i cannot get connected to it. I give the IP address of the machine in the connection string but it fails. I have also tried it with the port number. What could possibly be the solution for a problem like this ?

Regards.

Hi there,

Maybe It caused by your windows firewall ! the initial status of Windows Firewall is on.
Check the status by turning off your windows firewall on SQL Server machine.

Babak Izadi
LotraSoft Ltd.

|||

By default, SQL Server 2005 does not allows remote connections. To configure SQL Server 2005 to allow remote connections, complete all the following steps:

1.Select the SQL Server Surface Area Configuration tool from the Configuration Tools and then click Surface Area Configuration for Services and Connections option. expand Database Engine, click Remote Connections, click Local and remote connections, click the appropriate protocol to enable for your environment, and then click Apply and Ok for restarting the Database engine service.

2. Try adding sqlservr.exe (present in MSSQL.1\MSSQL\Binn directory for the default instance and \MSSQL$instance_name\Binn directory for the named instance) in the list of allowed firewall exceptions on the Windows 2003 box.

Regards,

Rajesh

|||

Can the two servers ping each other?

from serverA run in a command prompt: "ping serverB"

from serverB run in a command prompt: "ping serverA"

If one of the two fails, you probably have a network problem

Else look at the above post's (Rajesh) instructions

|||Can you check whether there are any issues with WINS issue on the network, ifyou are not able to register with name as explained you might try PING between the boxes and also check the firewall exception in this case to avoid any other barrier.

Tuesday, March 20, 2012

Connecting to online database using local Enterprise Manager

I have Enterprise Manager on my local machine. For the last twelve
months it has been connecting without problem to my online SQL Server
database provided by my ISP.

Three weeks ago the ISP applied some sort of extra security
arrangements to their SQL Server to allow access only through port
1433. they have told me to configure an alias using Network Client and
to register this alias in the usual way using my Enterprise Manager.

My problem is that despite creating the alias in exactly the way
instructed I just cannot connect to online database. I keep getting
the SQL Server does not exist or access denied when I try to connect.

As a result of advice obtained I have tried using the lite version of
the 'littleADmin' tool available from
http://www.mylittletools.net/scripts/en/mla_sql/

Using this useful looking software I find I cannot connect to the
online SQL database when it is installed on my own local machine but
if I install it on my website it does connect without problem to my
online SQL. Server database

However I need to use my more powerful Enterprise Manager to connect,
my question (at last!) is:

1. Is there likely to be a problem trying to connect to my online
database from Enterprise Manager on my local machine as a result of
the new security arrangements. In other words, is there something
analagous to what is happening with the 'littleAdmin tool' whereby
using Enterprise Manager I cannot connect from my local machine for
some reason obvious to everyone except myself??
or
2. Is it possible that there is some problem arising from Net Client?
(the aliases appear in Enterprise Manager OK)

I know my ISP should be answering this sort of question but they just
don't seem to know. I need to connect even if only to download my
database and take it to another ISP,

Best wishes, John MorganJohn Morgan (jfm@.XXwoodlander.co.uk) writes:
> I have Enterprise Manager on my local machine. For the last twelve
> months it has been connecting without problem to my online SQL Server
> database provided by my ISP.
> Three weeks ago the ISP applied some sort of extra security
> arrangements to their SQL Server to allow access only through port
> 1433. they have told me to configure an alias using Network Client and
> to register this alias in the usual way using my Enterprise Manager.
> My problem is that despite creating the alias in exactly the way
> instructed I just cannot connect to online database. I keep getting
> the SQL Server does not exist or access denied when I try to connect.
>...
> I know my ISP should be answering this sort of question but they just
> don't seem to know. I need to connect even if only to download my
> database and take it to another ISP,

And we don't even know their configuration. Or yours.

Can you connect with the IP address?

In the alias you have set up in Client Network Utility, have you checked
TCP/IP, entered the IP address, and unchecked "Dynamically determine port"
and specified 1433?

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Hi John

Check out the information regarding port 1434 and MSDE.
http://msdn.microsoft.com/library/d...asp?frame=true

John

"John Morgan" <jfm@.XXwoodlander.co.uk> wrote in message
news:uhu3s09t8k7ngckgm5tjvq53bh1h76a3v0@.4ax.com...
>I have Enterprise Manager on my local machine. For the last twelve
> months it has been connecting without problem to my online SQL Server
> database provided by my ISP.
> Three weeks ago the ISP applied some sort of extra security
> arrangements to their SQL Server to allow access only through port
> 1433. they have told me to configure an alias using Network Client and
> to register this alias in the usual way using my Enterprise Manager.
> My problem is that despite creating the alias in exactly the way
> instructed I just cannot connect to online database. I keep getting
> the SQL Server does not exist or access denied when I try to connect.
> As a result of advice obtained I have tried using the lite version of
> the 'littleADmin' tool available from
> http://www.mylittletools.net/scripts/en/mla_sql/
> Using this useful looking software I find I cannot connect to the
> online SQL database when it is installed on my own local machine but
> if I install it on my website it does connect without problem to my
> online SQL. Server database
> However I need to use my more powerful Enterprise Manager to connect,
> my question (at last!) is:
> 1. Is there likely to be a problem trying to connect to my online
> database from Enterprise Manager on my local machine as a result of
> the new security arrangements. In other words, is there something
> analagous to what is happening with the 'littleAdmin tool' whereby
> using Enterprise Manager I cannot connect from my local machine for
> some reason obvious to everyone except myself??
> or
> 2. Is it possible that there is some problem arising from Net Client?
> (the aliases appear in Enterprise Manager OK)
> I know my ISP should be answering this sort of question but they just
> don't seem to know. I need to connect even if only to download my
> database and take it to another ISP,
> Best wishes, John Morgan|||Thank you Erland and JOhn

Re fixed IP address: my ISP tells me that as I do not have a fixed IP
address it means I cannot allow me access based on my IP address.

Yes, I have checked and rechecked that the Client Network Utility is
showing TCP/IP and that the 1433 port is specified.

I have looked at the Microsoft article suggested by John. This appears
to indicate that unless everything on the computer is upgraded then
port 1434 will be used when connecting online.

I have now uninstalled my current version of MSDE and attempted to
install a new default instance using the SP3a disk. this has brought
its own problem in that the apparently successfully installed new
version still reads 'Build 2600 Service Pack 1'

I have asked for advice on this on the MSDE News group but if you had
an insight into this it would be welcome,

Best wishes, John Morgan

On Thu, 16 Dec 2004 22:24:55 -0000, "John Bell"
<jbellnewsposts@.hotmail.com> wrote:

>Hi John
>Check out the information regarding port 1434 and MSDE.
>http://msdn.microsoft.com/library/d...asp?frame=true
>John
>"John Morgan" <jfm@.XXwoodlander.co.uk> wrote in message
>news:uhu3s09t8k7ngckgm5tjvq53bh1h76a3v0@.4ax.com...
>>I have Enterprise Manager on my local machine. For the last twelve
>> months it has been connecting without problem to my online SQL Server
>> database provided by my ISP.
>>
>> Three weeks ago the ISP applied some sort of extra security
>> arrangements to their SQL Server to allow access only through port
>> 1433. they have told me to configure an alias using Network Client and
>> to register this alias in the usual way using my Enterprise Manager.
>>
>> My problem is that despite creating the alias in exactly the way
>> instructed I just cannot connect to online database. I keep getting
>> the SQL Server does not exist or access denied when I try to connect.
>>
>> As a result of advice obtained I have tried using the lite version of
>> the 'littleADmin' tool available from
>> http://www.mylittletools.net/scripts/en/mla_sql/
>>
>> Using this useful looking software I find I cannot connect to the
>> online SQL database when it is installed on my own local machine but
>> if I install it on my website it does connect without problem to my
>> online SQL. Server database
>>
>> However I need to use my more powerful Enterprise Manager to connect,
>> my question (at last!) is:
>>
>> 1. Is there likely to be a problem trying to connect to my online
>> database from Enterprise Manager on my local machine as a result of
>> the new security arrangements. In other words, is there something
>> analagous to what is happening with the 'littleAdmin tool' whereby
>> using Enterprise Manager I cannot connect from my local machine for
>> some reason obvious to everyone except myself??
>> or
>> 2. Is it possible that there is some problem arising from Net Client?
>> (the aliases appear in Enterprise Manager OK)
>>
>> I know my ISP should be answering this sort of question but they just
>> don't seem to know. I need to connect even if only to download my
>> database and take it to another ISP,
>>
>> Best wishes, John Morgan|||Hi

Before 'Build 2600 Service Pack 1' it probably says "on Windows NT 5.1" i.e.
you are on Windows XP service pack 1. What does the first (few) line of
@.@.Version return?

I am not sure if I have already posted
http://support.microsoft.com/defaul...kb;en-us;287932, but what
does netstat -an return?

John

"John Morgan" <jfm@.XXwoodlander.co.uk> wrote in message
news:3hj6s0hcgim5b3u00uan9mfbqpvrk71537@.4ax.com...
> Thank you Erland and JOhn
> Re fixed IP address: my ISP tells me that as I do not have a fixed IP
> address it means I cannot allow me access based on my IP address.
> Yes, I have checked and rechecked that the Client Network Utility is
> showing TCP/IP and that the 1433 port is specified.
> I have looked at the Microsoft article suggested by John. This appears
> to indicate that unless everything on the computer is upgraded then
> port 1434 will be used when connecting online.
> I have now uninstalled my current version of MSDE and attempted to
> install a new default instance using the SP3a disk. this has brought
> its own problem in that the apparently successfully installed new
> version still reads 'Build 2600 Service Pack 1'
> I have asked for advice on this on the MSDE News group but if you had
> an insight into this it would be welcome,
> Best wishes, John Morgan
>
> On Thu, 16 Dec 2004 22:24:55 -0000, "John Bell"
> <jbellnewsposts@.hotmail.com> wrote:
>>Hi John
>>
>>Check out the information regarding port 1434 and MSDE.
>>http://msdn.microsoft.com/library/d...asp?frame=true
>>
>>John
>>
>>"John Morgan" <jfm@.XXwoodlander.co.uk> wrote in message
>>news:uhu3s09t8k7ngckgm5tjvq53bh1h76a3v0@.4ax.com...
>>>I have Enterprise Manager on my local machine. For the last twelve
>>> months it has been connecting without problem to my online SQL Server
>>> database provided by my ISP.
>>>
>>> Three weeks ago the ISP applied some sort of extra security
>>> arrangements to their SQL Server to allow access only through port
>>> 1433. they have told me to configure an alias using Network Client and
>>> to register this alias in the usual way using my Enterprise Manager.
>>>
>>> My problem is that despite creating the alias in exactly the way
>>> instructed I just cannot connect to online database. I keep getting
>>> the SQL Server does not exist or access denied when I try to connect.
>>>
>>> As a result of advice obtained I have tried using the lite version of
>>> the 'littleADmin' tool available from
>>> http://www.mylittletools.net/scripts/en/mla_sql/
>>>
>>> Using this useful looking software I find I cannot connect to the
>>> online SQL database when it is installed on my own local machine but
>>> if I install it on my website it does connect without problem to my
>>> online SQL. Server database
>>>
>>> However I need to use my more powerful Enterprise Manager to connect,
>>> my question (at last!) is:
>>>
>>> 1. Is there likely to be a problem trying to connect to my online
>>> database from Enterprise Manager on my local machine as a result of
>>> the new security arrangements. In other words, is there something
>>> analagous to what is happening with the 'littleAdmin tool' whereby
>>> using Enterprise Manager I cannot connect from my local machine for
>>> some reason obvious to everyone except myself??
>>> or
>>> 2. Is it possible that there is some problem arising from Net Client?
>>> (the aliases appear in Enterprise Manager OK)
>>>
>>> I know my ISP should be answering this sort of question but they just
>>> don't seem to know. I need to connect even if only to download my
>>> database and take it to another ISP,
>>>
>>> Best wishes, John Morgan
>sqlsql

Connecting to Northwind on SQL Server 2000

I've just installed SQL Server 2000 on my local machine. I'm using the following element in my web.config file for my connection string.

<add key="SqlNWind512" value="server=(local)\141.705.84.745;database=Northwind;
user id=sa;pwd=h3fe8eq7;packet size=512;" /
Unfortunately, I'm getting the following error on my aspx page:

SQL Server does not exist or access denied.

I had no problem writing a connection string to connect to the MSDE installed on my computer, but making a connection to the Northwind database on my newly installed SQL Server 2000 Developer edition has been elusive to me.

I'm sure my IP address is correct. The authentication mode for logging into the database via Enterprise Manager is setup to require a password for sa. Therefore, I assume it's required in the connection string?

Maybe not so coincidentally, while I have been able to open this database through the Server Explorer in VS.NET, I'm not able to access it via Enterprise Mananger (no response, it just hangs) or my aspx pages.

I'm dying here!!! Is my connection string wrong? Any insights would be greatly appreciated!just server=<ip address
forget the (local) bit if it's not local.|||Thank you!|||word to the wise..
Don't put your password to your database online on forums.

h3fe8eq7 can be a very bad thing.

Monday, March 19, 2012

Connecting to MSDE Thru VB Without Machine Name

In order to avoid having to know the machine name, I am thinking about
using the following VB code to connect to an instance of MSDE.
It enumerates all possible SQL Servers and if it finds one with
my instance name string, it uses the string to connect.
I believe it was Andrea who showed me the SQLDMO stuff ...
The code does work on my machine - I am just wondering if it is a
good strategy when deploying the app. to a wide audience.
The installation of MSDE will always install an instance of "SQLINSTEQU".
Public Sub Init_App()
'
' First check that database is running.
'
Dim i As Integer
Dim oNames As SQLDMO.NameList
Dim oSQLApp As SQLDMO.Application
Dim Sqlserver_Running As String
Dim msgtext As String
Set oSQLApp = New SQLDMO.Application
Dim ws_Server_Str As String
Dim str_Pos As Integer
Dim ws_EquServer_Str As String
Set oNames = oSQLApp.ListAvailableSQLServers()
Sqlserver_Running = "NO"
'
' Search all available SQL Servers for a \\ServerName\InstanceName
' that has SQLINSTEQU as the instance name. If found, use the whole
' \\ServerName\InstanceName string to connect to the database.
' Hopefully this will work and then do not have to worry about machine
name.
'
For i = 1 To oNames.Count
ws_Server_Str = oNames(i)
strPos = InStr(ws_Server_Str, "SQLINSTEQU")
If strPos > 0 Then
ws_EquServer_Str = ws_Server_Str
Sqlserver_Running = "YES"
Exit For
End If
Next i
If Sqlserver_Running = "NO" Then
msgtext = "The database is not running. Please start your" & _
vbCr & "database and then re-start the application."
MsgBox msgtext
Set oSQLApp = Nothing
Set oNames = Nothing
End
End If
Set oSQLApp = Nothing
Set oNames = Nothing
'
' Establish a connection with the database using the OLE DB provider
' for SQL Server (SQLOLEDB). This provider does not need a data source
' or an existing ODBC driver. It is a native driver for MS SqlServer.
'
cn.ConnectionString = "PROVIDER=SQLOLEDB" & _
";SERVER=" & ws_EquServer_Str & _
";UID=sa" & _
";PWD=abcdefg" & _
";DATABASE=Equ"
cn.Open
End Sub
Paul,
Unfortunately, in practice, the enumeration of SQL Servers is not reliable. I believe that Gert has some
technical elaborations about this on www.sqldev.net, please check that out before decoding on this strategy.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Paul McTeigue" <paul_mcteigue@.msn.com> wrote in message news:OC7DHeZIEHA.3820@.tk2msftngp13.phx.gbl...
> In order to avoid having to know the machine name, I am thinking about
> using the following VB code to connect to an instance of MSDE.
> It enumerates all possible SQL Servers and if it finds one with
> my instance name string, it uses the string to connect.
> I believe it was Andrea who showed me the SQLDMO stuff ...
> The code does work on my machine - I am just wondering if it is a
> good strategy when deploying the app. to a wide audience.
> The installation of MSDE will always install an instance of "SQLINSTEQU".
>
> Public Sub Init_App()
> '
> ' First check that database is running.
> '
> Dim i As Integer
> Dim oNames As SQLDMO.NameList
> Dim oSQLApp As SQLDMO.Application
> Dim Sqlserver_Running As String
> Dim msgtext As String
> Set oSQLApp = New SQLDMO.Application
> Dim ws_Server_Str As String
> Dim str_Pos As Integer
> Dim ws_EquServer_Str As String
>
> Set oNames = oSQLApp.ListAvailableSQLServers()
> Sqlserver_Running = "NO"
> '
> ' Search all available SQL Servers for a \\ServerName\InstanceName
> ' that has SQLINSTEQU as the instance name. If found, use the whole
> ' \\ServerName\InstanceName string to connect to the database.
> ' Hopefully this will work and then do not have to worry about machine
> name.
> '
> For i = 1 To oNames.Count
> ws_Server_Str = oNames(i)
> strPos = InStr(ws_Server_Str, "SQLINSTEQU")
> If strPos > 0 Then
> ws_EquServer_Str = ws_Server_Str
> Sqlserver_Running = "YES"
> Exit For
> End If
> Next i
>
> If Sqlserver_Running = "NO" Then
> msgtext = "The database is not running. Please start your" & _
> vbCr & "database and then re-start the application."
> MsgBox msgtext
> Set oSQLApp = Nothing
> Set oNames = Nothing
> End
> End If
> Set oSQLApp = Nothing
> Set oNames = Nothing
> '
> ' Establish a connection with the database using the OLE DB provider
> ' for SQL Server (SQLOLEDB). This provider does not need a data source
> ' or an existing ODBC driver. It is a native driver for MS SqlServer.
> '
>
> cn.ConnectionString = "PROVIDER=SQLOLEDB" & _
> ";SERVER=" & ws_EquServer_Str & _
> ";UID=sa" & _
> ";PWD=abcdefg" & _
> ";DATABASE=Equ"
>
> cn.Open
> End Sub
>
|||I searched that site you mentioned and could find nothing that said this
method was unreliable. On the contrary, I found an example that did just
that which can be found here:
http://www.sqldev.net/sqldmo/SamplesVB6.htm
I would appreciate it if you could back up your response with a link.
Thanks anyways ...
Paul
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:uB1$x7ZIEHA.720@.TK2MSFTNGP10.phx.gbl...
> Paul,
> Unfortunately, in practice, the enumeration of SQL Servers is not
reliable. I believe that Gert has some
> technical elaborations about this on www.sqldev.net, please check that out
before decoding on this strategy.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
>
> "Paul McTeigue" <paul_mcteigue@.msn.com> wrote in message
news:OC7DHeZIEHA.3820@.tk2msftngp13.phx.gbl...[color=darkblue]
"SQLINSTEQU".
>
|||I phrased it "in practice", but perhaps should have quoted the word "reliable" as well. Anyhow, check out
below:
http://www.sqldev.net/misc/OleDbEnum.htm
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Paul McTeigue" <paul_mcteigue@.msn.com> wrote in message news:OXBvaHaIEHA.3144@.TK2MSFTNGP10.phx.gbl...
> I searched that site you mentioned and could find nothing that said this
> method was unreliable. On the contrary, I found an example that did just
> that which can be found here:
> http://www.sqldev.net/sqldmo/SamplesVB6.htm
> I would appreciate it if you could back up your response with a link.
> Thanks anyways ...
> Paul
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
> message news:uB1$x7ZIEHA.720@.TK2MSFTNGP10.phx.gbl...
> reliable. I believe that Gert has some
> before decoding on this strategy.
> news:OC7DHeZIEHA.3820@.tk2msftngp13.phx.gbl...
> "SQLINSTEQU".
>
|||Tibor:
That is NOT the method I proposed.
Paul
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%23zGcXSaIEHA.828@.TK2MSFTNGP12.phx.gbl...
> I phrased it "in practice", but perhaps should have quoted the word
"reliable" as well. Anyhow, check out
> below:
> http://www.sqldev.net/misc/OleDbEnum.htm
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
>
> "Paul McTeigue" <paul_mcteigue@.msn.com> wrote in message
news:OXBvaHaIEHA.3144@.TK2MSFTNGP10.phx.gbl...[color=darkblue]
in[color=darkblue]
out[color=darkblue]
about[color=darkblue]
whole[color=darkblue]
machine[color=darkblue]
source[color=darkblue]
SqlServer.
>
|||If you read the DMO documentation, you will see that the DMO ListAvailableSevers method uses the ODBC
SQLBrowseConnect function, which means that the weaknesses that this function has is also in the DMO method.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Paul McTeigue" <paul_mcteigue@.msn.com> wrote in message news:uBvSUyaIEHA.3508@.TK2MSFTNGP09.phx.gbl...
> Tibor:
> That is NOT the method I proposed.
> Paul
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
> message news:%23zGcXSaIEHA.828@.TK2MSFTNGP12.phx.gbl...
> "reliable" as well. Anyhow, check out
> news:OXBvaHaIEHA.3144@.TK2MSFTNGP10.phx.gbl...
> in
> out
> about
> whole
> machine
> source
> SqlServer.
>
|||Hi Paul,
Believe Tibor on this one. He's dead right.
Even with the new enumeration options shown in the PDC release of Whidbey,
I've seen similar problems. Under the covers, most of these functions rely
on collecting browser packets.
Many of these "browse" type functions take ages to work on the network. Even
common browsing functions can take up to 24 minutes to settle to a stable
state. So, sometimes, they'll work, sometimes they won't.
Even searching for instances on the local system currently involves
searching the registry and making allowances for the different registry
structures created by different versions.
HTH,
Greg Low (MVP)
MSDE Manager SQL Tools
www.whitebearconsulting.com
"Paul McTeigue" <paul_mcteigue@.msn.com> wrote in message
news:OXBvaHaIEHA.3144@.TK2MSFTNGP10.phx.gbl...
> I searched that site you mentioned and could find nothing that said this
> method was unreliable. On the contrary, I found an example that did just
> that which can be found here:
> http://www.sqldev.net/sqldmo/SamplesVB6.htm
> I would appreciate it if you could back up your response with a link.
> Thanks anyways ...
> Paul
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
in[vbcol=seagreen]
> message news:uB1$x7ZIEHA.720@.TK2MSFTNGP10.phx.gbl...
> reliable. I believe that Gert has some
out[vbcol=seagreen]
> before decoding on this strategy.
> news:OC7DHeZIEHA.3820@.tk2msftngp13.phx.gbl...
> "SQLINSTEQU".
machine
>
|||hi Paul,
"Paul McTeigue" <paul_mcteigue@.msn.com> ha scritto nel messaggio
news:uBvSUyaIEHA.3508@.TK2MSFTNGP09.phx.gbl...
> Tibor:
>...
yep... Tibor is right... you always have to believe him =;-D
ListAvailableServer uses ODBC function SQLBrowseConnect() provided by ODBC
libraries installed by Mdac;
this is a mechanism working in broadcast calls, which result never are
conclusive and consistent, becouse results are influenced of various
servers's answer states, answer time, etc.
Until Mdac 2.5, SQLBrowseConnect function works based on a NetBIOS
broadcast, on which SQL Servers respond (Default protocol for SQL Server
7.0), while in SQL Server 2000 the rules changed, because the default client
protocol changed to TCP/IP and now a UDP broadcast is used, beside a NetBIOS
broadcast, listening on port 1434: which is using a UDP broadcast on port
1434, if instance do not listen or not respond on time they will not be part
of the enumeration.
Some basic rules for 7.0 are:
- SQL Servers have to be running on Windows NT or Windows 2000 and have to
listen on Named Pipes, that is why in 7.0 Windows 9x SQL Servers will never
show up, because they do not listen on Named Pipes.
- The SQL Server has to be running in order to respond on the broadcast.
There is a gray window of 15 minutes after shutdown, where a browse master
in the domain may respond on the broadcast and answer.
- If you have routers in your network, that do not pass on NetBIOS
broadcasts, this might limit your scope of the broadcast.
- Only servers within the same NT domain (or trust) will get enumerated.
In SQL Server 2000 using MDAC 2.6 this changes a little, because now the
default protocol has been changed to be TCP/IP sockets and instead of a
NetBIOS broadcast, they use a TCP UDP to detect the servers. The same logic
still applies roughly.
- SQL Server that are running
- SQL Server that listening on TCP/IP
- Running on Windows NT or Windows 2000 or Windows 9x
- If you use routers and these are configured not to pass UDP broadcasts,
only machines within the same subnet show up.
Upgrading to Service Pack 2 of SQL Server 2000 is required in order to have
..ListAvailableServer method to work properly, becouse preceding release of
Sql-DMO Components of Sql Server 2000 present a bug in this area.
Courtesy of Mr. Gert E.R. Drapers
further Information at
http://sqldev.net/misc.htm
The Service Pack 3a introduced some new amenity in order to prevent MSDE
2000 to be hit by Internet worms like Slammer and Saphire virus and to
increase security, so that Microsoft decided to default for disabling
SuperSockets Network Protocols on new MSDE 2000 installation.
Instances of SQL Server 2000 SP3a or MSDE 2000 SP3a will stop listening on
UDP port 1434 when they are configured to not listen on any network
protocols. This will stop enlisting these servers.
the next generation troubles will depend on WinXP service pack 2, which will
default to close all ports on the internal firewall...
hth
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.7.0 - DbaMgr ver 0.53.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||hi Paul,
"Paul McTeigue" <paul_mcteigue@.msn.com> ha scritto nel messaggio
news:%23PePoymIEHA.2480@.tk2msftngp13.phx.gbl...
> Okay - I give - I will not use that method. The whole point was to avoid
> having to know
> the machine name - how do you guys solve this problem?
if you have to, you can resort on SQLBrowseConnect() provided by ODBC if you
do not need max precision, or give a try to the other methods like
NetServerEnum as described in http://sqldev.net/misc.htm
hth
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.7.0 - DbaMgr ver 0.53.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||
> if you have to, you can resort on SQLBrowseConnect() provided by ODBC if
you
> do not need max precision, or give a try to the other methods like
> NetServerEnum as described in http://sqldev.net/misc.htm
> hth
Hi all
Interesting conversation, I have been reading about this lately and from
what I have read the NetServerEnum API function also has the same problem.
You must try to connect using NetQueryDisplayInformation to ensure you get
around the latency issue with the network browser.
Maybe there is no totally reliable / robust method to do this...
Regards
Daryl