oracle常用命令总结
声明:本文为博主在做项目中用到的一些常用命令,请勿转载,只为保存。
oracle常用命令总结
创建表空间:
--create tablespace vms
--datafile 'e:\vms.dbf'
--size 32000M
--extent management local uniform size 100M;
drop user c##vms;
create user c##vms identified by vms2014
default tablespace vms;
删除表空间
DROP TABLESPACE tablespacename INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS;
grant all privileges to c##vms;
授权
grant dba to c##vms;
alter user c##vms quota unlimited on vms;
导入
imp c##vms/vms2014@127.0.0.1/oracle file=E:\bkNew\daochu.dmp tables=S_COUNTRY grants=n fromuser=vms touser=c##vms buffer=100000000
imp MES/MES@MES file=E:\DB\oracle.dmp ignore=y tables=(ECUA2LFILEVER,ECUVERSION,ECUDCMFILE,ECUEWPFILE,ECUFILEINFO,ECUIMAGE,ECUMODELREFERENCE,ECUTESTREPORT) FULL=N
导入的时候:
CONSTRAINTS=n不导入约束
imp_tian.par
userid=system/password
file = exp_tian.dmp
fromuser=sasman
touser=oraver02
buffer=20000000
ignore=y
grants=n
CONSTRAINTS=n
rows=y
log=imp_tian.log
commit=y
nohup imp parfile=imp_tian.par 2>imp_tian.out 1>&2 &
很简单,查 dba_tablespaces 数据字典:
select tablespace_name from dba_tablespaces;
··如果有服务没启动。
alter database datafile 'file_name' offline drop
这个file_name你要改成你删掉的那个文件路径加文件名。
追问
执行成功了 还是见不来其他的表空间啊
回答
执行成功了 你要 把数据库打开啊;
alter database open;
EXP SONIC/SONIC BUFFER=64000 FILE=C:\SONIC.DMP OWNER=SONIC TABLES=(SONIC)
这样用户SONIC的表SONIC就被导出
删除有数据的表空间
alter tablespace vms offline
drop tablespace vms including contents;
设置自动增长的表空间
autoextend on next 1000M maxsize umlimited extent management local segment space management auto;
create tablespace "JYDB" logging datafile 'd:\oracle\oradata\JYDB.dbf' size 5000M autoextend on next 1000M maxsize unlimited extent management local segment space management auto;
C:\Users\Administrator>imp ctbt/111111@127.0.0.1/orcl file=E:\imp\daochu.dmp fromuser=vms touser=ctbt constraints=n ignore=y buffer=819200;
例如: IMP SCOTT/TIGER IGNORE=Y TABLES=(EMP,DEPT) FULL=N
*********无法为表空间 XX 中的段创建 INITIAL 区
- select * from dba_data_files where TABLESPACE_NAME='XX'--找到表空间文件
- alter database datafile '/opt/app/oracle/oradata/xx/xx03.dbf' autoextend on;
oracle常用命令总结的更多相关文章
- Oracle常用命令1
一. 安装是用户管理: sqlplus /nolog; connect /as sysdba; alter user sys identified by change_on_install; alte ...
- oracle常用命令【转载】
oracle常用命令 一.Oracle数据库实例.用户.目录及session会话查看: 1.ORACLE SID查看设置 查看SID.用户名 $ env|grep SID .select * from ...
- Data Base Oracle 常用命令
Data Base Oracle 常用命令 1.登录:(不需要密码,属于管理员权限) conn /as sysdba; 2.查看数据库存储位置: select name from v$datafil ...
- oracle常用命令(1)
oracle常用命令 一.登录 1.管理员身份登录:sqlplus/nolog--->conn/as sysdba 2.普通用户登录:sqlplus/nolog---->conn 用户名/ ...
- Oracle常用命令大全(很有用,做笔记)
一.ORACLE的启动和关闭 1.在单机环境下 要想启动或关闭ORACLE系统必须首先切换到ORACLE用户,如下 su - oracle a.启动ORACLE系统 oracle>svrmgrl ...
- oracle常用命令(比较常见好用)
一.ORACLE的启动和关闭 1.在单机环境下 要想启动或关闭ORACLE系统必须首先切换到ORACLE用户,如下 su - oracle a.启动ORACLE系统 oracle>svrmgr ...
- linux下 oracle常用命令
打开图形化窗口: 1)Database Configuration Assistant windows (添加数据库实例) $ dbca 2)Oracle Net Configuration A ...
- 收集整理的oracle常用命令大全
一.Oracle的启动和关闭 1.在单机环境下 要想启动或关闭ORACLE系统必须首先切换到ORACLE用户,如下 su - oracle a.启动ORACLE系统 oracle>svrmgrl ...
- Oracle常用命令大全
一.ORACLE的启动和关闭 1.在单机环境下 要想启动或关闭ORACLE系统必须首先切换到ORACLE用户,如下 su - oracle a.启动ORACLE系统 oracle>svrmgrl ...
随机推荐
- instanceof的用法②
其实这个问题以前也困扰过我.我个人理解的一个应用场合就是,当你拿到一个对象的引用时(例如参数), 你可能需要判断这个引用真正指向的类.所以你需要从该类继承树的最底层开始,使用instanceof操作符 ...
- Http,Https (SSL)的Url绝对路径,相对路径解决方案Security Switch 4.2 英文帮助文档 分类: ASP.NET 2014-10-28 10:50 147人阅读 评论(1) 收藏
Security Switch 4.2 =================== Security Switch enables various ASP.NET applications to auto ...
- HTML5 ArrayBufferView之DataView
DataView视图 如果一段数据包括多种类型(比如服务器传来的HTTP数据),这时除了建立ArrayBuffer对象的复合视图以外,还可以通过DataView视图进行操作. DataView视图提供 ...
- RegistryKey 类
表示 Windows 注册表中的项级节点. 此类是注册表封装. 继承层次结构 System.Object System.MarshalByRefObject Microsoft.Win32. ...
- android menu菜单自动生成
Android提供了一些简单的方法来为应用添加Menu菜单. 提供了三种类型应用菜单: 一.Options Menu:通过Menu按钮调用菜单 1.在/res/目录下新建menu文件夹,用于存储Men ...
- SQL server抽疯后修改sa密码无法成功的处理办法
今天上班打开电脑,发现尼玛所有项目启动后都报错,原因是说数据库sa的验证错误,无法进行数据库链接等等东西,简单地说---SQL server抽疯了!!!:( 昨天还好好的.而且没有修改过东西.为啥会出 ...
- animationWithKeyPath键值对
animationWithKeyPath键值对的方式来改变动画 <Jacky Shin:可以从这个网址查到哪些可以做为动画效果, 打开xcode帮助,搜索animatable propertie ...
- 解决Undefined symbols for architecture x86_64: 报错 和 ld: warning: ld: warning: ignoring file警告
出现这种错误的情况: 用iphone5模拟器编译程序正常, 用iphone5s以上的模拟器编译出现Undefined symbols for architecture x86_64: 报错 和 ld: ...
- C# 多线程、结构体
struct IpAndPort { public string Ip; public int Port; } private void Form1_Load(object sender, Event ...
- jQuery慢慢啃之特效(八)
1.show([speed,[easing],[fn]])\\显示隐藏的匹配元素 //speed:三种预定速度之一的字符串("slow","normal", o ...