bkaila
asked on
Microsoft SQL Express 2005 database backup automation problem / error ( command line )
I am trying to automate backing up a daatabase in MS SQLExpress 2005 and am doing it from the command line. The exact command I am issuing (the same box that SQL exist on) is:
SqlCmd -E -S (Local) -Q"BACKUP DATABASE [control_point] TO DISK = N'c:\backup\control_point. B
ak' WITH FORMAT, INIT, NAME = N'Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10"
When issued I get the following errors:
HResult 0x7E, Level 16, State 1
VIA Provider: The specified module could not be found.
Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.
Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.
I know that remote connections are allowed. I found the syntax to use from the command line online. Any help resolving the matter would truly be appreciated.
SqlCmd -E -S (Local) -Q"BACKUP DATABASE [control_point] TO DISK = N'c:\backup\control_point.
ak' WITH FORMAT, INIT, NAME = N'Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10"
When issued I get the following errors:
HResult 0x7E, Level 16, State 1
VIA Provider: The specified module could not be found.
Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.
Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.
I know that remote connections are allowed. I found the syntax to use from the command line online. Any help resolving the matter would truly be appreciated.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
What would the switches be if if you could only use SQL (sa) authentication?
To use SQL Authentication instead of Windows, you have to replace -E switch with "-U user -P password" switches.
ASKER
Thank you again Cedric!!!
ASKER
It was the SEVERNAME\INSTANCENAME that did it
What would the switches be if if you could only use SQL (sa) authentication?
Thank you!