?
Solved

Table Restore from ASE Backup

Posted on 2008-10-08
4
Medium Priority
?
262 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 19

Accepted Solution

by:
grant300 earned 1000 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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

How to update Firmware and Bios in Dell Equalogic PS6000 Arrays and Hard Disks firmware update.
Are you looking to recover an email message or a contact you just deleted mistakenly? Or you are searching for a contact that you erased from your MS Outlook ‘Contacts’ folder and now realized that it was important.
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…
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…
Suggested Courses

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