Wednesday, March 21, 2012

makeing a db backup for transport

I have a production machine and a development machine.. I need to have a
copy of the SQL database to follow me around with the laptop development
machine, what is the best wat to make a copy of the production db onto the
laptop system? just importaing data with EM or is there some process that is
easier? (the dev machine has MSDE on it instead of sql server 2000 like the
production one has)"Brian Henry" <brianiup@.adelphia.net> wrote in message
news:OMocDNnjDHA.3612@.TK2MSFTNGP11.phx.gbl...
> I have a production machine and a development machine.. I need to have a
> copy of the SQL database to follow me around with the laptop development
> machine, what is the best wat to make a copy of the production db onto the
> laptop system? just importaing data with EM or is there some process that
is
> easier? (the dev machine has MSDE on it instead of sql server 2000 like
the
> production one has)
There are a couple of ways to do this...
- you could take a BACKUP of the production database and RESTORE to your
laptop.
- you could use the sp_detach_db to temporarily detach the database from the
production server, copy the files to your laptop, then use sp_attach_db to
re-attach the database on your server and laptop (see BOL for more details
on the syntax).
Steve|||An easier way is to stop the SQL server for a moment copy the files to the
laptop and attach these files to the SQL server instance on the laptop.
Invoking the sp_detach_db is not required.
Majid
"Steve Thompson" <SteveThompson@.nomail.please> wrote in message
news:u5OlZbnjDHA.2444@.TK2MSFTNGP09.phx.gbl...
> "Brian Henry" <brianiup@.adelphia.net> wrote in message
> news:OMocDNnjDHA.3612@.TK2MSFTNGP11.phx.gbl...
> > I have a production machine and a development machine.. I need to have a
> > copy of the SQL database to follow me around with the laptop development
> > machine, what is the best wat to make a copy of the production db onto
the
> > laptop system? just importaing data with EM or is there some process
that
> is
> > easier? (the dev machine has MSDE on it instead of sql server 2000 like
> the
> > production one has)
> There are a couple of ways to do this...
> - you could take a BACKUP of the production database and RESTORE to your
> laptop.
> - you could use the sp_detach_db to temporarily detach the database from
the
> production server, copy the files to your laptop, then use sp_attach_db to
> re-attach the database on your server and laptop (see BOL for more details
> on the syntax).
> Steve
>|||> Invoking the sp_detach_db is not required.
Attach is only guaranteed if you actually detached first. It might work even if you just "picked up
the files", but if you check BOL you find that BOL explicitly say that you should detach first.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as ugroup=microsoft.public.sqlserver
"Majid" <majid@.dynatechsolution.com> wrote in message news:uqCUvKGkDHA.4008@.TK2MSFTNGP11.phx.gbl...
> An easier way is to stop the SQL server for a moment copy the files to the
> laptop and attach these files to the SQL server instance on the laptop.
> Invoking the sp_detach_db is not required.
> Majid
>
> "Steve Thompson" <SteveThompson@.nomail.please> wrote in message
> news:u5OlZbnjDHA.2444@.TK2MSFTNGP09.phx.gbl...
> > "Brian Henry" <brianiup@.adelphia.net> wrote in message
> > news:OMocDNnjDHA.3612@.TK2MSFTNGP11.phx.gbl...
> > > I have a production machine and a development machine.. I need to have a
> > > copy of the SQL database to follow me around with the laptop development
> > > machine, what is the best wat to make a copy of the production db onto
> the
> > > laptop system? just importaing data with EM or is there some process
> that
> > is
> > > easier? (the dev machine has MSDE on it instead of sql server 2000 like
> > the
> > > production one has)
> >
> > There are a couple of ways to do this...
> >
> > - you could take a BACKUP of the production database and RESTORE to your
> > laptop.
> > - you could use the sp_detach_db to temporarily detach the database from
> the
> > production server, copy the files to your laptop, then use sp_attach_db to
> > re-attach the database on your server and laptop (see BOL for more details
> > on the syntax).
> >
> > Steve
> >
> >
>

No comments:

Post a Comment