首页 > 代码库 > mycat的schema

mycat的schema

<?xml version="1.0"?>
<!DOCTYPE mycat:schema SYSTEM "schema.dtd">
<mycat:schema xmlns:mycat="http://io.mycat/">

<schema name="hm_system" checkSQLschema="true" sqlMaxLimit="100">
<table name="jhi_persistent_audit_event" dataNode="hm_system" />
<table name="jhi_persistent_audit_evt_data" dataNode="hm_system" />
<table name="databasechangelog" dataNode="hm_system" />
<table name="databasechangeloglock" dataNode="hm_system" />

<table name="tb_sys_menu" dataNode="hm_system" />
<table name="tb_sys_button" dataNode="hm_system" />
<table name="tb_sys_version_r_mb" dataNode="hm_system" />
<table name="tb_sys_role_r_mb" dataNode="hm_system" />
<table name="tb_dic_menu_type" dataNode="hm_system" />
<table name="tb_dic_button_type" dataNode="hm_system" />
<table name="tb_dic_mb_type" dataNode="hm_system" />

<table name="tb_sys_system" dataNode="hm_system" type="global" dataNode="hm_user,hm_system"/>
<table name="tb_sys_version" dataNode="hm_system" type="global" dataNode="hm_user,hm_system"/>
<table name="tb_sys_role" dataNode="hm_system" type="global" dataNode="hm_user,hm_system"/>
<table name="tb_dic_sys_type" dataNode="hm_system" type="global" dataNode="hm_user,hm_system"/>
</schema>
<schema name="hm_user" checkSQLschema="true" sqlMaxLimit="100">
<table name="jhi_persistent_audit_event" dataNode="hm_user" />
<table name="jhi_persistent_audit_evt_data" dataNode="hm_user" />
<table name="databasechangelog" dataNode="hm_user" />
<table name="databasechangeloglock" dataNode="hm_user" />

<table name="tb_organization" dataNode="hm_user" />
<table name="tb_org_r_version" dataNode="hm_user" />
<table name="tb_group" dataNode="hm_user" />
<table name="tb_user" dataNode="hm_user" />
<table name="tb_group_r_role" dataNode="hm_user" />
<table name="tb_dic_org_type" dataNode="hm_user" />
<table name="tb_dic_login_type" dataNode="hm_user" />
<table name="tb_dic_online" dataNode="hm_user" />

<table name="tb_sys_version" dataNode="hm_system" type="global" dataNode="hm_user,hm_system"/>
<table name="tb_sys_role" dataNode="hm_system" type="global" dataNode="hm_user,hm_system"/>
<table name="tb_sys_system" dataNode="hm_system" type="global" dataNode="hm_user,hm_system"/>
<table name="tb_dic_sys_type" dataNode="hm_system" type="global" dataNode="hm_user,hm_system"/>
</schema>
<schema name="hm_sms" checkSQLschema="true" sqlMaxLimit="100">
<table name="jhi_persistent_audit_event" dataNode="hm_sms" />
<table name="jhi_persistent_audit_evt_data" dataNode="hm_sms" />
<table name="databasechangelog" dataNode="hm_sms" />
<table name="databasechangeloglock" dataNode="hm_sms" />
<table name="tb_sys_parameter" dataNode="hm_sms" />
</schema>
<schema name="sims_passenger" checkSQLschema="false" sqlMaxLimit="100">
<table name="TB_DIC_COUNT_LEVEL" dataNode="sims_passenger" />
<table name="tb_dic_manage" dataNode="sims_passenger" />
</schema>

<dataNode name="hm_system" dataHost="mysql1" database="hm_system" />
<dataNode name="hm_user" dataHost="mysql1" database="hm_user" />
<dataNode name="sims_passenger" dataHost="oracle1" database="sims_passenger_flow" />

<dataNode name="hm_sms" dataHost="mysql1" database="hm_sms" />
<dataHost name="mysql1" maxCon="1000" minCon="10" balance="1" writeType="0" dbType="mysql" dbDriver="native" switchType="1" slaveThreshold="100">
<heartbeat>select user()</heartbeat>
<writeHost host="hostM1" url="IP地址:3306" user="root" password="handsmap123">
<readHost host="hostS1" url="IP地址:3306" user="root" password="handsmap123"/>
<readHost host="hostS2" url="IP地址:3306" user="root" password="handsmap123"/>
</writeHost>
</dataHost>
<dataHost name="oracle1" maxCon="1000" minCon="1" balance="0" writeType="0" dbType="oracle" dbDriver="jdbc"> <heartbeat>select 1 from dual</heartbeat>
<connectionInitSql>alter session set nls_date_format=‘yyyy-mm-dd hh24:mi:ss‘</connectionInitSql>
<writeHost host="hostM2" url="jdbc:oracle:thin:@IP地址:1521:testhmORCL" user="sims_passenger_flow" password="sims_passenger_flow" > </writeHost> </dataHost>
</mycat:schema>

mycat的schema