Solved

Table Restore from ASE Backup

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

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

Replication has always been one of those technologies that people run scared from. The main reason is usually cost. When you think of replication, your mind drifts to solutions that replicate from one disk frame to another using block level technolo…
Your data is at risk. Probably more today that at any other time in history. There are simply more people with more access to the Web with bad intentions.
This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

724 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