oracle数据库基本操作
Posted amanda-w
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了oracle数据库基本操作相关的知识,希望对你有一定的参考价值。
1.1. 恢复数据库
1.1.1. 功能介绍
导入新的dmp表数据
1.1.2. 方法
1、用工具(如:plsql)删除所有ndzlclear的会话 或者手动杀死session
1、用工具(如:plsql)删除所有porjectclear的会话
plsql ---> zszlsit
或者手动杀死session
2、cmd-------->sqlplus / as sysdba
3、SQL>
(1) drop user hqzl cascade;
(2) create user hqhtxc default tablespace HQHT_JZ identified by hqhtxc;
(3) grant all privileges, dba to hqhtxc;
4、SQL>quit
5、 imp hqhtxc/hqhtxc file=E:hengqinhqht20180411.dmp fromuser= hqhtxc touser= hqhtxc
1.2. 杀死进程
1.2.1. Kill session
select username,sid,serial# from v$session where username=‘PDU‘
alter system kill session ‘9,1793‘
select ‘alter system kill session ‘‘‘||sid||‘,‘||serial#||‘‘‘;‘ from v$session;
1.3. 表空间
1.3.1. Oracle创建表空间,删除表空间
create tablespace hqht_jz
datafile ‘e:/tablespace/hqht_jz.dbf‘
size 1024M
autoextend on next 5M maxsize 3000M;
删除表空间
drop tablespace cebbank including contents and datafiles
--导入导出命令
ip导出方式: exp demo/demo@127.0.0.1:1521/orcl file=f:/f.dmp full=y
exp demo/demo@orcl file=f:/f.dmp full=y
imp demo/demo@orcl file=f:/f.dmp full=y ignore=y
create user aaabank2 identified by 123456 default tablespace aaabank2;
grant dba to aaabank2;
以上是关于oracle数据库基本操作的主要内容,如果未能解决你的问题,请参考以下文章