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
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 How to upload backup file into main database

Author  Topic 

ashu1234
Starting Member

9 Posts

Posted - 2009-04-23 : 12:39:54
Hello All,
Greetings of the day !!

I have one simple database (test1) and i have only 2 tables Ist is employee and sexond one is student both table have 3 column (emp_id, emp_name, emp_sal) and student table (emp_id, emp_name, emp_sal).

in these two table i fill 3 roes data...
and i take backup for this database and this backup file store is in my database.
then i truncate table student and employee.
then no column data is in these table , then i ant to upload those Buckup filw which i took backup earlier.....

Backup file store is in = C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\test1.bak

Thanks
Please Help

Ashwani

ashwani

nr
SQLTeam MVY

12543 Posts

Posted - 2009-04-23 : 13:34:03
Do you want to restore the whole database or just those tables?
If you just want those tables you will have to restore the database to another database name (changing the file names too) then copy the data from the tables in that database.

>> this backup file store is in my database
No it's not - it's a in the file system.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

ashu1234
Starting Member

9 Posts

Posted - 2009-04-23 : 23:56:20
No no, it is not !!

ashwani
Go to Top of Page

ashu1234
Starting Member

9 Posts

Posted - 2009-04-24 : 00:01:06
i want to store backup file in database which i was took the backup earlier....

firstly i took the backup of whole database, then i m deleted the whole column data from test1 database... Then i m trying to do "test1.bak" Back up file which contain the whole data. this backup file upload to the test1 database again or (export database column data) ..

ashwani
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2009-04-24 : 00:12:47
It sounds like you're confused about what a backup is. In SQL Server, a backup contains not just the data but the entire structure of the database. You can't just restore data to 2 tables, you have to restore the same thing. Also, you say you "want to store backup file in database", which makes absolutely no sense for a SQL Server database. The whole point of a backup is to have a copy of the database in case of some kind of failure and you need to recreate or copy it elsewhere. Storing a backup INSIDE the database doesn't protect you, and in fact makes you more vulnerable to data loss.
Go to Top of Page
   

- Advertisement -