Kamis, 30 Juni 2011

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

 

Hi John, not trying to run these from Access.
I have the script saved as a file with a .sql extension.
With SQL Server Management studio running, after I double click the file "backup.sql", the text is loaded into the SQL server Management Studio window, where I can execute the query and it all works just fine.

--- In MS_Access_Professionals@yahoogroups.com, "John Viescas" <john@...> wrote:
>
> John-
>
> Are you trying to execute these from Access using Pass-Through queries? Do the
> scripts run OK in Management Studio?
>
> John Viescas, author
> Microsoft Office Access 2010 Inside Out
> Microsoft Office Access 2007 Inside Out
> Building Microsoft Access Applications
> Microsoft Office Access 2003 Inside Out
> SQL Queries for Mere Mortals
> http://www.viescas.com/
> (Paris, France)
>
>
>
> -----Original Message-----
> From: MS_Access_Professionals@yahoogroups.com
> [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of john_coote
> Sent: Thursday, June 30, 2011 1:47 AM
> To: MS_Access_Professionals@yahoogroups.com
> Subject: [MS_AccessPros] Repost: Problem backing up SQL Server database using
> backup.sql file
>
> Dear all,
> I'm reposting this as it seemed to become associated with replies which were not
> on the topic.
> If this is not the best place to ask, can anyone direct me to an appropriate
> forum for SQL Server questions?
>
> Many Thanks,
> John
>
>
> 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
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar