Can you give us more details on the process of moving the EMM database ( the
command associated ) ??
Sure... We migrated from an AIX to Windows Master and the DBA discovered it was
not as simple as unloading and loading the media tables. The database schema
was different between the two versions. Some of the commands used to create
tables and load tables are listed below.
SYBASE:
Unix:
. /usr/openv/db/vxdbms_env.sh
dbisqlc -q -c "CS=utf8;UID=dba;PWD=xxxxxx;ENG=NB_servername;DBN=NBDB" xyz.sql
interactive use esc+F -->File menu
dbisqlc -c "CS=utf8;UID=dba;PWD=xxxxxx;ENG=NB_servername;DBN=NBDB"
Windows:
Go to:
D:\Program Files\Veritas\NetBackupDB\WIN64
Execute dbisqlc.exe
Login tab:
User id: dba
Password:xxxxxx
Database tab:
Server name: NB_servername
Database name: NBDB
Uncheck stop database
unload table EMM_MAIN.EMM_Media to ?/tmp/ EMM_Media.unl';
unload table EMM_MAIN.EMM_MediaGroup to ?/tmp/ EMM_MediaGroup.unl';
dbunload -n -c "CS=utf8;UID=dba;PWD=xxxxxx;ENG=NB_servername;DBN=NBDB"
vi reload.sql
EMM_Media
EMM_AllocationStatus
EMM_Allocations
EMM_DeletedMedia
EMM_Media_MediaAffinityGroup
RB_MDS_Allocation
RB_MDS_Reservation
load table EMM_MAIN.EMM_Media (MediaKey, DriveKey, MediaGuid, MediaId,
PartnerKey, PartnerId, LegacyMediaType, MediaTypeName, MediaGroupName,
DensityName, DensityCode, VerificationFlag, AssignedAppType, MediaFlags,
MediaTypeFlags, MediaDescription, Barcode, PartnerBarcode, LastWriteHostKey,
AssignedDateTime, FirstMountDateTime, LastMountDateTime, ExpireDateTime,
ImageExpireDateTime, AllocatedDateTime, LastWriteDateTime, LastRestoreDateTime,
LibraryNumber, LegacyRobotType, LibraryGroupName, SlotNumber, OpticalSide,
ControlHostName, CleaningsLeft, TotalMounts, MaxMounts, MediaRunTimeStatus,
TotalWriteKBytes, NumberOfImages, NumberOfValidImages, RetentionLevel,
NumberOfRestores, OpticalHeaderSizeBytes, OpticalSectorSizeBytes,
OpticalLastHeaderOffset, OpticalPartitionSizeBytes, AdammGuid, RsmGuid,
OriginHostKey, UpgradeConflictsFlag, PoolNumber, PoolName, PrevPoolName,
VltFlags, VltContainerID, VltOffsiteLocation, VltOffsiteSlotNumber,
VltOffsiteSessionID, VltOffsiteSentDateTime,
VltOffsiteReturnDateTime, AcsAcs, AcsLsm, AllocationState, ManufacturerName,
SerialNumber, CreatedDateTime, LastModifiedDateTime, MasterServerKey,
ServerGroupKey) from 'D:\Program Files\Veritas\NetBackupDB\WIN64\EMM_Media.unl'
ALTER TABLE "EMM_MAIN"."EMM_Media"
ADD FOREIGN KEY "FK_EMM_MEDI_R_MEDIAGR_EMM_MEDI"
("MediaGroupName")
REFERENCES "EMM_MAIN"."EMM_MediaGroup" ("MediaGroupName")
go
CREATE TABLE "EMM_MAIN"."EMM_AllocationStatus"
(
"AllocationStatusKey" unsigned int NOT NULL DEFAULT
autoincrement CONSTRAINT "CKC_ALLOCATIONSTATUSK_EMM_ALLO"
check(AllocationStatusKey >= 1),
"AllocationKey" unsigned int NOT
NULL DEFAULT 0 ,
"MediaKey" unsigned int NOT NULL DEFAULT
0 ,
"DriveKey" unsigned int NOT NULL
DEFAULT 0 ,
"JobId"
unsigned int NOT NULL DEFAULT 0 ,
"StatusCode" unsigned int NOT NULL DEFAULT
0 ,
"Operation" unsigned int NOT NULL DEFAULT
0 ,
"MediaServerKey" unsigned int NOT NULL DEFAULT 0 ,
"Data1" unsigned
int NOT NULL DEFAULT 0 ,
"Data2" unsigned
int NOT NULL DEFAULT 0 ,
"String1" varchar(128) NOT NULL
DEFAULT '' ,
"CreatedDateTime" timestamp NOT NULL DEFAULT current utc
timestamp ,
CONSTRAINT "PK_EMM_ALLOCATIONSTATUS" PRIMARY KEY
("AllocationStatusKey"),
) IN "EMM_DATA"
go
+----------------------------------------------------------------------
|This was sent by azenon AT yahoo DOT com via Backup Central.
|Forward SPAM to abuse AT backupcentral DOT com.
+----------------------------------------------------------------------
_______________________________________________
Veritas-bu maillist - Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
|