Solved

BCM Backup scrip fails

Posted on 2011-02-22
5
348 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
Comment Utility
try this to enable remote entry:
EXEC sp_configure 'remote access', 1

0
 

Author Comment

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

Accepted Solution

by:
dbaSQL earned 500 total points
Comment Utility
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
Comment Utility
Thanks
0
 
LVL 17

Expert Comment

by:dbaSQL
Comment Utility
My pleasure.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Check out this infographic on what you need to make a good email signature that will work perfectly for your organization.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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: …

763 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now