Solved

BCM Backup scrip fails

Posted on 2011-02-22
5
352 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 500 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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

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

What does UTC stand for?  “Coordinated Universal Time” – Think of this as the true time on Planet Earth that never changes with the exception of minor leap seconds here and there to account for the changes in the planet's rotation.   What does th…
Large Outlook files lead to various unwanted errors and corruption issues. Furthermore, large outlook files can also make Outlook take longer to start-up, search, navigate, and shut-down. So, In this article, i will discuss a method to make your Out…
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…
Many of my clients call in with monstrous Gmail overloading issues with Outlook. A quick tip is to turn off the All Mail and Important folders from synching. Here is a quick video I made to show you how to turn off these and other folders in Gmail s…

863 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

23 Experts available now in Live!

Get 1:1 Help Now