|
-
my purpose is to get the path of the datafile from v$datafile and use the same to create a tablespace in that path.
this to be run in a script.
VAR TSP VARCHAR2(200);
SELECT '''' || SUBSTR(NAME,1,INSTR(NAME,'/',-1)) ||'demodata01.DBF'''
into :tsp
FROM V$DATAFILE
WHERE ROWNUM < 2;
--ACCEPT tsp PROMPT 'Enter the Datafile Location and Name:'
PROMPT PL. WAIT...! TABLE SPACE CREATION IN PROGRESS...!
exec execute immediate 'CREATE TABLESPACE demodata DATAFILE' || :tsp || ' SIZE 2048 M EXTENT MANAGEMENT LOCAL';
I GET THE FOLLOWING ERROR
ERROR at line 1:
ORA-02236: invalid file name
ORA-06512: at line 1
PL. LET ME KNOW THE SCRIPT
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|