Sybase ASE 12.5.1 New Feature Trial - Mount & Unmount (ZT)

zhaozj2021-02-16  52

Mount and Unmount are 12.5.1 new features, seeing there is no such introduction in the forum, and some people ask some questions, I will put it out of the process I use, for everyone to share and discuss. Mount and Umount mainly implement two functions, 1. Database migration, copy ASE A on ASE A, called Database Copy 2. Database's uninstall, delete a database, called Database Move It with the previous The migration method is different from that he does not need SQL script to establish a device, he will automatically establish / delete the database and the database associated with the database. Therefore, when the migration database is avoided, the problem with the device's Same Size, Same Order is established. The migrated data includes two parts: 1. Data file is the physical device of the database. If it is Raw device, you can use DD copies, if File System, you can use CP / COPY 2. Describe the file manifest file, In fact, the structure of the database is described, and the device used by the use is described. This file is generated by Sybase's quiesce / unmount. The function of this file is similar to the INDEX file backup of Veritas / Legato, or it can be considered a partition table of the physical disc.

Implement the migration command, unmount: Uninstall the database, delete the database and related devices, and generate the Manifest file Mount: Load the database, automatically establish a database related device QUIESCE: Silent Database. If you are doing EMC / HDS or some SAN storage, this command should be more familiar because San's Snapshot will be used, of course, the Sybase database Warm Standby also uses it. In this article, Quiesce is mainly used to ensure copying database devices, logic consistency of database devices. Use these commands, plus the operating system's DD / CPY / CP, you can implement two ways of migration, I summarize: Copy Migration: Copy source database to the target system, there is a source database on the target system A fully consistent database, and the source database is still there. This is more suitable for building test environments, data migration, etc. Move Migration: and Copy Migration, the only difference is: Source database and related devices have been deleted, I think Migration is more common, safer

?

The step of implementing COPY MIGRATION: 1. Quiesce Hold for External Dump - This not only silently database, also generates Manifest file 2. DD / COPY / CP copy database related to all devices 3. Quiesce Release 4. Put Manifest and Copy Device file ftp to the target ASE host 5. Mount Database 6. Online Database Database Specific steps are: 1. 1> Quiesce Database Tag Hold Test for External Dump To 2> "D: /sybase/data/test.manifest" with Override 3> Go 2. $ cp test.dat test.dat.bak $ cp log.dat log.dat.bak 3. 1> Quiesce Database Tag Release 2> Go 4. I was on this machine, so FTP is used Not on the machine, I must also manually delete the database and related devices 1> DROP DATABASE TEST 2> Go 1> sp_dropDevice test_dat 2> Go device Dropped. (Return Status = 0) 1> sp_dropdevice log_dat 2> Go Device Dropped. $ RM Test.dat log.dat 5. $ cp log.dat.bak log.dat $ cp test.dat.bak test.dat 1> Mount Database all from "D: / Sybase /data/test.manifest "2> go Started estimating recovery log boundaries for database 'test'. Completed estimating recovery log boundaries for database 'test'. Database 'test' is in QUIESCE DATABASE state. It will recovered as for LOAD DATABASE and Left off line. Started ANALYSIS pass for database 'test'. Completed ANALYSIS pass for database 'test'. Started REDO pass for database 'test'. The total number of log records to process is 53. Redo pass of recovery has processed 7 committed and 0 aborted transactions Completed REDO pass for database 'test' MOUNT DATABASE:... Completed recovery of mounted database 'test' 6. 1> online database test 2> go Started estimating recovery log boundaries for database 'test' Completed estimating recovery log. Boundaries for Database 'Test'

. Started ANALYSIS pass for database 'test'. Completed ANALYSIS pass for database 'test'. Recovery of database 'test' will undo incomplete nested top actions. Database 'test' is now online. Well, sp_helpdb / sp_helpdevice can see Things are clear enough to implement the movement of the Move Migration and the difference between Copy Migration is that in STEP 3, 4 is added 3.5 unmount can also choose not to generate a manifest file when Quiesce Hold, and then unmount Produce, this is not a case. Specific implementation is: 1. Note that there is no manifest file, of course, there is no problem with it is generated here 1> Quiesce Database Tag Hold Test for External Dump 2> Go 2. $ CP Test.dat Test.dat.bak $ CP log.dat log.dat.bak 3. 1> Quiesce Database Tag Release 2> Go 4. 1> Unmount Database Test to "D: /sybase/data/test.manifest" 2> Go 5. Put Manifest file and data File FTP to the target host (here is actually this machine) 6 1> Mount Database all from "d: /sybase/data/test.manifest" 2> Go 7 1> Online Databaseae Test 2> Go

?

Mount / Unmount also has some restrictions: more important is some settings of the source database and target database must be the same: 1. ASE version 2. OS version 3. PageSize

?

转载请注明原文地址:https://www.9cbs.com/read-17929.html

New Post(0)