Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

restore master and user database in sybase ase

Posted on 2016-10-17
2
Medium Priority
?
209 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 24

Accepted Solution

by:
Joe Woodhouse earned 2000 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

If you’re involved with your company’s wide area network (WAN), you’ve probably heard about SD-WANs. They’re the “boy wonder” of networking, ostensibly allowing companies to replace expensive MPLS lines with low-cost Internet access. But, are they …
In this article, WatchGuard's Director of Security Strategy and Research Teri Radichel, takes a look at insider threats, the risk they can pose to your organization, and the best ways to defend against them.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

722 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