Solved

Table Restore from ASE Backup

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

How to update Firmware and Bios in Dell Equalogic PS6000 Arrays and Hard Disks firmware update.
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 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…

759 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

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now