Solved

restore master and user database in sybase ase

Posted on 2016-10-17
2
32 Views
Last Modified: 2016-10-18
Dears, kindly note that I have installed a new sybase ase 15.7 on my server, and I have dump of mydb taken from 15.0.3 before install new version of sybase, now I want to:
load mydb dump (and I read it is automatically upgrader to sybase 15.7), but the problem is there is around 30 devices hold this db, and I don't want to recreate them on the server (kindly note the devices which was holding databases from ase 15.0.3 are still on the server)
so I think if I first load master dump which taken from 15.0.3 maybe into 15.7 and thoses devices already exists on the server will be in master..sysdevices??? then can smoothly load my database on those devices??
but I get the error : master database should be in single user mode, and I tried : sp_dboption master,"single user", true.
but this command faild to execute, also I try : startserver -fRUN_myserver -m ,(to put the ase server in single mode then load master)but I got the error: incorrect near m
so, please advice what can I do, and is this the right way I walk through to restore mydb???
thank you
0
Comment
Question by:suzn cas
2 Comments
 
LVL 24

Accepted Solution

by:
Joe Woodhouse earned 500 total points
ID: 41847815
Hello,

No your basic approach is wrong sorry. :)

The master database does indeed hold all that server-wide data but simply restoring that won't work unless all the underlying device information is identical to the other environment you're loading from. Even then everything will fail on rebooting ASE because none of the devices that the now-restored master database is looking for will actually be there. You would then have a complicated recovery scenario to effectively tell ASE "yes I know all my devices are missing and yes I know all my databases appear to be seriously corrupt; never mind that, I want you to load this database anyway".

Reloading master would also completely overwrite everything else in your new server such as logins, passwords, configuration, any other databases you've created, etc etc etc. It's not the right answer for what you're trying to do.

It is actually a lot easier and faster just recreate the devices. Truly. There are a million methods to partially or fully automate generating the scripts to do this. It's not much work. Let us know here if you'd like help with this.

The devices at the ASE level should be the same size as they were in the old environment but do not have to overwrite the same physical disk locations. ASE devices are basically the layer between databases and disks and databases don't know anything about disks, just the device(s) they are defined on.

So your path here is:
  1. Recreate the devices used by the database(s) you wish to load into ASE 15.7
[list=2]Recreate the database(s) on those device(s).[/list]
[list=3]Load the databases from backup.[/list]
[list=4]Bring the databases online. This is when they will be upgraded.[/list]

BTW your sp_dboption should have worked, that was the correct syntax. If you share the error message I can tell you what might have gone wrong. You don't actually need this in your scenario though because you won't be loading the master database from backup.

Also you don't add options to the RUN_SERVER file on the startserver command line but within the RUN_SERVER file itself. I usually maintain one for normal startups and another for single-user mode (which I name RUN_SERVER_single or something like that). You don't actually need this for your scenario though as you won't be loading the master database from backup.
1
 

Author Closing Comment

by:suzn cas
ID: 41847832
Dear Joe,
Thanks in advance.

I will follow your suggestions.

Big thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Lotus Notes – formerly IBM Notes – is an email client application, while IBM Domino (earlier Lotus Domino) is an email server. The client possesses a set of features that are even more advanced as compared to that of Outlook. Likewise, IBM Domino is…
When converting a physical machine to a virtual machine using VMware vCenter Converter Standalone or vCenter Converter Enterprise, if an adapter type is not selected during the initial customization the resulting virtual machine may contain an IDE d…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

930 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now