yeah i know. However, this is deployed to a client and then I have to be sure i have write privileges on the file system. I can't guarantee that since Im sending it to them to run. ----- Original Message ----- From: "Powell, Mark D" <mark.powell@xxxxxxx> To: <oracle-l@xxxxxxxxxxxxx> Sent: Friday, February 20, 2004 1:23 PM Subject: RE: help dynamically adding a 'datafile' to a script > I only partially understand what you are trying to do but the string > concatenation is wrong. You need two separate quoted strings: > > SQL> select '&cPath'||' mytablespace.dbf' > 2 from dual > 3 / > Enter value for cpath: xxx > old 1: select '&cPath'||' mytablespace.dbf' > new 1: select 'xxx'||' mytablespace.dbf' > > 'XXX'||'MYTABLESPACE > -------------------- > xxx mytablespace.dbf > > I think what you really want to do is write a select to generate the create > tablespace and spool that to a file where it can be called passing > positional parameters > > > SQL> set define off > SQL> > SQL> select 'create tablespace &1 '|| > 2 'datafile '||'&2'||'&1'||' size 5M;' > 3 from dual > 4 / > > 'CREATETABLESPACE&1'||'DATAFILE'||'&2'||'&1 > ------------------------------------------- > create tablespace &1 datafile &2&1 size 5M; > > > then you would issue start cretblspc mytablespace 'C:\\xxxxxxx\'. Some > minor coding may be required along with a fair number of SQLPlus set > statements: feedback, linesize, pagesize, etc... > > > -----Original Message----- > From: oracle-l-bounce@xxxxxxxxxxxxx > [mailto:oracle-l-bounce@xxxxxxxxxxxxx]On Behalf Of ryan.gaffuri@xxxxxxx > Sent: Friday, February 20, 2004 12:30 PM > To: oracle-l@xxxxxxxxxxxxx > Subject: help dynamically adding a 'datafile' to a script > > > I am trying to do the following and I cant get it to take(I would prefer not > to use dynamic sql and write my create tablespace scripts to a second file). > > Prompt Please enter a datafile path > Accept cPath > > create tablespace myTablespace datafile '&cPath ||mytablespace.dbf' size 5m; > > I've tried lots of methods including bind variables and appending before the > create tablespace statement. Any way to do this? > > ---------------------------------------------------------------- > Please see the official ORACLE-L FAQ: http://www.orafaq.com > ---------------------------------------------------------------- > To unsubscribe send email to: oracle-l-request@xxxxxxxxxxxxx > put 'unsubscribe' in the subject line. > -- > Archives are at //www.freelists.org/archives/oracle-l/ > FAQ is at //www.freelists.org/help/fom-serve/cache/1.html > ----------------------------------------------------------------- > ---------------------------------------------------------------- > Please see the official ORACLE-L FAQ: http://www.orafaq.com > ---------------------------------------------------------------- > To unsubscribe send email to: oracle-l-request@xxxxxxxxxxxxx > put 'unsubscribe' in the subject line. > -- > Archives are at //www.freelists.org/archives/oracle-l/ > FAQ is at //www.freelists.org/help/fom-serve/cache/1.html > ----------------------------------------------------------------- ---------------------------------------------------------------- Please see the official ORACLE-L FAQ: http://www.orafaq.com ---------------------------------------------------------------- To unsubscribe send email to: oracle-l-request@xxxxxxxxxxxxx put 'unsubscribe' in the subject line. -- Archives are at //www.freelists.org/archives/oracle-l/ FAQ is at //www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------