首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > 其他数据库 >

oracle 操作1

2013-12-11 
oracle 操作一--linux oracle11g 用户system创建表空间 create tablespace bornsoft datafile /u02/orada

oracle 操作一

--linux oracle11g 用户system创建表空间
create tablespace bornsoft datafile '/u02/oradata/devdb/bornsoft.dbf' size 500m autoextend on next 100m maxsize unlimited logging extent management local autoallocate segment space management auto;?
--创建用户
create user bornman_jk identified by me default tablespace bronsoft;
-- 给用户授权?
grant connect,resource,dba to bornman_jk;
-- 用户可以 访问dump_dir 方便进行导入和导出操作?
grant read,write on directory dump_dir to bornman_jk;? -- 如果没有dump_dir可以建立?
create directory dump_dir as '/oracle_dump_dir';?
drop directory dump_dir;
-- 数据库导入1:正常情况?
impdp bornman_jk/me directory=dump_dir dumpfile='/rpm/bornman_jk.dmp';

imp bornman_jk/me@outweb? file='/rpm/bornman_jk.dmp' full=y;


项目所需的数据
?? <alias>bornacl</alias>
??? <driver-url>jdbc:oracle:thin:@127.0.0.1:1521:ora9</driver-url>
??? <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
??? <driver-properties>
????? <property name="user" value="bornacl_jk"/>
????? <property name="password" value="me"/>
??? </driver-properties>
??? <house-keeping-test-sql>select CURRENT_DATE from DUAL</house-keeping-test-sql>
??????? <house-keeping-sleep-time>90000</house-keeping-sleep-time>
??????? <prototype-count>5</prototype-count>
??????? <maximum-connection-count>100</maximum-connection-count>
??????? <minimum-connection-count>10</minimum-connection-count>
????? <property name="user" value="bornacl_jk"/>
????? <property name="password" value="me"/>
bornacl_jk? me? 这个

?


SQL>select username,default_tablespace from user_users;

  查看当前用户的角色

  SQL>select * from user_role_privs;

  查看当前用户的系统权限和表级权限

  SQL>select * from user_sys_privs;

  SQL>select * from user_tab_privs;

  查看用户下所有的表

  SQL>select * from user_tables;

  1、用户

  查看当前用户的缺省表空间

  SQL>select username,default_tablespace from user_users;

  查看当前用户的角色

  SQL>select * from user_role_privs;

  查看当前用户的系统权限和表级权限

  SQL>select * from user_sys_privs;

  SQL>select * from user_tab_privs;

  显示当前会话所具有的权限

  SQL>select * from session_privs;

  显示指定用户所具有的系统权限

  SQL>select * from dba_sys_privs where grantee='GAME';

  2、表

  查看用户下所有的表

  SQL>select * from user_tables;

SELECT * FROM ALL_TABLES;
? exp system/manager@TEST file=d:daochu.dmp full=y


exp bornman/me@YFYXH file=c:/bornman.dmp

exp? bornacl/me@YFYXH file=c:/bornacl.dmp


exp bornman_ra/me@orcl file=D:/db_back/bornman_ra.dmp


exp bornman_wz/me@orcl file=D:/db_back/bornman_wz.dmp

exp union/union@orcl file=D:/db_back/union.dmp

exp airzj/me@orcl file=D:/db_back/airzj.dmp


linux操作系统下,如何启动oracle服务与监听命令??

2011-12-21 23:28:46|? 分类: ORACLE |字号 订阅
在linux操作系统下,如何启动服务与监听命令?首先必须以oracle用户登陆:

1、启动数据库:
以下为引用的内容:
oracle@suse92:~> sqlplus /nolog

SQL*Plus: Release 9.2.0.4.0 - Production on Fri Jan 20 02:29:37 2006

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

SQL> connect /as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.

Total System Global Area 135352820 bytes
Fixed Size 455156 bytes
Variable Size 109051904 bytes
Database Buffers 25165824 bytes
Redo Buffers 679936 bytes
Database mounted.

  2、关闭数据库:
以下为引用的内容:
oracle@suse92:~> sqlplus /nolog

SQL*Plus: Release 9.2.0.4.0 - Production on Fri Jan 20 02:29:37 2006

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

SQL> connect /as sysdba
Connected to an idle instance.
SQL> shutdwon abort;


  3、启动监听器
以下为引用的内容:
oracle@suse92:~> lsnrctl start

  4、停止监听器
以下为引用的内容:
oracle@suse92:~> lsnrctl stop

  5、查看监听器状态
以下为引用的内容:
oracle@suse92:~> lsnrctl
LSNRCTL> status
LSNRCTL> exit


疾控51la
http://www.51.la/login.asp

?

?

?

?

kernel.shmall = 2097152?????????????????????????
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=4194304
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=262144


oracle? soft??????? nproc?? 2047
oracle? hard??????? nproc?? 16384
oracle? soft??????? nofile? 1024
oracle? hard??????? nofile? 65536


ORACLE_BASE=/opt/oracle?????????????????
ORACLE_HOME=$ORACLE_BASE/102
ORACLE_SID=orcl
LD_LIBRARY_PATH=$ORACLE_HOME/lib
PATH=$PATH:$ORACLE_HOME/bin:$HOME/bin
export ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH PATH

?

方法如下:
1.先通过gunzip 命令进行解压
#gunzip 文件名.cpio.gz
2.然后再对它进行cpio操作
#cpio -idmv < 文件名.cpio

实例如下:
#gunzip 10201_database_linux_x86_64.cpio.gz
#cpio -idmv < 10201_database_linux_x86_64.cpio
#ls
10201_database_linux_x86_64.cpio? database

热点排行