create database project;
create database project_target;
CREATE TABLE NBArankings2013(
TeamID int(10) NOT NULL AUTO_INCREMENT,
NBATeam varchar(255) NOT NULL,
Division varchar(255) NOT NULL,
WinPerc decimal(8,3) NOT NULL, GB decimal(8,1) NOT NULL,
Conference varchar(255) NOT NULL,
PRIMARY KEY (TeamID)
)ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
INSERT INTO NBArankings2013 (NBATeam, Division, WinPerc, GB, Conference)
VALUES ('New York', 'Atlantic', '0.659', '12', 'East'),
('Brooklyn', 'Atlantic', '0.598', '17', 'East'),
('Boston', 'Atlantic', '0.506', '24.5', 'East'),
('Philadelphia', 'Atlantic', '0.415', '32', 'East'),
('Toronto', 'Atlantic', '0.415', '32', 'East'),
('Indiana', 'Central', '0.605', '16.5', 'East'),
('Chicago', 'Central', '0.549', '21', 'East'),
('Milwaukee', 'Central', '0.463', '28', 'East'),
('Detriot', 'Central', '0.354', '37', 'East'),
('Cleveland', 'Central', '0.293', '42', 'East'),
('Miami', 'Southeast', '0.805', '0', 'East'),
('Atlanta', 'Southeast', '0.537', '22', 'East'),
('Washington', 'Southeast', '0.354', '37', 'East'),
('Charlotte', 'Southeast', '0.256', '45', 'East'),
('Orlando', 'Southeast', '0.244', '46', 'East'),
('San Antonio', 'Southwest', '0.707', '2', 'West'),
('Memphis', 'Southwest', '0.683', '4', 'West'),
('Houston', 'Southwest', '0.549', '15', 'West'),
('Dallas', 'Southwest', '0.5', '19', 'West'),
('New Orleans', 'Southwest', '0.329', '33', 'West'),
('Oklahoma City', 'Northwest', '0.732', '0', 'West'),
('Denver', 'Northwest', '0.695', '3', 'West'),
('Utah', 'Northwest', '0.524', '17', 'West'),
('Portland', 'Northwest', '0.402', '27', 'West'),
('Minnesota', 'Northwest', '0.376', '29', 'West'),
('LA Clippers', 'Pacific', '0.683', '4', 'West'),
('Golden State', 'Pacific', '0.573', '13', 'West'),
('LA Lakers', 'Pacific', '0.549', '15', 'West'),
('Sacramento', 'Pacific', '0.341', '32', 'West'),
('Phoenix', 'Pacific', '0.305', '35', 'West');
EDIT PARAMS MGR
会询问你是否创建新的配置文件,选择创建,然后在新的配置文件中输入一下内容。PORT 7809
START MGR
执行命令后会弹出一个新的窗口来运行manager。ADD EXTRACT INITLOD1, SOURCEISTABLE
EDIT PARAMS INITLOD1
之后会询问是否创建新的配置文件,同上,并输入配置信息EXTRACT INITLOD1
DBOPTIONS HOST 127.0.0.1, CONNECTIONPORT 3306
SOURCEDB project, USERID root@project, PASSWORD 123456
RMTHOST 127.0.0.1, MGRPORT 7089
RMTFILE ./dirdat/el1.dat, PURGE
TABLE project.*;
ADD REPLICAT INITLOD2, SPECIALRUN
EDIT PARAMS INITLOD2
之后会询问是否创建新的配置文件,同上,并输入配置信息REPLICAT INITLOD2
SPECIALRUN
HANDLECOLLISIONS
DBOPTIONS HOST 127.0.0.1, CONNECTIONPORT 3306
TARGETDB project_target, USERID root@project_target, PASSWORD 123456
ASSUMETARGETDEFS
EXTFILE ./dirdat/el1.dat
DISCARDFILE ./dirrpt/el1.dsc, PURGE
MAP project.*, TARGET project_target.*;
start extract INITLOD1
view report INITLOD1
最后会看到这样的数据:START REPLICAT INITLOD2
另外附上可能会用到的命令
查看manager的状态
info manager
status manager
start manager
stop manager
restart manager
查看日志
view ggsevt