sql server

Alter tablespace  hwmarket_data  add datafile
'F:\ORACLE\PRODUCT\10.2.0\ORADATA\HWMARKET\hwmarketdb_07.ora' size 1000M;


ALTER DATABASE DATAFILE 'F:\ORACLE\PRODUCT\10.2.0\ORADATA\HWMARKET\hwmarketdb_07.ora' ONLINE;


alter database datafile 'F:\ORACLE\PRODUCT\10.2.0\ORADATA\HWMARKET\hwmarketdb_07.ora' offline drop;

create table dist_table nologging as select * from src_table

alter database create datafile 'F:\ORACLE\PRODUCT\10.2.0\ORADATA\HWMARKET\hwmarketdb_07.ora' as 'F:\ORACLE\PRODUCT\10.2.0\ORADATA\HWMARKET\hwmarketdb_07.ora';

select name,status from v$datafile;

select file#,status,enabled,name,BYTES/(1024*1024)||'M' as filesize from v$datafile where STATUS ='RECOVER';
select file#,status,enabled,name,BYTES/(1024*1024)||'M' as filesize  from v$datafile where STATUS ='OFFLINE';
select file#,status,enabled,name,BYTES/(1024*1024)||'M' as filesize from v$datafile where STATUS ='ONLINE';


--HWMARKETDB06.ORA

select username, default_tablespace defspace from dba_users where username='hwmarket';

你可能感兴趣的:(sql)