I need to copy a active DB to a test db on the same machine. Can someone tell
me how to do this.
Thanks
Do a backup (BACKUP DATABASE) of the database, then do a RESTORE DATABASE with a new database name
and use the MOVE option of the RESTORE command to specify new physical database file names.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Stup88" <Stup88@.discussions.microsoft.com> wrote in message
news:51E2B75B-3558-4DED-84AF-1FDEE95C703E@.microsoft.com...
>I need to copy a active DB to a test db on the same machine. Can someone tell
> me how to do this.
> Thanks
|||Does the database I am backing up need to be offline or can I do that live
with people accessing it ?
"Tibor Karaszi" wrote:
> Do a backup (BACKUP DATABASE) of the database, then do a RESTORE DATABASE with a new database name
> and use the MOVE option of the RESTORE command to specify new physical database file names.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Stup88" <Stup88@.discussions.microsoft.com> wrote in message
> news:51E2B75B-3558-4DED-84AF-1FDEE95C703E@.microsoft.com...
>
|||You can do it live, no problems (it will use some machine resources, of course, but not lock any
data or so).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Stup88" <Stup88@.discussions.microsoft.com> wrote in message
news:BB4F039D-AF4F-4F01-A53D-0B52F451CF04@.microsoft.com...[vbcol=seagreen]
> Does the database I am backing up need to be offline or can I do that live
> with people accessing it ?
> "Tibor Karaszi" wrote:
Showing posts with label tellme. Show all posts
Showing posts with label tellme. Show all posts
Wednesday, March 7, 2012
Copy Active DB to a TEST DB on same machine
I need to copy a active DB to a test db on the same machine. Can someone tel
l
me how to do this.
ThanksDo a backup (BACKUP DATABASE) of the database, then do a RESTORE DATABASE wi
th a new database name
and use the MOVE option of the RESTORE command to specify new physical datab
ase file names.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Stup88" <Stup88@.discussions.microsoft.com> wrote in message
news:51E2B75B-3558-4DED-84AF-1FDEE95C703E@.microsoft.com...
>I need to copy a active DB to a test db on the same machine. Can someone te
ll
> me how to do this.
> Thanks|||Does the database I am backing up need to be offline or can I do that live
with people accessing it ?
"Tibor Karaszi" wrote:
> Do a backup (BACKUP DATABASE) of the database, then do a RESTORE DATABASE
with a new database name
> and use the MOVE option of the RESTORE command to specify new physical dat
abase file names.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Stup88" <Stup88@.discussions.microsoft.com> wrote in message
> news:51E2B75B-3558-4DED-84AF-1FDEE95C703E@.microsoft.com...
>|||You can do it live, no problems (it will use some machine resources, of cour
se, but not lock any
data or so).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Stup88" <Stup88@.discussions.microsoft.com> wrote in message
news:BB4F039D-AF4F-4F01-A53D-0B52F451CF04@.microsoft.com...[vbcol=seagreen]
> Does the database I am backing up need to be offline or can I do that live
> with people accessing it ?
> "Tibor Karaszi" wrote:
>
l
me how to do this.
ThanksDo a backup (BACKUP DATABASE) of the database, then do a RESTORE DATABASE wi
th a new database name
and use the MOVE option of the RESTORE command to specify new physical datab
ase file names.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Stup88" <Stup88@.discussions.microsoft.com> wrote in message
news:51E2B75B-3558-4DED-84AF-1FDEE95C703E@.microsoft.com...
>I need to copy a active DB to a test db on the same machine. Can someone te
ll
> me how to do this.
> Thanks|||Does the database I am backing up need to be offline or can I do that live
with people accessing it ?
"Tibor Karaszi" wrote:
> Do a backup (BACKUP DATABASE) of the database, then do a RESTORE DATABASE
with a new database name
> and use the MOVE option of the RESTORE command to specify new physical dat
abase file names.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Stup88" <Stup88@.discussions.microsoft.com> wrote in message
> news:51E2B75B-3558-4DED-84AF-1FDEE95C703E@.microsoft.com...
>|||You can do it live, no problems (it will use some machine resources, of cour
se, but not lock any
data or so).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Stup88" <Stup88@.discussions.microsoft.com> wrote in message
news:BB4F039D-AF4F-4F01-A53D-0B52F451CF04@.microsoft.com...[vbcol=seagreen]
> Does the database I am backing up need to be offline or can I do that live
> with people accessing it ?
> "Tibor Karaszi" wrote:
>
Subscribe to:
Posts (Atom)