• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1189
  • Last Modified:

Find data source name of sql server database

I am trying to find the "data source" name of a sql server database for a vb connection string.  sql server is running but there is no data base administrator here that I can ask.   I would like to connect to the pubs database for testing.  I can see the pubs database is there but get an sql server does not exist or access denied error.  Not sure which is the error because I'm not sure the data source I am using is correct.
  • 3
  • 2
1 Solution
The SQL Server Name goes in the "data source" in a connection string.  Also, make sure you have the correct username/password or you are using a trusted connection.

Here's some examples:
utahaleeAuthor Commented:
Thanks for the reply and answer.

I do know the database name, user id, and password.

 How do I find the actual SQL Server Name for the data source?
 I can look at the databases with SQL Server Enterprise Manager.

From the first screen I see:
Root (folder)
    Microsoft SQL Servers
      Sql Server Group
         then the databases are displayed

Is "Sql Server Group" the actual name I am looking for as the data source in the connection string?
Under Microsoft SQL Servers, SQL Server Group what you see is the names of the database SERVERS (ie. the SQL Server Names).

If you drill down into one of them further, you will find the database names.
utahaleeAuthor Commented:
What I see under SQL Server Group is:
  (LOCAL) (Windows NT)
   Under this is "Databases" which I can expand to see the database names.

There is nothing else under SQL Server Group.

Is  "Windows Nt"  the data source name I'm looking for to use in my connection string then?  

Thanks for answering my questions!

ok... (LOCAL) is a different way to represent the LOCAL physical computer.  So right click on my computer, properties, computer name.  That is your SQL ServerName.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now