Friday, March 30, 2012

Scripting a database

I would like to run a job to script a database in case of the database being
deleted. Is there a command to script a databse?http://www.nigelrivett.net/DMOScriptAllDatabases.html
But you should really rely on backups for that.
"John" wrote:
> I would like to run a job to script a database in case of the database being
> deleted. Is there a command to script a databse?|||Hi,
Why dont you backup your database daily once using the below command.
backup database <dbname> to disk='d:\backup\dbname.bak' with init
This backup fine can used to restore the entire data and objects incase ur
database is corrupted or deleted.
Thanks
Hari
MCDBA
"John" <John@.discussions.microsoft.com> wrote in message
news:06FF51AC-E494-463B-826A-25C5977EA89D@.microsoft.com...
>I would like to run a job to script a database in case of the database
>being
> deleted. Is there a command to script a databse?|||You may want to try SCRPTXFR tool that comes along with SQL Server 2000.
This can help you script out database or any objects you want.
HTH
Saleem@.sqlnt.com
"John" wrote:
> I would like to run a job to script a database in case of the database being
> deleted. Is there a command to script a databse?|||A bunch of options listed here:
http://www.karaszi.com/SQLServer/info_generate_script.asp
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"John" <John@.discussions.microsoft.com> wrote in message
news:06FF51AC-E494-463B-826A-25C5977EA89D@.microsoft.com...
>I would like to run a job to script a database in case of the database being
> deleted. Is there a command to script a databse?sql

No comments:

Post a Comment