oracle 内存数据库 TimesTen试用笔记(aix5.3)
最近公司打算在下一代计费系统里面使用内存数据库的技术,所以作为公司的设计人员之一的我,在oracle网上下了个TimesTen,安装在我们的测试服务器上面aix5,这篇短文主要是我操作数据库的一个笔记,下一篇打算发一个c程序的例子和我测试的结果,后续可能还会使用TimesTen cache of oracle这个产品,陆续也会发一下这方面的笔记上来,希望对有这方面需求的朋友有所帮助。
1 建立.odbc.ini文件在登陆目录下
[ODBC Data Sources]
mytimesten=TimesTen 6.0 Driver
[DemoDataStore]
DataStore=/home/fee/TimesTen6/DemoDataStore
DurableCommits=0
PermSize=16
2 连接数据源,并创建表
[31 machine]/home/fee>ttIsql
Copyright (c) 1996-2006, Oracle. All rights reserved.
Type ? or "help" for help, type "exit" to quit ttIsql.
All commands must end with a semicolon character.
Command> connect "DSN=DemoDataStore";
IM002: Data source name not found and no default driver specified
The command failed.
Command> connect "DSN=DemoDataStore";
Connection successful: DSN=DemoDataStore;UID=fee;DataStore=/home/fee/TimesTen6/DemoDataStore;PermSize=16;
(Default setting AutoCommit=1)
Command> create table customer
> (cust_number integer not null primary key,
> first_name char(12) not null,
> last_name char(12) not null,
> address varchar (100) not null);
Command> describe customer;
Table FEE.CUSTOMER:
Columns:
*CUST_NUMBER INTEGER NOT NULL
FIRST_NAME CHAR (12) NOT NULL
相关文档:
今天在对表创建视图的时候,用户提示 ORA-01031用户权限不足
使用system用户对其分配dba等权限,依然无法创建视图。
继续赋予权限
grant select any table to AAA;
授予用户询所有表的权限
grant select any dictionary to AAA;
再次授取用户select任何字典的权限
......
--名词说明:源——被同步的数据库
目的——要同步到的数据库
前6步必须执行,第6以后是一些辅助信息.
--1、在目的数据库上,创建dblink
drop public database link dblink_orc92_182;
Create public DATABASE LINK dbl ......
因为项目某些模块的数据结构设计没有严格按照某规范设计,所以只能从数据库中查询数据结构,需要查询的信息如下:字段名称、数据类型、是否为空、默认值、主键、外键等等。
在网上搜索了查询上述信息的方法,总结如下:
一,查询表基本信息
select
utc.column_name,utc.data_type,utc.data_le ......
第一课:客户端
1. Sql Plus(客户端),命令行直接输入:sqlplus,然后按提示输入用户名,密码。
2. 从开始程序运行:sqlplus,是图形版的sqlplus.
3. http://localhost:5560/ ......