Sunday, March 25, 2012

Backup single table

I would like to take the backup of only 15 tables out of 800 tables and 8
stored procedures out of 90. The database is very huge and might take few
hours to take full database backup
is there anyway I can take backup only selected tables and stored
procedures? I have SQL Server 2000 running.
thanks
Farrukh
If you will regularly be backing up certain tables, then consider placing
them into their own filegroup and then backing up that filegroup. As for
stored procs, you can use Enterprise Manager to script them. As a best
practice, you should have your scripts in version control outside of your
SQL Server.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"FARRUKH" <farrscorpio77@.hotmail.com> wrote in message
news:82CA5B73-6DBC-433B-A8F0-9249E9FD8590@.microsoft.com...
I would like to take the backup of only 15 tables out of 800 tables and 8
stored procedures out of 90. The database is very huge and might take few
hours to take full database backup
is there anyway I can take backup only selected tables and stored
procedures? I have SQL Server 2000 running.
thanks
Farrukh
|||I dont get this request daily. Actually this is the first time i get this
request. I dont have any script. would you like to share ur script? thanks
"Tom Moreau" wrote:

> If you will regularly be backing up certain tables, then consider placing
> them into their own filegroup and then backing up that filegroup. As for
> stored procs, you can use Enterprise Manager to script them. As a best
> practice, you should have your scripts in version control outside of your
> SQL Server.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "FARRUKH" <farrscorpio77@.hotmail.com> wrote in message
> news:82CA5B73-6DBC-433B-A8F0-9249E9FD8590@.microsoft.com...
> I would like to take the backup of only 15 tables out of 800 tables and 8
> stored procedures out of 90. The database is very huge and might take few
> hours to take full database backup
> is there anyway I can take backup only selected tables and stored
> procedures? I have SQL Server 2000 running.
> thanks
> Farrukh
>
>
|||There is no script here. Just right-click on the DB, click on All
Tasks->generate SQL script.
As for the filegoups, you are looking at a fair bit of work, since you now
need to migrate your existing tables to this filegroup, and that's a rebuild
of those tables.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"FARRUKH" <farrscorpio77@.hotmail.com> wrote in message
news:055BC3BC-89AE-4424-95B0-A3CE72FA7AB3@.microsoft.com...
I dont get this request daily. Actually this is the first time i get this
request. I dont have any script. would you like to share ur script? thanks
"Tom Moreau" wrote:

> If you will regularly be backing up certain tables, then consider placing
> them into their own filegroup and then backing up that filegroup. As for
> stored procs, you can use Enterprise Manager to script them. As a best
> practice, you should have your scripts in version control outside of your
> SQL Server.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "FARRUKH" <farrscorpio77@.hotmail.com> wrote in message
> news:82CA5B73-6DBC-433B-A8F0-9249E9FD8590@.microsoft.com...
> I would like to take the backup of only 15 tables out of 800 tables and 8
> stored procedures out of 90. The database is very huge and might take few
> hours to take full database backup
> is there anyway I can take backup only selected tables and stored
> procedures? I have SQL Server 2000 running.
> thanks
> Farrukh
>
>
|||> As for the filegoups, you are looking at a fair bit of work, since you now
> need to migrate your existing tables to this filegroup, and that's a rebuild
> of those tables.
... also, it isn't obvious how to get a backup of a filegroup available, unless you also have backup
of the rest of the database (which makes the filegroup backup kind of ... moot). In short, filegroup
backup should only be done with a very good understanding about backup in SQL Server and what it
does and does not give you. :-)
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:uQgDLDnmIHA.4536@.TK2MSFTNGP06.phx.gbl...
> There is no script here. Just right-click on the DB, click on All
> Tasks->generate SQL script.
> As for the filegoups, you are looking at a fair bit of work, since you now
> need to migrate your existing tables to this filegroup, and that's a rebuild
> of those tables.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "FARRUKH" <farrscorpio77@.hotmail.com> wrote in message
> news:055BC3BC-89AE-4424-95B0-A3CE72FA7AB3@.microsoft.com...
> I dont get this request daily. Actually this is the first time i get this
> request. I dont have any script. would you like to share ur script? thanks
> "Tom Moreau" wrote:
>
>
|||In a case like this, BCP MIGHT be a workable solution.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:D39370AC-E225-4DAB-97C7-753FA5D4B378@.microsoft.com...
> ... also, it isn't obvious how to get a backup of a filegroup available,
> unless you also have backup of the rest of the database (which makes the
> filegroup backup kind of ... moot). In short, filegroup backup should only
> be done with a very good understanding about backup in SQL Server and what
> it does and does not give you. :-)
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:uQgDLDnmIHA.4536@.TK2MSFTNGP06.phx.gbl...
>
Greg Moore
SQL Server DBA Consulting Remote and Onsite available!
Email: sql (at) greenms.com http://www.greenms.com/sqlserver.html

No comments:

Post a Comment