-
I am trying to create a job using OEM that will use SQL*Plus. I am running a simple script (select sysdate from dual; ), but I keep getting the same error:
SP2-0306: Invalid option.
Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}] | [INTERNAL]
where ::= [/][@] | /
SP2-0306: Invalid option.
Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}] | [INTERNAL]
where ::= [/][@] | /
It seems that OEM is not able to logon and issue the select statement. Any ideas? I have OEM on windows2000, management server on the same machine, and connecting to a unix(DYNIX/PTX) database. The intelligent agent on the unix server is running fine. Thanks.
Arm yourself with knowledge
-
two ways to solve this problem.
First method: set up the preferred credentials in the preferences for that database you want to access.
Second method: Enter user login info on the parameters tab.
Susan
-
Thanks Susan
I have tried both of those options with the SYSTEM user before but I get the same error.
Dean
Arm yourself with knowledge
-
Dean,
I just tried to run your sql through OEM jobs and it worked.
Here are the steps:
1. Create a job > (jobname)
2. select Destination Type i.e. (Database)
3. select Destination i.e. (Database Name)
4. In Tasks window select "Run SQL*Plus Script"
5. In Parameter window type "select sysdate from dual;" in Script Text
6. In Schedule window check radio button "Immediately"
7. Click submit & save to library
When the job completed, view job in Job History window, check Progress, highlight Completed and click Show Output.
Hopefully, you'll see the output.
Cheers!
Farrukh
-
I believe that you have validated the user login and password from both oem console and sql*plus application. How did you create that sql*plus job which failed?
Susan
-
I create the job exactly as FARRUKH described. The output generated lists the error I stated. It seems that I am creating the job correctly. The preferred credentials are for a valid database user and not and OS user, right?
Arm yourself with knowledge
-
Dean,
You should have both OS user & Database user in preferred credentials.
Cheers!
Farrukh
-
If you use the global_name on the listener.ora file, make sure no double quotation mark around the value.
Delete all IA configuration files, such as services.ora, snmp_ro.ora,etc. Then, restart the IA and listener, and discover nodes on OEM console.
Run your job.
Hope this would take care of your problem.
Susan
-
It is not required to have both OS user & Database user in preferred credentials. It will save time for login.
Susan
-
I have changed all accounts to the same username and password (win2k, oracle, oem, unix). Now the job is submitted and hangs in the active state. I cannot remove the job.
Arm yourself with knowledge
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
|