error 26 error locating server/instance specified

  • Hello,

    wen i try to connect to data base i get an error 26 error locating server/instance specified.

    i am using this connection string

    Server = Sam-PC\sam;Initial Catalog=SOne ;packet size=4096;user id=sa; password=sa; persist security info=false

    when i chk my error log file i found tht

    Login failed for user 'NT AUTHORITY\SYSTEM'. Reason: Failed to open the explicitly specified database. [CLIENT: ]

    and wen i run this query

    select * from sys.servers where name='sam-PC\sam'

    it doesnt show any thing

    i dont know wat to do and how to do:)

  • Without knowing what to do and how to do, you have done so much? 🙂

    I suspect that the database name you have given in Initial Catalog is not available or not accessible by the username you had given.

    Where you are running this syservers T-SQL?

    Regards,
    Sakthi
    My Blog -> http://www.sqlserverdba.co.cc

  • The issue appears to be in the Initial Catalog parameter. If you remove that from the connection string do you connect successfully?

    As a side note, you should not be using sa to connect to the server and you definitely should have a stronger password than sa.

  • Hello

    i hav changed my connection string like this

    "Server = SAM-PC ;Initial Catalog=SOne;packet size=4096;user id=sa; password=sa; persist security info=false"

    and now it is saying tht loging faile for user 'sa'....

  • Then one of the following is true:

    - The SQL Server is set to Windows authentication only.

    - The sa account has been disabled.

    - The sa account has been renamed.

    - You have the wrong password for the sa account.

    K. Brian Kelley
    @kbriankelley

  • i have enabled the sa frm sql server management->logins->sa....

    but for Sa ...in usermaping SOne ise not selected and wen i tried to select it and assign it user sa it doesnt allow me execute t-SQL..

  • infact there is another login sam-pc/sam with windows authentication mode...wen i tried to connect with this login it gives me the same eror:(

  • Wen i chk my error log file it gives the error that

    login failed for user sam bcz an attempt to login using sql authentication...server is configured only for windows aunthentication....

    wat shud i do to remove the error...

    i need help urgentlyyyyyyyyyyyyyyyy......plzzzzzz

  • I didn't realize you had posted again and answered the question in your other message. Please only post in one place. Most of us check the whole board.

    K. Brian Kelley
    @kbriankelley

  • I have the same problem but I'm really new to all this. my server is also running locally on my pc and I'm using windows authentication. I'm using visual studio to try and connect to my sql database (sql server 2005) and it gives me the same error sam gets - any ideas?

    Thanks in advance!

Viewing 10 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply