I am trying to run the following unix command in a Routine Activity of a Seqence
'echo "EXEC DBMS_STATS.gather_table_stats(' : DEST_US : ',' : DEST_TBL : ')" | sqlplus ' : DEST_US : '/' : DEST_PW : '@' :DEST_DB
DEST_TBL, DEST_US, DEST_PW and DEST_DB are job parameters.
the single quotes are required for the Pl/Sql function DBMS_STATS but I cannot find an escape character. Required arguments are:
DBMS_STATS.gather_table_stats('Database User','Database Table')
As a result I get something like the following (I've put the parameter names back in instead of the actual database names):
*** Output from command was: ***
SQL> BEGIN DBMS_STATS.gather_table_stats(DEST_US,DEST_TBL); END;
*
ERROR at line 1:
ORA-06550: line 1, column 37:
PLS-00201: identifier 'DEST_US' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Any ideas?
[Rock Over London, Rock On Chicago. Business Gas: Energy For Excellence]
Escape Character in ExecSH Routine Activity Sequence Job
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: