Home » Infrastructure » Unix » environment variables in export parameter files
environment variables in export parameter files [message #128295] Sun, 17 July 2005 06:25 Go to next message
reuven
Messages: 3
Registered: July 2005
Location: israel
Junior Member
hi

i'm trying to create an export parameter file,
which will include an unix environment-variable

the calling script is:
#!/bin/ksh

TABLE_NAME=my_table_in_the_DB
export TABLE_NAME
exp tlsdbo45/apdo45@tls6 BUFFER=100000 STATISTICS=NONE parfile=exppar.dat


the parameter file is:
file=dump.dmp
tables=$TABLE_NAME
log=emp.txt



when i run the calling script
i got the following error:
Export: Release 9.2.0.6.0 - Production on Sun Jul 17 14:16:21 2005

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.


Connected to: Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.6.0 - Production
Export done in WE8ISO8859P1 character set and AL16UTF16 NCHAR character set

About to export specified tables via Conventional Path ...

EXP-00011: TLSDBO45.$TABLE_NAME does not exist
Export terminated successfully with warnings.

someone knows how can i solve the problem?
thanks

[Updated on: Sun, 17 July 2005 06:27]

Report message to a moderator

Re: environment variables in export parameter files [message #128296 is a reply to message #128295] Sun, 17 July 2005 06:28 Go to previous messageGo to next message
Frank Naude
Messages: 4579
Registered: April 1998
Senior Member
Remove "tables=$TABLE_NAME" from your parameter file and add it to the command line:

exp tlsdbo45/apdo45@tls6 BUFFER=100000 STATISTICS=NONE parfile=exppar.dat tables=$TABLE_NAME


Best regards.

Frank
icon7.gif  Re: environment variables in export parameter files [message #128297 is a reply to message #128296] Sun, 17 July 2005 06:32 Go to previous messageGo to next message
reuven
Messages: 3
Registered: July 2005
Location: israel
Junior Member
hi
thanks for your quick answer Razz

do you know if there is any option to keep the tables
in the parameter file (with env_variables)?

i need it in the parameter files
becouse of other Razz reasons
Re: environment variables in export parameter files [message #128298 is a reply to message #128297] Sun, 17 July 2005 06:39 Go to previous messageGo to next message
Frank Naude
Messages: 4579
Registered: April 1998
Senior Member
The only alternative is to write code to generate a new parameter file before you call the exp command.

Something like this should do:

$ cat <<EOF >exppar.dat
file=dump.dmp
tables=$TABLE_NAME
log=emp.txt
EOF


Best regards.

Frank
Re: environment variables in export parameter files [message #128299 is a reply to message #128298] Sun, 17 July 2005 06:50 Go to previous message
reuven
Messages: 3
Registered: July 2005
Location: israel
Junior Member
perfect for me, thanks
Previous Topic: Accessing SQL session from UNIX shell script
Next Topic: printing problem, temp file gets truncated
Goto Forum:
  


Current Time: Thu Apr 18 05:26:46 CDT 2024