在Oracle数据库创建脚本中如何初始化某些表
Sample
表空间:IMPTEMP
表:Roles 、Users
通过PL/SQL导出的数据库脚本
-----------------------------------------------------
-- Export file for user IMPTEMP --
-- Created by Administrator on 2010-1-29, 14:14:25 --
-----------------------------------------------------
spool sample.log
prompt
prompt Creating table ROLES
prompt ====================
prompt
create table IMPTEMP.ROLES
(
ROLENAME NVARCHAR2(50) not null,
ROLEXML NCLOB
)
tablespace IMPTEMP
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
alter table IMPTEMP.ROLES
add constraint ROLES_PRIMARY_KEY primary key (ROLENAME)
using index
tablespace IMPTEMP
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
prompt
prompt Creating table USERS
prompt ====================
prompt
create table IMPTEMP.USERS
(
USERID NVARCHAR2(50) not null,
USERNAME NVARCHAR2(50),
ROLENAME NVARCHAR2(50),
PASSWORD NVARCHAR2(50),
USERXML NCLOB,
USERDN NVARCHAR2(100),
ISLOCAL NUMBER(1)
)
tablespace IMPTEMP
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
comment on column IMPTEMP.USERS.ISLOCAL
is '0-ISNOTLOCAL : 1-ISLOCAL';
alter table IMPTEMP.USERS
add constraint USERS_PRIMARY_KEY primary key (USERID)
using index
tablespace IMPTEMP
pctfree 10
initrans 2
相关文档:
在实际的数据库应用中,我们经常遇到这样一个问题,连接到Oracle数据库的用户在作了一次操作后,再也没有后续操作,但却长时间没有和数据库断开连接。对于一个小型的应用系统来讲,本身的连接数目就有限,这好像没有什么严重的后果,但如果对于一个大型的数据库应用。如税务、工商等,如果数据库的连接数目很多,对于数据库 ......
原发表于http://saharabear.javaeye.com
和http://www.haulynjason.net(英)
同时发表在这里.
大约半年前,Oracle公司宣布,它想收购Sun,昨天的时候,Oracle公司宣布完成对Sun微系统的收购。作为Java程序员,我们大家都非常关
心的是Sun产品,包括Java,Netbeans,Glassfish,Solaris/
OpenSolaris,OpenOffice, ......
基本要求
win 7的版本是旗舰版,oracle 10g(Oracle10g第2版10.2.0.3-10.2.0.410203vistaw2k8x86productiondb)迅雷有下载
(搜索“oracle 10g vista”,760MB)
具体过程
1.配置一个虚拟的IP:在安装ORACLE 10g前系统会检测安装的一些前提条件是否满足,
往往会提示说:将Microsoft LoopBack Adapter配置为 ......
http://blog.csdn.net/XIAOHUI_LIAO/archive/2007/08/27/1759990.aspx
create materialized view [view_name]
refresh [fast|complete|force]
[
on [commit|demand] |
start with (start_time) next (next_time)
]
as
{创建物化视图用的查询语句}
以上是 ......
转自:http://download.oracle.com/docs/cd/B13789_01/server.101/b10759/statements_6004.htm
Creating User-Defined Operators: Example
This example creates a very simple functional implementation of equality and then creates an operator that uses the function:
CREATE FUNCTION eq_f(a VARCHAR2, b VARCHA ......