Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

BCM Backup scrip fails

Posted on 2011-02-22
5
Medium Priority
?
377 Views
Last Modified: 2012-05-11
Hi,

I am getting the folowing errors when running a script to automate the BCM backup. Any ideas?

D:\BCM-Backups>Backup.cmd

D:\BCM-Backups>"c:\program files\microsoft sql server\90\tools\binn\sqlcmd.exe"
-E -S .\MSSMLBIZ -Q"SET NOCOUNT ON; SELECT 'MSSmallBusiness Backup started at -
' + CONVERT(varchar, GETDATE());"  1>"D:\BCM-Backups\MSSmallBusiness_BackupResul
t.txt"
Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while establi
shing a connection to the server. When connecting to SQL Server 2005, this failu
re 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.

D:\BCM-Backups>"c:\program files\microsoft sql server\90\tools\binn\sqlcmd.exe"
-E -S .\MSSMLBIZ -Q"BACKUP DATABASE MSSmallBusiness TO  DISK = N'D:\BCM-Backups\
MSSmallBusiness.bak' WITH FORMAT, INIT,  NAME = N'Full Database Backup', SKIP, S
TATS = 10"  1>>"D:\BCM-Backups\MSSmallBusiness_BackupResult.txt"
Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while establi
shing a connection to the server. When connecting to SQL Server 2005, this failu
re 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.

D:\BCM-Backups>"c:\program files\microsoft sql server\90\tools\binn\sqlcmd.exe"
-E -S .\MSSMLBIZ -Q"SET NOCOUNT ON; SELECT 'Backup completed at - ' + CONVERT(va
rchar, GETDATE());"  1>>"D:\BCM-Backups\MSSmallBusiness_BackupResult.txt"
Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while establi
shing a connection to the server. When connecting to SQL Server 2005, this failu
re 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.

D:\BCM-Backups>REM copy /Z "D:\BCM-Backups\MSSmallBusiness.bak" "<NETWORK_PATH>\
MSSmallBusiness.bak" >>"D:\BCM-Backups\MSSmallBusiness_BackupResult.txt"

D:\BCM-Backups>Backup.cmd

D:\BCM-Backups>"c:\program files\microsoft sql server\90\tools\binn\sqlcmd.exe"
-E -S .\MSSMLBIZ -Q"SET NOCOUNT ON; SELECT 'MSSmallBusiness Backup started at -
' + CONVERT(varchar, GETDATE());"  1>"D:\BCM-Backups\MSSmallBusiness_BackupResul
t.txt"
Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while establi
shing a connection to the server. When connecting to SQL Server 2005, this failu
re 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.

D:\BCM-Backups>"c:\program files\microsoft sql server\90\tools\binn\sqlcmd.exe"
-E -S .\MSSMLBIZ -Q"BACKUP DATABASE MSSmallBusiness TO  DISK = N'D:\BCM-Backups\
MSSmallBusiness.bak' WITH FORMAT, INIT,  NAME = N'Full Database Backup', SKIP, S
TATS = 10"  1>>"D:\BCM-Backups\MSSmallBusiness_BackupResult.txt"
Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while establi
shing a connection to the server. When connecting to SQL Server 2005, this failu
re 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.

D:\BCM-Backups>"c:\program files\microsoft sql server\90\tools\binn\sqlcmd.exe"
-E -S .\MSSMLBIZ -Q"SET NOCOUNT ON; SELECT 'Backup completed at - ' + CONVERT(va
rchar, GETDATE());"  1>>"D:\BCM-Backups\MSSmallBusiness_BackupResult.txt"
Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while establi
shing a connection to the server. When connecting to SQL Server 2005, this failu
re 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.

D:\BCM-Backups>REM copy /Z "D:\BCM-Backups\MSSmallBusiness.bak" "<NETWORK_PATH>\
MSSmallBusiness.bak" >>"D:\BCM-Backups\MSSmallBusiness_BackupResult.txt"
0
Comment
Question by:optimus_nz
  • 3
  • 2
5 Comments
 
LVL 17

Expert Comment

by:dbaSQL
ID: 34957724
try this to enable remote entry:
EXEC sp_configure 'remote access', 1

0
 

Author Comment

by:optimus_nz
ID: 34965844
Is anywhere special this needs to be entered? Or straight from command line?
0
 
LVL 17

Accepted Solution

by:
dbaSQL earned 2000 total points
ID: 34967028
If you've got SSMS, just open a query window, connected to the MSSmallBusiness database, and run that statement.  Just cut/paste it into your query window, and hit the execute button.
0
 

Author Closing Comment

by:optimus_nz
ID: 35087917
Thanks
0
 
LVL 17

Expert Comment

by:dbaSQL
ID: 35088208
My pleasure.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Are you looking for the options available for exporting EDB files to PST? You may be confused as they are different in different Exchange versions. Here, I will discuss some options available.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question