Solved

Table Restore from ASE Backup

Posted on 2008-10-08
4
252 Views
Last Modified: 2013-12-01
I am having difficulty restoring a table to an ASE database, from a current database dump, need to know the syntax or process to accomplish it.
0
Comment
Question by:DNRITSTAFF
  • 2
4 Comments
 
LVL 19

Accepted Solution

by:
grant300 earned 250 total points
ID: 22672453
Well, the reason you are having trouble restoring a table is that it is neither possible nor advisable.  It is not a good idea because most databases have tables with related data and often times integrity constraints so you don't wind up with garbage.  Transaction control also keeps things from going south.  If you restore just one table, say the PO_Header, you could wind up with orphaned PO_Details as an example.

You can see from the document for the LOAD command that there is no finer granularity than the database.  Sybase's position is that there is no way to guarantee any kind of consistency so they don't support the feature.

HOWEVER, if you are running ASE 15.0.2, there is something called an "archive" database feature.  With this functionality, you can mount a dump of your database as a read-only archive database.  You can then pull whatever data you need out of it including all the data for a table if you so desire.  This gives you essentially object-level restore but also gives you a great deal of flexibility to do it smart instead of all-or-nothing.

There are some limitations for archive databases including that you cannot use the compression option when you make the dump(s) you are going to want to troll through.  There is also some setup that has to be done to make it all work but it is fairly straight forward and well documented.

If you are running a release prior to 15.0.2, your only option is to restore the entire dump on another server (development or QA) and then pull out the specific data you need.

Regards,
Bill


0
 
LVL 6

Expert Comment

by:IncisiveOne
ID: 22677669
For pre-15.0 servers, you can create a db on any server, including that which you dumped the db from, and load the dump file.  Just do not make it available to other users.  Then extract whatever you want.  If you use the same server, you can cross-reference the table in the two dbs via SQL.

Otherwise, use bcp-out/bcp-in.  Much faster, but requires the indices to be dropped.
0
 

Author Comment

by:DNRITSTAFF
ID: 22682763
The workaround was to create a location large enough to accomodate the production database dump. Map that location to the production server, copy the data dump to it. Then map that location to the Developement server. I reran my load script and it worked. Still not sure if the original problem was permissions or something else.
0
 
LVL 6

Expert Comment

by:IncisiveOne
ID: 22683549
That info is too general to make any sense out of it for me; it does not appear to be related to the original question.  Please post exact error msgs.
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Life is full of imperfections – we all know it. Sometimes bad things happen to people for no particular reason. As they say: “it happens”. All we can do is to find a way to make some unavoidable situations… avoidable. Every kind of hardware has i…
Microsoft will be releasing the Windows 10 Creators Update in just a matter of weeks. Are you prepared? Follow these steps to ensure everything goes smoothly and you don't lose valuable data on your PC.
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question