Senin, 27 Juni 2011

[MS_AccessPros] Problem backing up SQL Server database using backup.sql file

 

I'm having some trouble running a backup running a backup using a query contained withn a .sql file.
I need to resolve this issue so I can automate backups for my client.
Any advice would be gladly appreciated.
PC is Windows 7 Professional, 64 Bit
SQL Server Express Edition with Advanced Services (2008 R2)

I have two scripts (below) saved as FULLBU.sql and DIFFBU.sql. Neither are working how I would expect. scripts which are identical except for database name and file location are working perfectly on another server.

<<<FULL DATABASE BACKUP>>>
BACKUP DATABASE [ASEEDA] TO DISK = N'C:\Program Files (x86)\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Backup\ASEEDA.bak' WITH NOFORMAT, NOINIT, NAME = N'ASEEDA-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10
GO

AND

<<<DIFFERENTIAL DATABASE BACKUP>>>
BACKUP DATABASE [ASEEDA] TO DISK = N'C:\Program Files (x86)\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Backup\ASEEDA.bak' WITH DIFFERENTIAL , NOFORMAT, NOINIT, NAME = N'ASEEDA-Differential Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10
GO

When I execute either file with SQL Server Management Studio closed; no backup happens, SQL Server Management Studio opens, but does not connect to any objects.

When I execute either file with SQL Server Management Studio open; the text of the script file opens in the Query window but does not execute. If I click on Execute, the backup runs as expected. This makes me think that there's nothing wrong with the query, but it's somehow failing to connect. I'm stumped.

From SQL Server Configuration Manager, the running services are;
SQL Server and
SQL Server Browser
(on the other computer where these .sql files do execute correctly there is one other service running, "SQL Full-text Filter Daemon Launcher"

This is the information from SQL Server Management Studio - About:

Microsoft SQL Server Management Studio 10.50.1600.1
Microsoft Data Access Components (MDAC) 6.1.7601.17514
Microsoft MSXML 3.0 4.0 5.0 6.0
Microsoft Internet Explorer 8.0.7601.17514
Microsoft .NET Framework 2.0.50727.5446
Operating System 6.1.7601

Thanks
John

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar