cancel
Showing results for 
Search instead for 
Did you mean: 

Restore master and user database

Former Member
0 Kudos

I am trying to restore master and user database mydb on dev from production copy.

On production, the memory increased, the new devices added.

What I did is:

1. restore master in single user mode.

2. it is restored and the stopped because there is no enough memory.

3. put myserver.cfg back and restart ase 12.5

4. run isql, then run sp_helpdb mydb to check database info:

1> sp_helpdb mydb

2> go

....

Msg 926, Level 14, State 2:

Server 'myserver', Procedure 'sp_helpdb', Line 610:

Database 'mydb' cannot be opened. An earlier attempt at recovery marked it

'suspect'. Check the SQL Server errorlog for information as to the cause.

Msg 7408, Level 16, State 1:

Server 'myserver', Procedure 'sp_helpdb', Line 610:

Could not find a dbtable for database 5.

Msg 926, Level 14, State 2:

Server 'myserver', Procedure 'sp_helpdb', Line 610:

Database 'mydb' cannot be opened. An earlier attempt at recovery marked it

'suspect'. Check the SQL Server errorlog for information as to the cause.

Msg 7408, Level 16, State 1:

Server 'myserver', Procedure 'sp_helpdb', Line 610:

Could not find a dbtable for database 5.

5. then try to load database mydb and got following info:

2> go

Msg 926, Level 14, State 2:

Server 'myserver', Line 1:

Database 'mydb' cannot be opened. An earlier attempt at recovery marked it

'suspect'. Check the SQL Server errorlog for information as to the cause.

1>

then, got to errorlog and find out following info when ase started:

00:00000:00001:2014/05/20 15:20:57.79 server  Recovering database 'mydb'.

00:00000:00001:2014/05/20 15:20:57.79 server  Started estimating recovery log boundaries for database 'mydb'.

00:00000:00001:2014/05/20 15:20:57.81 server  Error: 692, Severity: 20, State: 1

00:00000:00001:2014/05/20 15:20:57.81 server  Uninitialized logical page '11952947' was read while accessing object '8' in database '5'. Please contact Sybase Technical Support.

00:00000:00001:2014/05/20 15:20:57.81 server  Error: 3414, Severity: 21, State: 1

00:00000:00001:2014/05/20 15:20:57.81 server  Database 'mydb' (dbid 5): Recovery failed. Check the SQL Server errorlog for further information as to the cause.

object '8' is syslogs in mydb.

How to fix it and how to restore mydb? I am afraid of trying will damage something. Help please.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I remembered you asked similar question before in the SCN !

The problem is you try to use different segmap from Prod ASE and try to use that on Dev ASE !

You mentioned 'On production, the memory increased, the new devices added' on you problem description, I thought you did have 'alter database mydb' on new device on Prod ASE !

Please keep in mind, if you want to restore database from dump file, you need to make sure your mydb on Dev ASE with same database size as Prod ASE !

I will suggest you to do following steps to solve it:

1. on Dev ASE, issue ' dbcc dbrepair('mydb','dropdb') ' to drop suspect database 'mydb'

2. on Dev ASE, create new devices as you created them on Prod ASE

3. on Dev ASE, create database mydb with same size as mydb on Prod ASE

4. on Dev ASE, issue 'load database mydb from dump file' to restore mydb

HTH ! Thanks !!

- Robert