Sybase Blog -Anything About Sybase ASE,REP,IQ.

Saturday, December 12, 2009

Syssrvroles dropped

Hey Guys!
In one case, I dropped out the syssrvroles accidently. Now, no one having any roles, even sa is not having its roles..I hav backup of all system tables and dump of master db. But We dont hav sso_role for any login we can't do the bcp in , we can't insert any row in any system table. Even we can't change the allow update on system table, requires sso_role. Anyway. We have backup of master..so we can recover it..by loading the dump of master , but still need suggestions....

Sunday, November 8, 2009

Transportable Databases



Very Useful feature to migrate the database between two Production Server, for creating a HA  Server or DR Server.


It can migrate the database between different version where in place upgrade is not possible.


Concept :



The current version of ASE 12.5.4 or possibly earlier on ones allow us to use a Sybase utility called transportable databases to move database at device level between servers. In this scenario, databases technically freeze(by quieseing), the underlying device become stagnant and copies of devices can be made.


In the heart of this operation lies a Sybase utility that allow us to create a binary file called as menifest file that has all the details of devices, the databases  and their layout.



Testing :



Suppose we have two devices on file system(as opposed to raw partitions).  These devices were created in Sybase on ASE 12.5.4 on server called SYB_DS1. They were called SYB_DS1_data01.dat and SYB_DS1_log01.dat respectively.

On these two devices I have created two databases transportable1 and transportable2.


Now I logged in SYB_DS1 server and quiesced these two databases and created a menifest file.

1> QUIESCE DATABASE transport HOLD transportable1,transportable2 FOR EXTERNAL DUMP TO  '/var/tmp/menifest_file'  WITH OVERRIDE

2>go


Note : The manifest file is called as /var/tmp/manifest_file.


Now copy above mentioned these two devices to new location with new name for the other server SYB_DS2 on the same host with new name SYB_DS2_data01.dat and SYB_DS2_log01.dat.


Now  Mount these database from two devices on other Sybase Server SYB_DS2. This SYB_DS2 can be ASE 15.0.


Logged in SYB_DS2, First get the information out from menifest file.


1> MOUNT DATABASE ALL FROM '/var/tmp/menifest_file' WITH LISTONLY

2>go

[database]

trasnportable1

transportable2

[device]

'/export/sybase/SYB_DS1/dev/SYB_DS1_data01.dat'='datadev01'

'/export/sybase/SYB_DS1/dev/SYB_DS1_log01.dat'='datalog01'


Now mount the new copied devices with menifest file in SYB_DS2.


1> MOUNT DATABASE ALL FROM '/var/tmp/menifest_file' using

2>'/export/sybase/SYB_DS2/dev/SYB_DS2_data01.dat'='datadev01'

3>'/export/sybase/SYB_DS2/dev/SYB_DS2_log01.dat'='datalog01'

4>go


It will give long output with successful message as


MOUNT DATABASE: Completed reovery of mounted datbase 'transportable1'.

MOUNT DATABASE: Completed reovery of mounted datbase 'transportable2'.


Both the databases would be in offline in SYB_DS2. You need to bring them online by online database comand.

If the SYB_DS2 is ASE15 server, it will upgrade the database.



Happy  Learning!

AnVa