Get the App
SLTechnology News&Howtos  ›  Database  › 

Recovery of sybase master equipment under aix

Shulou Source: shulou.com Published: 2022-06-01 18:40:33 10月30日 Update

A preparation for the experiment

1 back up the master library

Dump database master to'/ backup/master.dat'

2 the size of lv_masrter

# lsvg-l datavg

Datavg:

LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT

Lv_backup jfs2 320 320 1 open/syncd / backup

Loglv00 jfs2log 1 1 1 open/syncd N/A

Lv_master raw 10 10 1 closed/syncd N/A

3 delete lv_master

# rmlv-f lv_master

Rmlv: Logical volume lv_master is removed.

Re-create the master device

1 create lv_master (keep the same size as the previous lv_master)

# mklv-t raw-y lv_master datavg 10

2 rebuilding master equipment

Dataserver-d / dev/rlv_master-w master

-w means to rewrite the master database on the / dev/rlv_master device

Start the sybase service in recovery mode

1 copy the main service RUN file of sybase as m_RUN_server_name

$cp RUN_CRM m_RUN_CRM

2 Edit m_RUN_CRM adds the-m parameter to the last line of its dataserver command as follows:

$cat m_RUN_CRM

#! / bin/sh

#

# Adaptive Server name: CRM

# ASE page size (KB): 2k

# Master device path: / dev/rlv_master

# Error log path: / sybase/ASE-12_5/install/CRM.log

# Configuration file path: / sybase/ASE-12_5/CRM.cfg

# Directory for shared memory files: / sybase/ASE-12_5

#

/ sybase/ASE-12_5/bin/dataserver\

-sCRM\

-d/dev/rlv_master\

-e/sybase/ASE-12_5/install/CRM.log\

-c/sybase/ASE-12_5/CRM.cfg\

-M/sybase/ASE-12_5\

-m

3 start the database through startserver-f m_RUN_CRM

The parameters in the m_RUN_server_name file are explained as follows:

/ sybase/ASE-12_5/bin/dataserver\

-sCRM\

-d/dev/rlv_master\

-e/sybase/ASE-12_5/install/CRM.log\

-c/sybase/ASE-12_5/CRM.cfg\

-M/sybase/ASE-12_5\

-d specifies the name of the master device

-b specify the size of the master device

-s service name

-e error log file name

-I directory of interface files

-M just specify the sybases main installation directory

-m master recovery model, that is, master single-user model

Determine and change the network name of the backup service in the sysservers table to the backup service name.

Select * from sysservers

Note that the system table can be updated directly without the need for sp_configure 'allow update',1

Update sysservers set srvnetname='CRM_back' where srvid=1

5 start the backup service of sybase

$startserver-f RUN_CRM_back

Backup of six loadmaster database

Load database master from'/ backup/master.dat'

Seven restart the main sybase service

$startserver-f RUN_CRM

Tags: Service device backup file size data database parameter pattern directory same one line that is content name command copy interface file name method Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux macOS Shulou Tech Info MySQL Docker