How to migrate Master devices

Source: Internet
Author: User
Tags character set sybase backup
The following steps explain how to migrate a master device to a different disk. While performing this task, please refer to Sybase's related documentation (technical documents#1324 entitled "Segment remapping with Load database when moving a database" )。 Note that you want to stop the application of SQL Server before executing buildmaster.

The key to success is that each row of the new sysusages system table matches the contents of the Old sysusages system table.

  • Make a DBCC check on the Master Library and reserve the Master library.
  • Executes the SELECT * FROM table_name command and retains its output. Among them, table_name include: sysdevices, sysusages, sysdatabases. Similarly, you can use the bcp command to implement it.
  • Executes the sp_configure command and retains its output.
  • Copy the $sybase/server_name.cfg file to make a reservation.
  • Shut down Sql/ase Server.
  • Create a new master device by executing the following command:
    Unix:buildmaster-d<master_device>-ssize
    Vms:buildmaster/disk=<master_device>/size=size
    (Size is on page, 1 page =2k)
  • Edit the Run_server_name file, the-D (UNIX), or/device (VMS) parameter points to the newly created
    The name of the standby.
  • Single-user mode to start Sql/ase Server:
    Unix:startserver-f run_sever_name-m
    Vms:startserver/server=server_name/masterrecover
  • Executes the SELECT * from sysdevices command and retains its output.
  • Confirm that the contents of each row in the newly created Sysusages system table match the contents of the Old sysusages system table, and the contents of the system table sysusages are correct after the server has been configured without ALTER DATABASE. If you have made ALTER DATABASE, you will execute the scripts in their original order, and if there are no scripts, you will find the parameters of ALTER DATABASE in the information of the saved sysusages system tables.
  • Shutdown sql/ase Server and start the server in Single-user mode to see if the contents of the sysusages system table are correct.
  • If the configured BACKUP server name is not Syb_backup, execute:
    1> sp_configure "allow updates", 1
    2> Go
    1> Update sysservers set srvnetname= "name in Interfaces file"
    where srvname= "Syb_backup"
    2> Go
  • Mount the Master Library. If the size of the new master device differs from the old device size, the server shut down. Note that the new system table will be rewritten and you will need to adjust the size of the master device in the sysdevices system table. Please perform the following two steps:
  • Start the server in Single-user mode.
  • If the new device size differs from the old device size, follow:
    1> sp_configure "allow updates", 1
    2> Go
    1> Update sysdevices set high=nnnn where name= "master"
    2> Go
    Where nnnn is the size of a master device in page (2K), this value can be found from information in the reserved sysdevices system table. If the device is larger than the old one, perform: 1 Create a database about the size of the master device to reinitialize the allocation page so that the entire master device is available. 2) Delete this database.
  • Reboot the server.
  • Backup master database.

    Attention:

  • Before you load the master library, determine that the character set and language module of SQL Server at this time is the same as the character set and language module of the fallback Master library.
  • Use sp_helpsort before and after you perform this task to see if the character set is the same as the language module.
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.