sota测试同步Hello World
来源:互联网 发布:苹果手机怎么删除数据 编辑:程序博客网 时间:2024/04/29 16:53
测试同步HELLO WORLD
一、测试校验
校验源数据库与备库的数据是否具有一致性,首先确定源数据库与备库中都不存在表名为scott.test_hello的表。
使用sqlplus命令desc scott.test_hello
SQL> descscott.test_hello;
如显示 ERROR:
ORA-04043: object scott.test_hello doesnot exist
则表示数据库中不存在该表,否则则有。
二、数据准备
测试源数据库名为tt,备库名为orcl;
数据库版本: ORACLE 11.2.0.1.0;
操作系统: UBUNTU 12.04 64位
需用到的SQL语句:
desc scott.test_hello;
createtable scott.test_hello(str varchar2(20));
insertinto scott.test_hello values('hello world');
三、使用过程
A. 在源数据库中产生hello world
使用sqlplus在源数据库tt中先创建一张表:
SQL> create tablescott.test_hello(str varchar2(20));
Table created.
向表中添加数据:
SQL> insert intoscott.test_hello values('hello world');
1 row created.
B. 在备库中查看hello world
使用sqlplus在备octl中查看是否有scott.test_hello表,然后查看表中是否有hello world 数据。
SQL>select owner,table_namefrom all_tables where owner='SCOTT' and table_name='TEST_HELLO';
OWNER TABLE_NAME
------------------------------------------------------------
SCOTT TEST_HELLO
C. 备库中存在表scott.test_hello。
操作描述
sqlplus显示
结果
查看源库 scott.test_hello的表结构:
SQL> desc scott.test_hello;
Name Null? Type
----------------------------------------- -------- ----------------------------
STR VARCHAR2(20)
说明目标数据库与源库中的表结构一致。
查看备库 scott.test_hello的表结构:
SQL> desc scott.test_hello;
Name Null? Type
----------------------------------------- -------- ----------------------------
STR VARCHAR2(20)
查看源库scott.test_hello表数据
SQL> select * from scott.test_hello;
STR
--------------------
hello world
说明源库与备库的数据一致。
查看备库scott.test_hello表数据
SQL> select * from scott.test_hello;
STR
--------------------
hello world
四、源库、备库同步
从上述结果可以看出在源库tt中所做的操作,全部同步到了备库orcl上。Sota系统完成了数据库的同步。
如果有疑问请咨询沃信科技公司的技术人员,有兴趣着请登录沃信科技网站了解相关的内容。
- sota测试同步Hello World
- Phalcon Hello World Benchmark(Hello World测试)
- 第一次测试B - Hello World!
- Hello World!【本篇纯属测试,欢迎效仿!】
- Yaf的安装与Hello,world测试
- 命令行下写"Hello World"测试总结
- Hello World!【Hello World】
- sota同步作业的操作(章节:4.3)
- sota同步作业的操作(章节:4.3)
- Hello, world!
- Hello World!
- Hello world!
- Hello World!
- Hello World!
- hello world!
- Hello World !
- Hello,World!
- Hello World!
- 主从复制经常遇到的问题
- 计算机图形学学习
- hadoop2.1.0在ubuntu下的安装配置
- 北京的一些P2P网贷平台整理
- SEO优化中的友情链接
- sota测试同步Hello World
- Bitmap 和 byte[]之间转换
- boost.asio 学习笔记02——io_service类
- c++里的 pthread_create 函数小结
- Bluedroid与BluZ,蓝牙测试方法的变动(基于bludroid和BlueZ的对比) .
- 远程界面打开本地磁盘
- root如何ftp到linux服务器
- boost asio 库中通过socket获得远端的endpoint的参数(ip, port)
- Tomcat与WebLogic有什么区别