create tablespace with multiple datafiles
CREATE TABLESPACE TBS_DATA
DATAFILE
'/oradata/PCDB/PINSV/tbs_data_001.dbf' SIZE 1G AUTOEXTEND ON NEXT 100M MAXSIZE 25G,
'/oradata/PCDB/PINSV/tbs_data_002.dbf' SIZE 1G AUTOEXTEND ON NEXT 100M MAXSIZE 25G,
'/oradata/PCDB/PINSV/tbs_data_003.dbf' SIZE 1G AUTOEXTEND ON NEXT 100M MAXSIZE 25G;
CREATE TABLESPACE TBS_INDEX
DATAFILE
'/oradata/PCDB/PINSV/tbs_index_001.dbf' SIZE 1G AUTOEXTEND ON NEXT 100M MAXSIZE 25G,
'/oradata/PCDB/PINSV/tbs_index_002.dbf' SIZE 1G AUTOEXTEND ON NEXT 100M MAXSIZE 25G,
'/oradata/PCDB/PINSV/tbs_index_003.dbf' SIZE 1G AUTOEXTEND ON NEXT 100M MAXSIZE 25G;
--windows----
CREATE TABLESPACE TBS_DATA
DATAFILE
'D:\ORACLE\ORA11G\APP\ADMINISTRATOR\ORADATA\PRAN\tbs_data_001.dbf' SIZE 1G AUTOEXTEND ON NEXT 100M MAXSIZE 25G,
'D:\ORACLE\ORA11G\APP\ADMINISTRATOR\ORADATA\PRAN\tbs_data_002.dbf' SIZE 1G AUTOEXTEND ON NEXT 100M MAXSIZE 25G,
'D:\ORACLE\ORA11G\APP\ADMINISTRATOR\ORADATA\PRAN\tbs_data_003.dbf' SIZE 1G AUTOEXTEND ON NEXT 100M MAXSIZE 25G;
CREATE TABLESPACE TBS_INDEX
DATAFILE
'D:\ORACLE\ORA11G\APP\ADMINISTRATOR\ORADATA\PRAN\tbs_index_001.dbf' SIZE 1G AUTOEXTEND ON NEXT 100M MAXSIZE 25G,
'D:\ORACLE\ORA11G\APP\ADMINISTRATOR\ORADATA\PRAN\tbs_index_002.dbf' SIZE 1G AUTOEXTEND ON NEXT 100M MAXSIZE 25G,
'D:\ORACLE\ORA11G\APP\ADMINISTRATOR\ORADATA\PRAN\tbs_index_003.dbf' SIZE 1G AUTOEXTEND ON NEXT 100M MAXSIZE 25G;
SELECT TABLESPACE_NAME FROM ALL_TABLES@LINK WHERE TABLESPACE_NAME NOT IN (SELECT TABLESPACE_NAME FROM DBA_DATA_FILES)
Comments
Post a Comment