Home » Other » Client Tools » Passing parameter to sqlplus script
Passing parameter to sqlplus script [message #674400] Fri, 25 January 2019 05:06 Go to previous message
ramya29p
Messages: 146
Registered: November 2007
Location: Chennai
Senior Member
Hi,
I want to pass parameter to the .sql file via sqlplus script for connecting the Database.

I have created a batch file having below script.
sqlplus /nolog @schema_compile.sql

schema_compile.sql file with below script
conn schema_name
sho user
exec dbms_utility.compile_schema('schema_name',FALSE)

I tried passing the parameter, but it did not work.
sqlplus /nolog @schema_compile.sql schema_name

schema_compile.sql file with below script
conn &1
sho user
exec dbms_utility.compile_schema('&1',FALSE)


Could anyone please help me.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Blank rows in spooled txt output file using SQL developer
Next Topic: FNDLOAD for Specific DFF Context
Goto Forum:
  


Current Time: Fri Apr 26 17:14:48 CDT 2024