SS 2000备份以编程方式 [英] SS 2000 Backup programatically

查看:74
本文介绍了SS 2000备份以编程方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在编写一个远程更新应用程序,我想以编程方式备份​​SQL Server 2000数据库,然后再运行SQL文件。

任何人都可以告诉我一个执行数据库热备份的命令并把它放在某个地方的某个地方,我会从我的程序中执行。


例如

ShellExec(" hotbackup mydb c:\ tmp \ backups \ todaysBackup.bak")


我我不关心恢复需要多长时间。即最好是快速

备份,如果需要,可以长时间恢复。

干杯,

Dirk

Hi,
I am writing a remote update app, and I''d like to programmatically backup
the SQL Server 2000 database before running the SQL files over it.
Can anyone tell me a command that does a hot backup of the DB and puts it
somewhere, which I would shell exec from my program.

eg
ShellExec("hotbackup mydb c:\tmp\backups\todaysBackup.bak")

I''m not concerned with how long it takes to restore. ie preferably a quick
backup and if necessary a long restore.
Cheers,
Dirk

推荐答案



" Dirk McCormick" <二** @ acquirer.nospam.com>在消息中写道

新闻:9d ****************************** @ news.meganet新闻。 com ...

"Dirk McCormick" <di**@acquirer.nospam.com> wrote in message
news:9d******************************@news.meganet news.com...

我正在编写一个远程更新应用程序,我想在运行SQL文件之前以编程方式备份​​SQL Server 2000数据库它。
任何人都可以告诉我一个执行数据库热备份的命令并把它放在某个地方,我会从我的程序中执行。

例如 ShellExec(" hotbackup mydb c:\ tmp \ backups \ todaysBackup.bak")


您可以在SQL Server中执行此操作。


在联机丛书中查找备份数据库。


我不关心恢复需要多长时间。即最好是快速备份,如果需要,可以长时间恢复。
干杯,
Dirk
Hi,
I am writing a remote update app, and I''d like to programmatically backup
the SQL Server 2000 database before running the SQL files over it.
Can anyone tell me a command that does a hot backup of the DB and puts it
somewhere, which I would shell exec from my program.

eg
ShellExec("hotbackup mydb c:\tmp\backups\todaysBackup.bak")
You do it from within SQL Server.

Look for backup database in Books On-Line.


I''m not concerned with how long it takes to restore. ie preferably a quick
backup and if necessary a long restore.
Cheers,
Dirk



> >我正在编写一个远程更新应用程序,我想在运行SQL之前以编程方式

backup
> > I am writing a remote update app, and I''d like to programmatically
backup
SQL Server 2000数据库它上面的文件。
...
the SQL Server 2000 database before running the SQL files over it.
...


你可以在SQL Server中完成它。

在联机丛书中寻找备份数据库。

You do it from within SQL Server.

Look for backup database in Books On-Line.



其实我想在远程更新程序中做到这一点,即

自动,无需用户干预。

该程序从下载sql脚本互联网,并在

数据库上运行它们。所以在此之前,我希望程序从代码备份数据库




例如


getSQLFiles ();

ShellExec(" hotbackup mydb c:\ tmp \ backups \ todaysBackup.bak",...);

executeSQLFiles();


在线搜索如何备份SQL服务器只给我手动方法

和培训课程。我假设,也许是错误的,有可以进行热备份的

命令行实用程序。

干杯,

Dirk


Actually I want to do it from within the remote update program, ie
automatically, no user intervention.
The program downloads sql scripts from the internet, and runs them over the
database. So before this happens, I want the program to backup the database
from code.

eg

getSQLFiles();
ShellExec("hotbackup mydb c:\tmp\backups\todaysBackup.bak", ...);
executeSQLFiles();

An online search for how to backup SQL server only gives me manual methods
and training courses. I am assuming, perhaps incorrectly, that there is
command line utility that can do hot backups.
Cheers,
Dirk




" Dirk McCormick" <二** @ acquirer.nospam.com>在消息中写道

news:da ****************************** @ news.meganet news。 com ...

"Dirk McCormick" <di**@acquirer.nospam.com> wrote in message
news:da******************************@news.meganet news.com...
我正在编写远程更新应用程序,我想以编程方式备份​​SQL Server 2000数据库在通过它运行SQL文件之前。
...
I am writing a remote update app, and I''d like to programmatically backup the SQL Server 2000 database before running the SQL files over it.
...

您可以在SQL Server中执行此操作。

在Books On中查找备份数据库-Line。
You do it from within SQL Server.

Look for backup database in Books On-Line.



实际上我想从远程更新程序中做到这一点,即自动进行,无需用户干预。
该程序从下载sql脚本互联网,并运行它们


Actually I want to do it from within the remote update program, ie
automatically, no user intervention.
The program downloads sql scripts from the internet, and runs them over



数据库。所以在此之前,我希望程序从代码备份
数据库。


对。您将备份命令编写为脚本并执行该操作,因为您将使用其他脚本获得



无需人工干预。
例如

getSQLFiles();
ShellExec(" hotbackup mydb c:\ tmp \ backups \ todaysBackup.bak",...);
executeSQLFiles( );

在线搜索如何备份SQL服务器只给我手动方法和培训课程。我假设,也许是错误的,有
命令行实用程序可以进行热备份。
干杯,
Dirk


the database. So before this happens, I want the program to backup the database from code.
Right. You write the backup command as a script and execute that as you
would your other scripts.

No human intervention required.

eg

getSQLFiles();
ShellExec("hotbackup mydb c:\tmp\backups\todaysBackup.bak", ...);
executeSQLFiles();

An online search for how to backup SQL server only gives me manual methods
and training courses. I am assuming, perhaps incorrectly, that there is
command line utility that can do hot backups.
Cheers,
Dirk



这篇关于SS 2000备份以编程方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆