| Author |
Topic |
|
magicmia
Starting Member
3 Posts |
Posted - 2005-09-17 : 02:21:08
|
| Hello,I have a serious problem about the backup process when I am using sql server database.I want to backup only tables, views and stored prcedures that fit into specific criteria. I want your views about it. Thank you. |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-09-17 : 02:34:52
|
| Hi magicmia, Welcome to SQL Team!How about having separate databases - one for the items that fit your backup criteria, and one for the other objects?Kristen |
 |
|
|
magicmia
Starting Member
3 Posts |
Posted - 2005-09-17 : 02:55:46
|
| thank you for your interest. unfortunatelly, this is a visual basic project. I need to backup for instance the ones having x criteria . what determines the x xriteria is the users. therefore, I have no chance to know x criteria directly. |
 |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2005-09-17 : 10:23:17
|
You're going to have to copy the tables that meet x criteria to another database and back that up. Have you thought about having different databases per client if you're going to try this? What is the business need for this? Also, you might want to consider NOT using backup. Just have an archive area that archives based on "x" criteria. That can then be backed up on a regular schedule, have date logic, etc. I have a hard time understanding why some genius would design a system like this without setting some kind of parameters around what x criteria could be, but I'm just a DBA. MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-09-18 : 02:32:54
|
| "I have a hard time understanding why some genius would design a system like"Me too ... but that's Geniuses for you!An alternative would be to BCP out the data for the relevant tables - so they would be help in "plain text" format - there is a Native format available in BCP so that the files which are generated preserve the data in a way that is unambiguous when it is re-imported (e.g. trailing spaces are unambiguous).[Having said that I don't know if it can tell the difference between Empty String and NULL ??]Kristen |
 |
|
|
magicmia
Starting Member
3 Posts |
Posted - 2005-09-18 : 06:12:58
|
| Since i couldn't have explainned what the problem really consists of you werent able to understand and solve it. Moreover people discussed the geniuses instead of how to solve the problem.Let me start again.What i meant by the "x" criteria is :There are 1500 tables ,200 stored procedures and 100 views in an accounting database. This database consists of accounting datas of many firms.For instance,concerning the tables (or stored procedures,views)the one starts with;AA belongs to A FirmBB belongs to B FirmCC belongs to C FirmHowever,while backing up i want to back the data up that only belongs to C firm.I am already trying to solve the problem through the BCP method.I am writing here to ask for your suggestions that might be more tricky. It's not applicable to form different databases for each of the firms or clients. It's because i am developing a backup program to an accounting program that already exists.Therefore, i am not able to manipulate to processing of the system(Although it seems to be foolish).The team that develops the program has set the system in this way.Moreover i am really sorry for a late reply to the ones who spent their time for help.Thank you.Tolga. |
 |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2005-09-18 : 14:16:36
|
What do you need to do with these different backups. I think that's what we're all wondering. Are you wanting to be able to send a backup to each client? Is there some business reason you need to backup each company seperately? If so, and you can't create seperate databases, then you are have somewhat of a problem. You could look at filegroup backups if you just need different backup/recovery times per x client needs and the database is too big to backup in MIN(x) timeframe required by all clients. If on the other hand, you are required to send this data to someone, then you will need to look at either bcp, DTS, custom migration process using stored procs, or a replication schema that populates data to company specific data repositories and then performs backups. Depending on the complexity of your data model (the existence of foreign keys, general AND company specific stored procs, etc), this can be a very easy process or extremly complicated and resource intensive.That's where the whole "genius" remark came from. Keep clarifying. We'll get there. We're just a little slow.MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2005-09-18 : 22:19:07
|
What is your definition of backup?In SQL, backup means you backup the entire database. But if you can't change the way your database holds data (mixed clients), you may want to consider transferring data to each client's database like:query/replicate all data coming from client X to database X then backup database X, include also changes in objects like SPs, UDFs, etc. Don't forget to encrypt the backup so if ever you accidentally sent the backup file to another client, they won't be able to open it HTH--------------------keeping it simple... |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-09-19 : 01:55:30
|
| Sounds to me that the requirement is to be able to "preserve" data for a given client indenepdantly of other clients. And then to be able to reinstate a specific client's data from a specific point in time.Is that it?Kristen |
 |
|
|
|