cancel
Showing results for 
Search instead for 
Did you mean: 

Restore ASE db... not from a dump

Ganimede-Dignan
Contributor
0 Kudos

Hi,

due a ""strange"" case I need to restore an ASE database (16.0) not from a dump but from an off-line (with ASE engine off) simple datafiles copy and transaction log file copy. The sysadmin has done only datafile copy and transaction log file copy.

Can I restore (as MSSQL attach datafile) this ASE database? Of course I use the same ASE release and the same support packages level on the same platform (MS Windows)

Thank you.

Bye.

Accepted Solutions (0)

Answers (4)

Answers (4)

jong-un_seo
Participant
0 Kudos

Hi Ganimede,

If you can configure the same directories for data & log files on other host machine, you can restore the ASE server.

Please try to restore as following steps.

1.copy data & log files into the same drive name and directories.

2.copy RUN_<SID> files and <SID>.cfg file from source host to target host
-RUN_* files are located at %sybase%\ASE-16_0\install
-<SID>.cfg is located at %sybase% or %sybase\ASE-16_0

3.run the RUN_<SID> on target host. It will be running as a foreground process.

cd %sybase%

SYBASE.bat

cd %sybase%\ASE-16_0\install

RUN_<SID>.bat

**If you want to run it as a service, you have to register the ASE as a service.

Regards,

Jongun

0 Kudos

Hi,

addtional to what Tilman decribed you can execute the following command on the source system

sp_ddlgen 'database', <SID>

with this command you get all the information about the database and all data / log files which are needed in your target system.

Kind Regards

Ali Özcan

Ganimede-Dignan
Contributor
0 Kudos

Hi,

source system is not available.

Bye

0 Kudos

Question :

All devices of the ASE database in question have been copied ? At the time the ASE server was offline - i.e. guaranteed no one working on the DB.

So copy shold be consistent.
I understand you are using a fresh ASE server - i.e. one that does not know about the database.
If that is correct, then you can restore the DB by these steps:
- make sure you keep the offline copy in a save place
- recreating all the ASE devices excatly as the existed on the old system (same size and name )
- recretae the DB with same name and layout on these new devices in the new ASE server
- shutdown ASE
- replace the new devices with the old copies. (I assume you are using disk files)
- restart ASE

I think that should work .
Problem: that will automatically online the DB at recovery - i.e. you can't restore transaction log dumps that were taken afterwards .
If transaction logs must be LOADed then it becomes tricky.

There is also the "mount database" command - but that requires a metadata file to be present - which I assume does not exist .

Rgds
Tilman

former_member188958
Active Contributor
0 Kudos

Maybe. At the time the datafiles were copied, had you run the QUIESCE DATABASE command to suspend writes to the device or was ASE shutdown (also preventing writes to the device)? If not, then some objects in the database may be corrupt or there may be transactional inconsistency in the data.

To copy the devices in, first shutdown ASE, then copy the devices over the ones ASE is using, then reboot ASE.

-bret



Ganimede-Dignan
Contributor
0 Kudos

Hi,

no "QUIESCE DATABASE" because I don't know that sysadmin will destroy the system 😞

But, I'm sure ASE was shutdown (Windows service regulary stepped) before the copy, during the copy and after the copy.

So, now I've got datafiles and transaction log file, How can I restaore the database? I can't mount it because I haven't manifest. Of course I've also master, model, etc datafile but it's not so mandatory to restore system database, I need only a customer database.


Thank you.