@saltyang
2019-08-15T10:14:14.000000Z
字数 1273
阅读 578
Oracle
SELECT TABLESPACE_NAME FROM DBA_TABLESPACES;
Create tablespace TEST datafile 'D:\dev\oracle\product\10.2.0\TEST.dbf' size 20m uniform size 128k;
select file_name, bytes from dba_data_files where tablespace_name='TEST';
create table mypart(
deptno number(4),
dname varchar2(14),
loc varchar2(13)
) tablespace TEST;
alter tablespace TEST offline;
--表空间名不能加单引号, offline是脱机,online是联机 ,还可为read,write,只允许读,可设置为read only。alter tablespace TEST 'D:\dev\oracle\product\10.2.0\TEST.dbf' autoextend on next 10m maxsize 500m;
Select Table_Name, Tablespace_Name From Dba_Tables Where Tablespace_Name = 'TEST';
select tablespace_name, table_name from user_tables where table_name='MYPART';
desc MYPART;
Insert into mypart values(1, 'test_name', 'jiangsu');
Update mypart set DNAME='update_name' WHERE DEPART=2
;Drop table MYPART;
Drop TABLESPACE TEST including contents and datafiles;
Create user salt identified by 111111;
grant connect,resource,dba to salt;
启动CMD, 在命令行输入rman即可进入到系统里面去