0

I need to retrieve 2 data records that were in a single table from yesterday's backup.

  • How can I restore a single table from a full backup in Sybase?
  • Or is it possible to retrieve the required records from the dump file itself?
  • Can I somehow load the dump file without recovering to the production database?

I don't have enough disk space to recover the database to a temporary database on the same disks/server.

1

Take a look at the ASE Archive Database feature.

This features allows you to mount your dump file(s) as a read-only database; once mounted you can access the tables in the database with your desired select queries.

Technically ...

  • you'll need to setup a smallish scratch database for managing the mount
  • it's possible to make non-persistent changes to data; this consists of allocating (optional) disk space to hold any modified pages (these changes will not be reflected in the database dump file(s)

For an example of setting up the scratch and archive databases, see the Reference manual entry for the create archive database command.

  • Thanks @markp. I search it. I think i need disk area for archive database. Right? my database size is nearly 100 Gb. Dump size 60 Gb. I saw there is an archive db disk in my database which has 200 mb. Is it enough? How much size should i need? I read 1/256 rate (so i think i have ~390 mb for 100 GB dump or dbsize) , is it right? – AhmetMelihBaşbuğ Oct 4 '18 at 13:48
  • 1
    the proposed size sounds about right; keep in mind the documentation is giving you (rough) estimates; I'd probably go with 400MB and then try mounting the db dump file(s) ... it'll either succeed for fail; if it fails, add some more space (or drop/recreate as larger); it may take a few attempts to find a size that works for you; the 'good' news is that it take little time to (re)create the archive/scratch dbs for testing – markp Oct 4 '18 at 13:51
  • How much should i need log segment area? I add 500M scratch_log_dev but it said 1 task(s) are sleeping waiting for space to become available in the log segment for database scratchdb. ... – AhmetMelihBaşbuğ Oct 5 '18 at 11:25
  • I've update my answer with a link to an example of creating/using the scratch and archive databases; as for the size of the log ... the scratch db should need much space so, how much space did you give it initially? if you've got the space, I'd just allocate a 100MB-200MB chunk and go from there. – markp Oct 5 '18 at 11:52
  • In scratch db, it was created 100M data and 100M log. Then i added 400MB log, 500Mb log and 1000Mb log with alter database .. log on ... MB ... – AhmetMelihBaşbuğ Oct 5 '18 at 14:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.