I have a SQL Server 2008 Express instance running and I can access the server with the default account sqlexpress
using sqlcmd.
Now I have created a new windows account on the machine where SQL Server is running and created a login for sqlexpress
using windows authentication. This account would be specifically used for backups.
When I try to login using the following and run the backup script (this backup script works fine for the default account sqlexpress
)
sqlcmd -S (local)\mywinusr -i TestBkup.sql
I get the error
HResult 0xFFFFFFFF, Level 16, State 1
SQL Server Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF].
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. tting login failed for the user.
What could be the problem?
sqlcmd -S specifies a server, you have specified (local)\mywinusr. this suggests that you are passing in a username as an instance. your server name for sqlexpress should be:
(local)\sqlexpress
if you are logged inas this new user, then you just specify -E for 'trusted connection'
if you need to connect as, use
-U domain\username and -P password
hope this helps