Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 Server Error while accessing SQL-Server

Author  Topic 

anil.rai
Starting Member

1 Post

Posted - 2005-08-31 : 10:00:06
Hi All,

can anyone provide solution for the problem mentioned below:

I'm getting Error message like "SQL SERVER DOES NOT EXIST OR ACCESS DENIED", while opening the .net page contains database connectivity code.

This has begin after changing and transfering databases from old SERVER GROUP(ntserver) to NEW ONE(webserver).

Please provide certain solutions.

Thanks,
Anil.

WYSIWYG
Starting Member

15 Posts

Posted - 2005-09-20 : 09:20:31
Test the Connection by using a UDL file

The easiest way to see if you can get a connection to the database is by using a UDL file.
To connect to the database using a UDL file, do the following:

1.  Right click on the desktop and create a new text document.
2.  Rename the file to sql.udl
3.  Right click the file you created and select properties
4.  Click on the Provider Tab and select Microsoft OLE DB Provider for SQL Server
5.  Click on the Connection Tab and enter the following properties:
    a.  Enter the following using your IP and Port: (Select ONE)
      i.  127.0.0.27 (Generic TCP connection)
      ii.  tcp:127.0.0.1,1433 (TCP connection forcing the Port number)
    b.  Enter information to log on to the server: (Select ONE)
      i.  Use windows integrated security
      ii.  Use a specific user name and password
6.  Click Test Connection until a test connection successful message

Test by using the above to see if you can get a connection.

If this works, and you are using a OLEDB connection, then you can click "Allow Saving Passwords" and then APPLY. Close the UDL. Right click on the sql.udl file, and open with notepad. Take the connection string from here and place it in your code to see if you can connect. If you can then great! You need to modify your connection string so that it works with your database.

If you need assistance on your connectionstring, then go to the following resource [url]http://www.connectionstrings.com[/url]
Go to Top of Page
   

- Advertisement -