Solved

restore master and user database in sybase ase

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Getting to know the threat landscape in which DDoS has evolved, and making the right choice to get ourselves geared up to defend against  DDoS attacks effectively. Get the necessary preparation works done and focus on Doing the First Things Right.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

626 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