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.
Author |
Topic |
nomadsoul
Yak Posting Veteran
89 Posts |
Posted - 2006-11-15 : 17:47:51
|
Hi hope your day is good.Can anyone point me to tutorials or scripts to analyze for learning backups? I want to backup each table of a database with exactly the same data as their original. What kind of statements do I use? Selects? Sp's? UDF's? I am looking through SQLT's articles and forums. There is a backup script but I don't understand it. I think I may be doing backups at work soon and I want to prepare. I'd love a book recomendation for later use and in-depth study. Also, If I create backups will the tables retain their relationships keywise? Can I make backups with and without the original referential integrity? Am I asking too many questions at once? I am using SQL Server 2005TIAIt is better to be prepared and not have an opportunity than to not be prepared and have an opportunity |
|
snSQL
Master Smack Fu Yak Hacker
1837 Posts |
Posted - 2006-11-15 : 17:54:41
|
Unless your database is very large and created across multiple file groups, you don't backup tables, you backup the entire database or just the database transaction log. There is another option called a differential backup, that you can learn about once you understand database and transaction log backups. So yes - everything, relationships, constraints, stored procedures, the data itself is all backed up when you run a backup.Books Online is very comprehensive, start with the BACKUP command and database recovery models, and all the pages in BOL linked to those. |
 |
|
nomadsoul
Yak Posting Veteran
89 Posts |
Posted - 2006-11-15 : 18:12:22
|
Thanks it is a small database of business (real estate) that holds tables for addresses, rentpmts, employees, properties, mortgageapps,clients, repairs. It is situated on one server in one office.It is better to be prepared and not have an opportunity than to not be prepared and have an opportunity |
 |
|
snSQL
Master Smack Fu Yak Hacker
1837 Posts |
Posted - 2006-11-15 : 18:17:20
|
In that case you'll probably find that you can just backup the entire database without even noticing a performance hit while the backup runs. |
 |
|
nomadsoul
Yak Posting Veteran
89 Posts |
Posted - 2006-11-15 : 18:35:12
|
I went to books online and found I have a lot of reading to do but it looks doable. I frequently do "views" for the office staff to look at. I'm curious, in the admin world are views considered a form of "table backup" or used as such?It is better to be prepared and not have an opportunity than to not be prepared and have an opportunity |
 |
|
snSQL
Master Smack Fu Yak Hacker
1837 Posts |
Posted - 2006-11-15 : 19:21:15
|
No, definitely not! Views have no data in them. When you create a view it is just that a view. When you query the view the SELECT statement in the view is executed against the underlying table, so there is no data in the view. |
 |
|
nomadsoul
Yak Posting Veteran
89 Posts |
Posted - 2006-11-15 : 22:39:53
|
right o, thanksIt is better to be prepared and not have an opportunity than to not be prepared and have an opportunity |
 |
|
Kristen
Test
22859 Posts |
Posted - 2006-11-16 : 01:10:25
|
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=55210&SearchTerms=How%20Backup%20works,What%20type%20of%20backup%20should%20I%20use,Automating%20Backups,Backup(scroll down to see highlighted terms)Kristen |
 |
|
|
|
|
|
|