Hi.
I followed the following steps:
1.Connected to Database using Windows authetication
2.Created new database by right mouse click on Databases tab.
3.created login for the newly created instance from security tab.
4.I was not able to access my database, when i try to login with the created login by sql server authetication.
I get the following error , when i try to run the scripts.
"
com.microsoft.sqlserver.jdbc.SQLServerException: Cannot open database "sqlserver database name" requested by the login. The login failed."
Thank you
Kishore
Loading
kishore kovilPosted Jan 14, 2011, 1:45 AM
I was trying to run multiple scripts from cmd prompt using
sql server auth mode: sqlcmd -S dbname/instancename -U user -P pwd -i c:\inputlist.txt -o c:\outputlist.txt
windows auth mode: sqlcmd -S dbname/instancename -i c:\inputlist.txt -o c:\outputlist.txt
where inputlist has list of scripts to be run in order.
I got the same error when ran in both the ways:
HResult 0x33, Level 16, State 1
Named Pipes Provider: Could not open a connection to SQL Server [51].
Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..
Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : Login timeout expired.
I tried running using ANT script. I got the following error:
BUILD FAILED
com.microsoft.sqlserver.jdbc.SQLServerException: Cannot open database "DBNAME" requested by the login. The login failed.
Is there a way to configure my studio to sql server authetication from windows authetication mode
Thanks,
Kishore
Madhu KPosted Jan 13, 2011, 11:45 PM
You can do it as
Object Explorer->server management studio->properties->securities tab-> sqlserver and windows authentication mode.