Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2796

Re: Unmounting and Mounting a SYBASE database

$
0
0

Which manual are you referring to?

 

I'm looking at the ASE 15.7 (SP100) Reference/Commands manual, details for the 'mount' command ...

 

In Example #3, a copy of the mydb database is created, and the new db (new db name: mydb_copy) is mounted to the same dataserver where mydb exists; net result is that 2x databases (mydb, mydb_copy) now have the same dbid.  The rest of the example states:

 

=====================

Database IDs for the transported databases should not exist on the destination

Adaptive Server. Because the database has been mounted on the same server,

the database ID had to be changed. The allocation pages in the mounted device

keep the original database ID, and that information is used by the disk refit

command. Use the dbcc checkalloc command to reconcile the dbid after running

mount database so that disk refit can work on the mounted devices. Run

checkalloc if the database is not being mounted for temporary use.

=====================

 

Notice the comment 'should not exist', which sounds more like a recommendation as opposed to a requirement, especially in light of the fact that it goes on to say that running dbcc checkalloc can fix the issue.

 

According to this note, running dbcc checkalloc on mydb_copy is supposed to fix/reconcile the dbid issue, sooooo ... have you tried mounting your database to the target ASE and then run dbcc checkalloc against said newly mounted database?

 

If you want to test this method before running in a production system, try following example #3, ie, make a copy of a database, mount said copy to the same dataserver where the original database resides (ie, now both db's have the same dbid), then try running dbcc checkalloc.

 

NOTE: It's been a long time since I played with the (un)mount commands, and from looking at the current documentation (15.7 SP100, 16.0 SP02) it would appear that the documentation is, ummmm, lacking a bit of detail re: re-using dbid's soooo ... I'd probably run a small/quick test (see example #3) to see what happens (eg, does dbcc checkalloc fix the issue?).


Viewing all articles
Browse latest Browse all 2796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>