Click here to Skip to main content
15,885,365 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
hello everybody, I want to ask a question about sql 2005, when i creat a database in sql, i want to back up database. eg: mydata.sql

when i want to retorse my database, i creat new query then coppy file mydata.sql and pase to this.

I dont know creat file backup.

Thank you so much
Posted
Comments
Hiren solanki 26-Sep-10 10:54am    
vote or accept answer if it helped.

What is mydata.sql?

To backup using TSQL Read[^]

And there are other options also like Google, Read books, SQL Server books online etc.
 
Share this answer
 
 
Share this answer
 
Read up on BACKUP and RESTORE also ATTACH and DETACH.
 
Share this answer
 
Thank you so much but i want to save my database to TextFile
samble form data is Mydata.mdf to TextFile Mydata.sql

do You say to me how to do it, Thank all
 
Share this answer
 
Ok the answer given by you ticks me that you want Data script of the database table values into MyData.sql file.

You could have this article of pinal Dave to be useful,

http://blog.sqlauthority.com/2007/08/21/sql-server-2005-create-script-to-copy-database-schema-and-all-the-objects-stored-procedure-functions-triggers-tables-views-constraints-and-all-other-database-objects/[^]
 
Share this answer
 
Comments
tieudoan208 25-Sep-10 8:58am    
Thank you so much, i do it

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900