溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

aix下sybase設(shè)備的遷移

發(fā)布時(shí)間:2020-07-14 00:00:00 來(lái)源:網(wǎng)絡(luò) 閱讀:6643 作者:zhangxuwl 欄目:關(guān)系型數(shù)據(jù)庫(kù)

aix下讓sybase的所有庫(kù)從一個(gè)存儲(chǔ)遷移到另一個(gè)存儲(chǔ),或者從一個(gè)vg遷移到另一個(gè)vg,抑或移動(dòng)sybase所有庫(kù)到新的位置,在aix下都可以通過(guò)拷貝相關(guān)lv實(shí)現(xiàn)。由于公司ibm小型機(jī)硬件原因,簡(jiǎn)單舉個(gè)遷移sybase設(shè)備從rootvg上到datavg的例子。過(guò)程如下:

一、基本信息

1 數(shù)據(jù)庫(kù)當(dāng)前的設(shè)備如下

name phyname

------------------------------ ------------------------

master /dev/rlv_master

sysprocsdev /dev/rlv_proc


2 rootvg的lv信息

# lsvg -l rootvg

rootvg:

LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT

hd5 boot 1 1 1 closed/syncd N/A

hd6 paging 64 64 1 open/syncd N/A

hd8 jfs2log 1 1 1 open/syncd N/A

hd4 jfs2 48 48 1 open/syncd /

hd2 jfs2 64 64 1 open/syncd /usr

hd9var jfs2 48 48 1 open/syncd /var

hd3 jfs2 48 48 1 open/syncd /tmp

hd1 jfs2 1 1 1 open/syncd /home

hd10opt jfs2 48 48 1 open/syncd /opt

lg_dumplv sysdump 16 16 1 open/syncd N/A

lv_master raw 5 5 1 open/syncd N/A

lv_proc raw 5 5 1 open/syncd N/A

lv_data1 raw 16 16 1 closed/syncd N/A


3 sybase RUN_CRM 文件內(nèi)容如下


$ cat 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 \


4 sybase的接口文件內(nèi)容如下

# cat interfaces


CRM

master tcp ether 192.168.85.9 5000

query tcp ether 192.168.85.9 5000


CRM_back

master tcp ether 192.168.85.9 5001

query tcp ether 192.168.85.9 5001


二、拷貝sybase的所有相關(guān)lv、本例sybase只有l(wèi)v_master lv_proc兩個(gè)lv (注意由于是簡(jiǎn)單模擬實(shí)驗(yàn),所以sybase就只有這么兩個(gè)lv)

1 拷貝過(guò)程如下:

cplv命令解釋如下:

-y 新的lv名字

-v 目標(biāo)卷組名字

# cplv -y newlv_master -v datavg lv_master

cplv: Logical volume lv_master successfully copied to newlv_master .



# cplv -y newlv_proc -v datavg lv_proc

cplv: Logical volume lv_proc successfully copied to newlv_proc .


2 拷貝lv后datavg 的lv信息如下:

# 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

newlv_master raw 10 10 1 closed/syncd N/A

newlv_proc raw 10 10 1 closed/syncd N/A


三、更改lv名字

1 更改原rootvg上sybaselv的名字

chlv命令參數(shù)解釋如下:

-n 為新lv名字

# chlv -n oldlv_master lv_master

# chlv -n oldlv_proc lv_proc


2 更改datavg上lv名字(由newlv_master--> lv_master| newlv_proc-->lv_proc)

# chlv -n lv_master newlv_master

# chlv -n lv_proc newlv_proc

四、啟動(dòng)服務(wù)后測(cè)試情況如下


1 啟動(dòng)主服務(wù)和備份服務(wù)

$ startserver -f RUN_CRM

$ startserver -f RUN_CRM_back


2 驗(yàn)證

如下可看到sybase主備服務(wù)已經(jīng)啟動(dòng)成功

$ showserver

USER PID %CPU %MEM SZ RSS TTY STAT STIME TIME COMMAND

sybase 319558 2.0 2.0 25564 17188 pts/1 A 11:42:25 0:03 /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

sybase 286878 0.0 1.0 7016 7440 pts/1 A 11:43:14 0:00 /sybase/ASE-12_5/bin/backupserver -SCRM_back -e/sybase/ASE-12_5/install/CRM_back.log -Ldefault -Jcp850 -N25 -C20 -M/sybase/ASE-12_5/bin/sybmultbuf

驗(yàn)證下master庫(kù)能否備份,如下:

$ isql -Usa -P -SCRM

1> dump database master to '/backup/master2.dat'

2> go

WARNING: In order to LOAD the master database, the SQL Server must run in

single-user mode. If the master database dump uses multiple volumes, you must

execute sp_volchanged on another SQL Server at LOAD time in order to signal

volume changes.

Backup Server session id is: 5. Use this value when executing the

'sp_volchanged' system stored procedure after fulfilling any volume change

request from the Backup Server.

Backup Server: 4.41.1.1: Creating new disk file /backup/master2.dat.

Backup Server: 6.28.1.1: Dumpfile name 'master132960A524 ' section number 1

mounted on disk file '/backup/master2.dat'

Backup Server: 4.58.1.1: Database master: 4546 kilobytes DUMPED.

Backup Server: 4.58.1.1: Database master: 4716 kilobytes DUMPED.

Backup Server: 4.58.1.1: Database master: 4888 kilobytes DUMPED.

Backup Server: 4.58.1.1: Database master: 5058 kilobytes DUMPED.

Backup Server: 4.58.1.1: Database master: 5230 kilobytes DUMPED.

Backup Server: 4.58.1.1: Database master: 5400 kilobytes DUMPED.

Backup Server: 4.58.1.1: Database master: 5572 kilobytes DUMPED.

Backup Server: 4.58.1.1: Database master: 5710 kilobytes DUMPED.

Backup Server: 3.43.1.1: Dump phase number 1 completed.

Backup Server: 3.43.1.1: Dump phase number 2 completed.

Backup Server: 3.43.1.1: Dump phase number 3 completed.

Backup Server: 4.58.1.1: Database master: 5718 kilobytes DUMPED.

Backup Server: 3.42.1.1: DUMP is complete (database master).




向AI問(wèn)一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI