Wednesday, March 7, 2012

Database

Hi
Currently my server harddisk is running of out space and there is a database
-Testing residing on this server. What I am thinking of rectifying the
problem is to increase the harddisk space of the server and create a new
database -Test1 on the new harddisk space. After which, I will restore a
backup of the current database - Testing onto the new database -Test1. After
the restoring, I will drop database -testing and rename database - Test1 to
testing.
Please advise whether is the above approach feasible and is there any other
suggestion to rectify this problem. Thanks
Regards
Christina
Backup-Restore-Rename is a good plan. I have used it myself in the past.
You can also detach the database, copy the data file(s), and reattach them.
Look up sp_detach_db and sp_attach_db in BOL for details.
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"Chris" <Chris@.discussions.microsoft.com> wrote in message
news:C9D770DF-4CE3-4262-B498-7E1886D06BEA@.microsoft.com...
> Hi
> Currently my server harddisk is running of out space and there is a
database
> -Testing residing on this server. What I am thinking of rectifying the
> problem is to increase the harddisk space of the server and create a new
> database -Test1 on the new harddisk space. After which, I will restore a
> backup of the current database - Testing onto the new database -Test1.
After
> the restoring, I will drop database -testing and rename database - Test1
to
> testing.
> Please advise whether is the above approach feasible and is there any
other
> suggestion to rectify this problem. Thanks
> Regards
> Christina
|||Chris,
Geoff's approach using detach/attach is probably better than
backup/restore as it will result in less down time. Just detach, copy,
attach. You don't have to wait for the restore process to happen.
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Geoff N. Hiten wrote:
> Backup-Restore-Rename is a good plan. I have used it myself in the past.
> You can also detach the database, copy the data file(s), and reattach them.
> Look up sp_detach_db and sp_attach_db in BOL for details.
>
|||"Mark Allison" <marka@.no.tinned.meat.mvps.org> wrote in message
news:O8uvesD3EHA.2196@.TK2MSFTNGP14.phx.gbl...
> Chris,
> Geoff's approach using detach/attach is probably better than
> backup/restore as it will result in less down time. Just detach, copy,
> attach. You don't have to wait for the restore process to happen.
I could also argue the opposite.
Imagine a 50Gig database. That's going to take a very long time to copy
between drives.
With backup/restore, you can backup from drive A, restore to drive B with a
different name.
Then stop production, do an incremental backup restore.
Rename original copy. Rename new copy to original name.
Start production.
So, I'd say "it all depends."
[vbcol=seagreen]
> --
> Mark Allison, SQL Server MVP
> http://www.markallison.co.uk
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602m.html
>
> Geoff N. Hiten wrote:
past.[vbcol=seagreen]
them.[vbcol=seagreen]

No comments:

Post a Comment