This section helps first timers to quickly setup MySQL environment so Dbvisit Repicate can be configured after that to establish proof of concept in testing environment.
If MySQL is not installed on the pre-built VM, but this then it can be installed with:
Section |
---|
Column |
---|
| Panel |
---|
| yum mysql mysql-server |
|
|
Start MySQLYou can start MySQL using following command.
Section |
---|
Column |
---|
| Panel |
---|
| /etc/init.d/mysqld start |
|
|
Install Dbvisit Replicate using the 32bit RPM installation file (as root):
Section |
---|
Column |
---|
| Panel |
---|
| rpm -ivh dbvisit_replicate-2.0.02-1.i386.rpm Preparing... ########################################## [100%] 1:dbvisit_replicate ########################################### [100%] |
|
|
The following Oracle table is going to be replicated. This is a copy of the sys.dba_objects table but created in the SCOTT schema. Create this table in Oracle:
Section |
---|
Column |
---|
| Panel |
---|
| CREATE TABLE "SCOTT"."AVI_OBJECTS" ( "OWNER" VARCHAR2(30), "OBJECT_NAME" VARCHAR2(128), "SUBOBJECT_NAME" VARCHAR2(30), "OBJECT_ID" NUMBER, "DATA_OBJECT_ID" NUMBER, "OBJECT_TYPE" VARCHAR2(19), "CREATED" DATE, "LAST_DDL_TIME" DATE, "TIMESTAMP" VARCHAR2(19), "STATUS" VARCHAR2(7), "TEMPORARY" VARCHAR2(1), "GENERATED" VARCHAR2(1), "SECONDARY" VARCHAR2(1), "NAMESPACE" NUMBER, "EDITION_NAME" VARCHAR2(30) ) SEGMENT CREATION IMMEDIATE PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "USERS" |
|
|
...
Following example describes create table statement of MySQL. Unlike Oracle, MySQL has no schemas but only databases. Therefore we will create database first before creating table within the new database.
Section |
---|
Column |
---|
| Panel |
---|
| mysql> create database scott; Query OK, 1 row affected (0.00 sec) mysql> use scott; Database changed |
|
|
Now the MySQL table can be created:
Section |
---|
Column |
---|
| Panel |
---|
| DROP TABLE IF EXISTS `avi_objects`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `avi_objects` ( `OWNER` varchar(30) default NULL, `OBJECT_NAME` varchar(128) default NULL, `SUBOBJECT_NAME` varchar(30) default NULL, `OBJECT_ID` bigint(20) default NULL, `DATA_OBJECT_ID` bigint(20) default NULL, `OBJECT_TYPE` varchar(19) default NULL, `CREATED` date default NULL, `LAST_DDL_TIME` date default NULL, `TIMESTAMP` varchar(19) default NULL, `STATUS` varchar(7) default NULL, `TEMPORARY` varchar(1) default NULL, `GENERATED` varchar(1) default NULL, `SECONDARY` varchar(1) default NULL, `NAMESPACE` bigint(20) default NULL, `EDITION_NAME` varchar(30) default NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
|
|