February 24, 2009 at 1:45 am
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:)
February 24, 2009 at 2:38 am
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
February 24, 2009 at 7:37 am
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.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
February 28, 2009 at 9:54 pm
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'....
February 28, 2009 at 10:02 pm
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
February 28, 2009 at 10:09 pm
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..
February 28, 2009 at 10:19 pm
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:(
February 28, 2009 at 11:56 pm
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
March 1, 2009 at 5:50 am
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
March 15, 2009 at 9:15 pm
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