Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Table back up

Author  Topic 

velliraj
Yak Posting Veteran

59 Posts

Posted - 2008-04-14 : 15:56:30
Please suggest me how to take table back up from a database.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-04-14 : 16:07:43
You can't backup an individual object, but you can save a copy of it:

SELECT * INTO Table1_Backup FROM Table1

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

velliraj
Yak Posting Veteran

59 Posts

Posted - 2008-04-15 : 14:23:09
hi

i tried it it is very useful to me, because i used to take daily back up of table.

Is this table creates physically or temporarily?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-04-15 : 14:24:50
Physically it creates a table with structure same as source table and copies all data to it.
Go to Top of Page

velliraj
Yak Posting Veteran

59 Posts

Posted - 2008-04-15 : 14:41:29
Thanks a lotttttttttttttt
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-04-16 : 04:19:45
quote:
Originally posted by velliraj

hi

i tried it it is very useful to me, because i used to take daily back up of table.

Is this table creates physically or temporarily?


If it is on daily basis,


declare @sql varchar(8000)
set @sql='SELECT * INTO Table1_'+convert(varchar(8),getdate(),112)+' FROM Table1'
EXEC(@sql)


or bcp data to text file every day and save it in your system's directory

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-04-16 : 22:55:08
If table is in its own file group, you can backup that file group.
Go to Top of Page
   

- Advertisement -