|
DECLARE |
|
|
|
cursor mcrspos_tablespace_check is |
|
select tablespace_name |
|
from dba_tablespaces |
|
where tablespace_name = 'MCRSPOS'; |
|
v_tablespace varchar2(40); |
|
v_path VARCHAR2(100); |
|
sql_stmt VARCHAR2(10000); |
|
|
|
BEGIN |
|
|
|
open mcrspos_tablespace_check; |
|
fetch mcrspos_tablespace_check into v_tablespace; |
|
if mcrspos_tablespace_check%NOTFOUND |
|
then |
|
SELECT substr(file_name, 1,((INSTR(file_name,'\', -1, 1)))) |
|
into v_path |
|
from dba_data_files where rownum < 2; |
|
|
|
sql_stmt := 'CREATE TABLESPACE MCRSPOS LOGGING DATAFILE '||''''|| v_path||'mcrspos01.dbf'||''''||' SIZE 512M AUTOEXTEND ON NEXT 128M MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO'; |
|
|
|
|
|
execute immediate sql_stmt; |
|
|
|
end if; |
|
close mcrspos_tablespace_check; |
|
END; |
|
/ |
|
|
|
DECLARE |
|
|
|
cursor MCRSCACHE_tablespace_check is |
|
select tablespace_name |
|
from dba_tablespaces |
|
where tablespace_name = 'MCRSCACHE'; |
|
v_tablespace varchar2(40); |
|
v_path VARCHAR2(100); |
|
sql_stmt VARCHAR2(10000); |
|
|
|
BEGIN |
|
|
|
open MCRSCACHE_tablespace_check; |
|
fetch MCRSCACHE_tablespace_check into v_tablespace; |
|
if MCRSCACHE_tablespace_check%NOTFOUND |
|
then |
|
SELECT substr(file_name, 1,((INSTR(file_name,'\', -1, 1)))) |
|
into v_path |
|
from dba_data_files where rownum < 2; |
|
|
|
sql_stmt := 'CREATE TABLESPACE MCRSCACHE LOGGING DATAFILE '||''''|| v_path||'MCRSCACHE01.dbf'||''''||' SIZE 128M AUTOEXTEND ON NEXT 128M MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO'; |
|
|
|
execute immediate sql_stmt; |
|
|
|
end if; |
|
close MCRSCACHE_tablespace_check; |
|
END; |
|
/ |
|
DECLARE |
|
|
|
cursor COREDB_tablespace_check is |
|
select tablespace_name |
|
from dba_tablespaces |
|
where tablespace_name = 'COREDB'; |
|
v_tablespace varchar2(40); |
|
v_path VARCHAR2(100); |
|
sql_stmt VARCHAR2(10000); |
|
|
|
BEGIN |
|
|
|
open COREDB_tablespace_check; |
|
fetch COREDB_tablespace_check into v_tablespace; |
|
if COREDB_tablespace_check%NOTFOUND |
|
then |
|
SELECT substr(file_name, 1,((INSTR(file_name,'\', -1, 1)))) |
|
into v_path |
|
from dba_data_files where rownum < 2; |
|
|
|
sql_stmt := 'CREATE TABLESPACE COREDB LOGGING DATAFILE '||''''|| v_path||'COREDB01.dbf'||''''||' SIZE 128M AUTOEXTEND ON NEXT 128M MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO'; |
|
|
|
execute immediate sql_stmt; |
|
|
|
end if; |
|
close COREDB_tablespace_check; |
|
END; |
|
/ |
|
|
|
DECLARE |
|
|
|
cursor PORTALDB_tablespace_check is |
|
select tablespace_name |
|
from dba_tablespaces |
|
where tablespace_name = 'PORTALDB'; |
|
v_tablespace varchar2(40); |
|
v_path VARCHAR2(100); |
|
sql_stmt VARCHAR2(10000); |
|
|
|
BEGIN |
|
|
|
open PORTALDB_tablespace_check; |
|
fetch PORTALDB_tablespace_check into v_tablespace; |
|
if PORTALDB_tablespace_check%NOTFOUND |
|
then |
|
SELECT substr(file_name, 1,((INSTR(file_name,'\', -1, 1)))) |
|
into v_path |
|
from dba_data_files where rownum < 2; |
|
|
|
sql_stmt := 'CREATE TABLESPACE PORTALDB LOGGING DATAFILE '||''''|| v_path||'PORTALDB01.dbf'||''''||' SIZE 128M AUTOEXTEND ON NEXT 128M MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO'; |
|
|
|
execute immediate sql_stmt; |
|
|
|
end if; |
|
close PORTALDB_tablespace_check; |
|
END; |
|
/ |
|
|
|
|
|
DECLARE |
|
|
|
cursor LOCDB_tablespace_check is |
|
select tablespace_name |
|
from dba_tablespaces |
|
where tablespace_name = 'LOCDB'; |
|
v_tablespace varchar2(40); |
|
v_path VARCHAR2(100); |
|
sql_stmt VARCHAR2(10000); |
|
|
|
BEGIN |
|
|
|
open LOCDB_tablespace_check; |
|
fetch LOCDB_tablespace_check into v_tablespace; |
|
if LOCDB_tablespace_check%NOTFOUND |
|
then |
|
SELECT substr(file_name, 1,((INSTR(file_name,'\', -1, 1)))) |
|
into v_path |
|
from dba_data_files where rownum < 2; |
|
|
|
sql_stmt := 'CREATE TABLESPACE LOCDB LOGGING DATAFILE '||''''|| v_path||'LOCDB01.dbf'||''''||' SIZE 128M AUTOEXTEND ON NEXT 128M MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO'; |
|
|
|
execute immediate sql_stmt; |
|
|
|
end if; |
|
close LOCDB_tablespace_check; |
|
END; |
|
/ |
|
|
|
DECLARE |
|
|
|
cursor LOC_INDX_tablespace_check is |
|
select tablespace_name |
|
from dba_tablespaces |
|
where tablespace_name = 'LOC_INDX'; |
|
v_tablespace varchar2(40); |
|
v_path VARCHAR2(100); |
|
sql_stmt VARCHAR2(10000); |
|
|
|
BEGIN |
|
|
|
open LOC_INDX_tablespace_check; |
|
fetch LOC_INDX_tablespace_check into v_tablespace; |
|
if LOC_INDX_tablespace_check%NOTFOUND |
|
then |
|
SELECT substr(file_name, 1,((INSTR(file_name,'\', -1, 1)))) |
|
into v_path |
|
from dba_data_files where rownum < 2; |
|
|
|
sql_stmt := 'CREATE TABLESPACE LOC_INDX LOGGING DATAFILE '||''''|| v_path||'LOC_INDX01.dbf'||''''||' SIZE 128M AUTOEXTEND ON NEXT 128M MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO'; |
|
|
|
execute immediate sql_stmt; |
|
|
|
end if; |
|
close LOC_INDX_tablespace_check; |
|
END; |
|
/ |
|
|
|
DECLARE |
|
|
|
cursor RTA_tablespace_check is |
|
select tablespace_name |
|
from dba_tablespaces |
|
where tablespace_name = 'RTA'; |
|
v_tablespace varchar2(40); |
|
v_path VARCHAR2(100); |
|
sql_stmt VARCHAR2(10000); |
|
|
|
BEGIN |
|
|
|
open RTA_tablespace_check; |
|
fetch RTA_tablespace_check into v_tablespace; |
|
if RTA_tablespace_check%NOTFOUND |
|
then |
|
SELECT substr(file_name, 1,((INSTR(file_name,'\', -1, 1)))) |
|
into v_path |
|
from dba_data_files where rownum < 2; |
|
|
|
sql_stmt := 'CREATE TABLESPACE RTA LOGGING DATAFILE '||''''|| v_path||'RTA01.dbf'||''''||' SIZE 128M AUTOEXTEND ON NEXT 128M MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO'; |
|
|
|
execute immediate sql_stmt; |
|
|
|
end if; |
|
close RTA_tablespace_check; |
|
END; |
|
/ |
|
|
|
DECLARE |
|
|
|
cursor CEDB_tablespace_check is |
|
select tablespace_name |
|
from dba_tablespaces |
|
where tablespace_name = 'CEDB'; |
|
v_tablespace varchar2(40); |
|
v_path VARCHAR2(100); |
|
sql_stmt VARCHAR2(10000); |
|
|
|
BEGIN |
|
|
|
open CEDB_tablespace_check; |
|
fetch CEDB_tablespace_check into v_tablespace; |
|
if CEDB_tablespace_check%NOTFOUND |
|
then |
|
SELECT substr(file_name, 1,((INSTR(file_name,'\', -1, 1)))) |
|
into v_path |
|
from dba_data_files where rownum < 2; |
|
|
|
sql_stmt := 'CREATE TABLESPACE CEDB LOGGING DATAFILE '||''''|| v_path||'CEDB01.dbf'||''''||' SIZE 128M AUTOEXTEND ON NEXT 128M MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO'; |
|
|
|
execute immediate sql_stmt; |
|
|
|
end if; |
|
close CEDB_tablespace_check; |
|
END; |
|
/ |
|
|
|
DECLARE |
|
|
|
cursor TEMP_tablespace_check is |
|
select tablespace_name |
|
from dba_tablespaces |
|
where tablespace_name = 'TEMP'; |
|
v_tablespace varchar2(40); |
|
v_path VARCHAR2(100); |
|
sql_stmt VARCHAR2(10000); |
|
|
|
BEGIN |
|
|
|
open TEMP_tablespace_check; |
|
fetch TEMP_tablespace_check into v_tablespace; |
|
if TEMP_tablespace_check%NOTFOUND |
|
then |
|
SELECT substr(file_name, 1,((INSTR(file_name,'\', -1, 1)))) |
|
into v_path |
|
from dba_data_files where rownum < 2; |
|
|
|
sql_stmt := 'CREATE TABLESPACE TEMP LOGGING DATAFILE '||''''|| v_path||'TEMP01.dbf'||''''||' SIZE 128M AUTOEXTEND ON NEXT 128M MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO'; |
|
|
|
execute immediate sql_stmt; |
|
|
|
end if; |
|
close TEMP_tablespace_check; |
|
END; |
|
/ |
|
|
|
DECLARE |
|
|
|
cursor AGG_INDX_tablespace_check is |
|
select tablespace_name |
|
from dba_tablespaces |
|
where tablespace_name = 'AGGREGATE_INDX'; |
|
v_tablespace varchar2(40); |
|
v_path VARCHAR2(100); |
|
sql_stmt VARCHAR2(10000); |
|
|
|
BEGIN |
|
|
|
open AGG_INDX_tablespace_check; |
|
fetch AGG_INDX_tablespace_check into v_tablespace; |
|
if AGG_INDX_tablespace_check%NOTFOUND |
|
then |
|
SELECT substr(file_name, 1,((INSTR(file_name,'\', -1, 1)))) |
|
into v_path |
|
from dba_data_files where rownum < 2; |
|
|
|
sql_stmt := 'CREATE TABLESPACE AGGREGATE_INDX LOGGING DATAFILE '||''''|| v_path||'AGGREGATE_INDX01.dbf'||''''||' SIZE 128M AUTOEXTEND ON NEXT 128M MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO'; |
|
|
|
execute immediate sql_stmt; |
|
|
|
end if; |
|
close AGG_INDX_tablespace_check; |
|
END; |
|
/ |
|
/ |
|
|
|
DECLARE |
|
|
|
cursor AGGREGATE_DB_tablespace_check is |
|
select tablespace_name |
|
from dba_tablespaces |
|
where tablespace_name = 'AGGREGATE_DB'; |
|
v_tablespace varchar2(40); |
|
v_path VARCHAR2(100); |
|
sql_stmt VARCHAR2(10000); |
|
|
|
BEGIN |
|
|
|
open AGGREGATE_DB_tablespace_check; |
|
fetch AGGREGATE_DB_tablespace_check into v_tablespace; |
|
if AGGREGATE_DB_tablespace_check%NOTFOUND |
|
then |
|
SELECT substr(file_name, 1,((INSTR(file_name,'\', -1, 1)))) |
|
into v_path |
|
from dba_data_files where rownum < 2; |
|
|
|
sql_stmt := 'CREATE TABLESPACE AGGREGATE_DB LOGGING DATAFILE '||''''|| v_path||'AGGREGATE_DB01.dbf'||''''||' SIZE 128M AUTOEXTEND ON NEXT 128M MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO'; |
|
|
|
execute immediate sql_stmt; |
|
|
|
end if; |
|
close AGGREGATE_DB_tablespace_check; |
|
END; |
|
/ |
|
/ |
|
|
|
DECLARE |
|
|
|
cursor PENTAHO_tablespace_check is |
|
select tablespace_name |
|
from dba_tablespaces |
|
where tablespace_name = 'PENTAHO'; |
|
v_tablespace varchar2(40); |
|
v_path VARCHAR2(100); |
|
sql_stmt VARCHAR2(10000); |
|
|
|
BEGIN |
|
|
|
open PENTAHO_tablespace_check; |
|
fetch PENTAHO_tablespace_check into v_tablespace; |
|
if PENTAHO_tablespace_check%NOTFOUND |
|
then |
|
SELECT substr(file_name, 1,((INSTR(file_name,'\', -1, 1)))) |
|
into v_path |
|
from dba_data_files where rownum < 2; |
|
|
|
sql_stmt := 'CREATE TABLESPACE PENTAHO LOGGING DATAFILE '||''''|| v_path||'PENTAHO01.dbf'||''''||' SIZE 128M AUTOEXTEND ON NEXT 128M MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO'; |
|
|
|
execute immediate sql_stmt; |
|
|
|
end if; |
|
close PENTAHO_tablespace_check; |
|
END; |
|
/ |
|
quit; |
Hi bro
good job pls i need your help to install this version on win2012 R2