Solved

restore master and user database in sybase ase

Posted on 2016-10-17
2
18 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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this article, I will show you HOW TO: Perform a Physical to Virtual (P2V) Conversion the easy way from a computer backup (image).
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
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.

760 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

19 Experts available now in Live!

Get 1:1 Help Now