Introduction to Schema Objects
A schema is a collection of logical structures of data, or schema objects. A schema is owned by a database user and has the same name as that user. Each user owns a single schema. Schema objects can be created and manipulated with SQL and include the following types of objects:
Clusters
Database links
Database triggers
Dimensions
External procedure libraries
Indexes and index types
Java classes, Java resources, and Java sources
Materialized views and materialized view logs
Object tables, object types, and object views
Operators
Sequences
Stored functions, procedures, and packages
Synonyms
Tables and index-organized tables
Views
Other types of objects are also stored in the database and can be created and manipulated with SQL but are not contained in a schema:
Contexts
Directories
Profiles
Roles
Tablespaces
Users
http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10743/schema.htm#i5669
......
以前有个项目将用户表建立在了system用户所属下,后来发觉危害相当大,准备将表对象转移到新建立的LAND用户下,没找到直接的办法,用以下办法得以实现:
1、建立新的LAND用户,在服务器的Oracle Enterprise Manager里分配 对象权限 ,添加对system中数据表对象的 select 权限。
2、以 LAND 用户登录,使用命令: create table <table_name> as select * from system.<table_name>来将数据原样复制到LAND用户下。 ......
当我们获取数据时,可能会有这样的需求,即每次从表中获取数据时,是随机获取一定的记录,而不是每次都获取一样的数据,这时我们可以采取Oracle内部一些函数,来达到这样的目的.
1) select * from (select * from tablename order by sys_guid()) where rownum < N;
2) select * from (select * from tablename order by dbms_random.value) where rownum< N;
3) select * from (select * from table_name sample(10) order by trunc(dbms_random.value(0, 1000))) where rownum < N;
说明: sample(10)含义为检索表中的10%数据,sample值应该在[0.000001,99.999999]之间.
其中 sys_guid()& ......
安装前的准备:
登录系统:sqlplus system/0621
1. 从数据字典v$instance中获取数据库的实例名和版本号:select instance_name,version from v$instance;
2. 从数据字典v$version中获取版本的详细信息:select * from v$version;
3.确认oracle所使用的参数文件是否为二进制的参数文件(spfile表明为二进制文件):show parameter pfile
4. 确认oracle是否使用的是自动内存管理:show parameter memory_target
5. 查看表空间是否为自动扩展:select tablespace_name, autoextensible from dba_data_file;
使用嵌入式PL/SQL网关(也称连接器,Gateway)安装和配置Oracle Application Express的具体步骤如下:
1. 安装Oracle Application Express.
2. 修改Admin帐户密码
3. 配置嵌入式PL/SQL网关。
4. 核实和开启Oracle XML DB HTTP服务器的端口。
5. ......
The following are number examples for the to_char
function.
to_char
(1210.73,
'9999.9')
would return '1210.7'
to_char
(1210.73,
'9,999.99')
would return '1,210.73'
to_char
(1210.73,
'$9,999.00')
would return
'$1,210.73'
to_char
(21,
'000099')
would return '000021'
The following is a list of valid parameters when the to_char
function is used to convert a date to a string. These parameters can be
used in many combinations.
Parameter
Explanation
YEAR
Year, spelled out
YYYY
4-digit year
YYY
YY
Y
Last 3, 2, or 1 digit(s) of year.
IYY
IY
I
Last 3, 2, or 1 digit(s) of ISO year.
IYYY
4-digit year based on the ISO standard
Q
Quarter of year (1, 2, 3, 4; JAN-MAR = 1).
MM
Month (01-12; JAN = 01).
MON
Abbreviated name of month.
MONTH
Name of month, padded with blanks to length of 9
characters.
RM
Roman numeral month (I-XII; JAN = I).
WW
Week of year (1-53) where week 1 starts on the first
day of the year and co ......
如果你是WINXP或WIN2003的系统中自带的防火墙,可以试一下以下方法:
1.在防火墙的例外中,添加ORACLE.EXE运行程序.(在oracle安装目录找到bin文件夹中)
2.再在防火墙例外中,添加端口1521端口就样局域网内的其他机器就可以访问你的ORACLE了.
或者在高级中,选中当前使用的网卡,添加IP,端口号(1521),这样,其他机器也可以访问你的ORACLE了.
......