Re: Recreating database on production machine?

From: Jacco Schalkwijk (jacco.please.reply_at_to.newsgroups.mvps.org.invalid)
Date: 01/05/05


Date: Wed, 5 Jan 2005 12:42:52 -0000

If you want to recreate the database with a script, you can just right-click
the database in Enterprise Manager and choose All Tasks|Generate SQL
Script... Make sure you check all the tabs in that dialog, as for example
Primary and Foreign Keys are not scripted by default.

-- 
Jacco Schalkwijk
SQL Server MVP
"epigram" <nospam@spammy.com> wrote in message 
news:1104928162.aaa486f852ce4d9b388caf1a8d1880c9@bubbanews...
>I know that you can use the graphical tools in Enterprise Manager to create 
>a database.  If I choose this path and create a db on my test machine, how 
>do I create the same db (i.e. the physical schema) on my production machine 
>at a later date.
>
> It seems that you should use a series of DDL commands in a .sql file to do 
> this.  If this is the preferred method, is there a way that Enterprise 
> Manager can create/export a .sql file of DDL commands that I could use to 
> recreate the db on another machine?  If not, it seems that I should create 
> the database manually with DDL commands, and then put those all in a .sql 
> file myself later.  Any suggestions on how to approach this issue would be 
> much appreciated.
>
> Thanks
> 


Relevant Pages

  • Re: Cannot Open SQL Server Table in Access.ADP File.
    ... I dont think that SQL Server will take 'veiw dependencies' into effect; ... Generate Script Wizard did not work on my original database, ... After fixing some of my tables and a few stored procedures and views, ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Enterprise Manager Newbie Question
    ... a SQL backup is not a simple copy of the database files. ... Is it possible to write a script that one could run from a workstation and ...
    (microsoft.public.sqlserver.tools)
  • Re: SQL Security
    ... except I'm having problems making it work in a script. ... ;Set properties of DB objects and open connection to database ... > from Books Online (within the SQL Server program group): ... > communicate with SQL Server. ...
    (microsoft.public.sqlserver.server)
  • Re: Vista hosting XPe tools/db
    ... Are you running this script on the machine that actually has the SQL server ... machine hosting the database. ... i don't know if you can install a second instance of SQL ...
    (microsoft.public.windowsxp.embedded)
  • Maybe the Records Are There After All
    ... The indication that the records were DELETED is that Server Enterprise ... Type in Server Enterprise Manager and then was making notes and documenting ... the larger database from last night STILL SAYS that it has ZERO records ... Is there some way to monitor the things that SQL is doing in the BACKGROUND ...
    (microsoft.public.sqlserver.server)

Loading