停止 ble parameter man 锁表 process 最大并发数 eve
--cmd导入导出数据库bmp文件
1.执行查询结果中的语句( select ‘alter table ‘||table_name||‘ allocate extent;‘ from user_tables where num_rows=0 )
2.然后再执行 cmd ==》 导入:imp [email protected] file=E:\DB\srm.dmp ignore=y full=y
导出: exp [email protected] file=D:\dmp\exp_sms20110224.dmp log=D:\dmp\exp_smsrun.log
参考:http://www.cnblogs.com/Jingkunliu/p/3298597.html
--创建表空间1.create tablespace luxisrm datafile ‘E:\DB\OrcleTbSpece\LuXiSrm.ora‘ size 100m
2.二、通过PL/SQL Developer工具创建表空间
通过pl/sql登录到Oracle数据库上,然后执行菜单:文件/新建/命令窗口 ,打开一个命令窗口然后在该命令窗口中执行脚本创建和删除表空间
create tablespace TestDBdatafile ‘D:\oracle\Administrator\oradata\orcl\TestDB.dbf‘ size 10Mautoextend on next 1M maxsize unlimited loggingextent management local autoallocatesegment space management auto;解释:
1) DATAFILE: 表空间数据文件存放路径
2) SIZE: 起初设置为10M
3) UNIFORM: 指定区尺寸为128k,如不指定,区尺寸默认为64k
4) 空间名称TestDB与 数据文件名称 TestDB.dbf 不要求相同,可随意命名.
5) AUTOEXTEND ON/OFF表示启动/停止自动扩展表空间
6) ALTER DATABSAE DATAFILE ‘D:\oracle\Administrator\oradata\orcl\TestDB.dbf ‘ resize 5M; //手动修改数据文件大小为5M
7) DROP TABLESPACE MOF_TEMP INCLUDING CONTENTS AND DATAFILES; //删除表空间
--删除表空间alter tablespace luxisrm offline;drop tablespace luxisrm including contents and datafiles;
-- 快速删除所有表数据http://www.cnblogs.com/chinhr/archive/2011/11/14/2248221.html
-- 表空间不足处理select b.file_name 物理文件名, b.tablespace_name 表空间, b.bytes / 1024 / 1024 大小M, (b.bytes - sum(nvl(a.bytes, 0))) / 1024 / 1024 已使用M, substr((b.bytes - sum(nvl(a.bytes, 0))) / (b.bytes) * 100, 1, 5) 利用率 from dba_free_space a, dba_data_files b where a.file_id = b.file_id group by b.tablespace_name, b.file_name, b.bytes order by b.tablespace_name;
--更改表空间大小SQL: alter tablespace srm add datafile ‘D:\ORACLE\ORADATA\ORCL\SYSTEM01.DBF‘ size 1000m; --可用 alter database datafile ‘E:\DB\OrcleTbSpece\SRM.ORA‘ resize 500M;
--- --查看连接数 select count(*) from v$process --查看充许链接数 select value from v$parameter where name=‘processes‘ --查看最大并发数 select * from v$license
--锁表查询SQLSELECT object_name, machine, s.sid, s.serial# FROM gv$locked_object l, dba_objects o, gv$session s WHERE l.object_id = o.object_id AND l.session_id = s.sid;
--释放SESSION SQL: --alter system kill session ‘sid, serial#‘; ALTER system kill session ‘23, 31054‘;
----------修改表空间
alter table spaceOne.tablename move tablespace spaceTwo;
--1.修改表的空间alter table a123 move tablespace BEIWEISRMTESTSPACES
--查询当前用户下的所有表select ‘alter table ‘|| table_name ||‘ move tablespace tablespacename;‘ from user_tables;
--2.修改表的索引的空间alter index SYS_C0046485 rebuild tablespace BEIWEISRMTESTSPACES
--查询当前用户下的所有索引select ‘alter index ‘|| index_name ||‘ rebuild tablespace tablespacename;‘ from user_indexes;
oracle 操作积累
来源: http://www.bubuko.com/infodetail-2020034.html