当前位置:网站首页 > 数据科学与大数据 > 正文

sundb数据库(sundb数据库怎么用)



单机部署

服务器信息及软件版本:
image.png

(以下均为使用默认参数新建的实例操作)

#对比1.2.1.2参数情况
select archivelog_mode from v$archivelog;
select property_name ,property_value from v$property where property_name in (‘SUPPLEMENTAL_LOG_DATA_PRIMARY_KEY’,‘CLUSTER_ASYNC_COMMIT’,‘ARCHIVELOG_MODE’,‘DATA_STORE_MODE’);

如修改则增加或修改以下属性,修改后需重启sundb(重启时注意是否开启归档,参考1.2.1.3):
SUPPLEMENTAL_LOG_DATA_PRIMARY_KEY = YES
CLUSTER_ASYNC_COMMIT = NO
ARCHIVELOG_MODE = 1
DATA_STORE_MODE = 2

(需重启sundb,集群需mount后open { local | global } database)
shutdown abort
startup mount
alter database archivelog;
alter system open database;

create user cdc identified by cdc;
grant create session on database to cdc;
grant create object on tablespace mem_data_tbs to cdc;
grant create object on tablespace mem_temp_tbs to cdc;
grant create object on tablespace mem_undo_tbs to cdc;
grant control schema on schema cdc to cdc;
commit;

create user cdc01 identified by cdc01 without schema;
grant create session on database to cdc01;
grant select table on schema cdc to cdc01;
commit;
select username,user_id,account_status,default_tablespace,temporary_tablespace,index_tablespace,created from dba_users;

create table cdc.t1(col1 native_bigint primary key,col2 varchar(20));
create table cdc.t2(col1 native_bigint primary key,col2 varchar(20));
commit;

(开启附加日志配置后建的表,可忽略此操作)
ALTER TABLE cdc.t1 ADD SUPPLEMENTAL LOG DATA ( PRIMARY KEY ) COLUMNS;
ALTER TABLE cdc.t2 ADD SUPPLEMENTAL LOG DATA ( PRIMARY KEY ) COLUMNS;

select tablespace_name,table_schema||’.’||table_name as table_name,ceil(blocks*8192/) || ’ MB’ as table_size from all_all_tables where table_schema not in (‘DEFINITION_SCHEMA’,‘DICTIONARY_SCHEMA’) order by table_name;

cat ${SUNDB_DATA}/conf/cyfile.conf

 

cyfile --start #开启所有cyfile
cyfile --start --group g1 #开启g1的cyfile
cyfile --start --reset { all | table1,table2 } #开启并重置cyfile

connect cdc cdc
insert into cdc.t1(col1,col2) values (11,‘test1’),(12,‘test2’),(13,‘test3’);
insert into cdc.t2(col1,col2) values (21,‘test1’),(22,‘test2’),(23,‘test3’);

tail -200f /home/sundb01/dat/cyfile.G1_1.dat

insert into cdc.t1(col1,col2) values (14,‘test4’),(15,‘test5’),(16,‘test6’);

tail -200f /home/sundb01/dat/cyfile.G1_1.dat


到此这篇sundb数据库(sundb数据库怎么用)的文章就介绍到这了,更多相关内容请继续浏览下面的相关推荐文章,希望大家都能在编程的领域有一番成就!

版权声明


相关文章:

  • 读取bytebuffer里的内容(bytebuf 读取所有数据)2024-12-16 12:36:09
  • 数据库课程表怎么建(数据库创建课程信息表)2024-12-16 12:36:09
  • msp432p401r(msp432p401R单片机用什么型号的数据线)2024-12-16 12:36:09
  • 自动驾驶数据平台开发(自动驾驶 数据平台)2024-12-16 12:36:09
  • 中文期刊网全文数据库(中文期刊网全文数据库查询)2024-12-16 12:36:09
  • 大数据培训机构排名前十(国内知名大数据培训机构)2024-12-16 12:36:09
  • 数据库端口被占用怎么解决(数据库端口访问不了怎么办)2024-12-16 12:36:09
  • druid数据库连接池一直满(druid数据库连接数满了)2024-12-16 12:36:09
  • jvm内存模型和java内存模型(jvm内存模型和运行时数据区)2024-12-16 12:36:09
  • sqlldr导入数据后要重建索引吗(sqlldr导入能去空格吗)2024-12-16 12:36:09
  • 全屏图片