Solved

Table Restore from ASE Backup

Posted on 2008-10-08
4
251 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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

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…
Create your own, high-performance VM backup appliance by installing NAKIVO Backup & Replication directly onto a Synology NAS!
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…
This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…

777 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