Error running SQL and EXEC commands in parallel
Dear Gurus,
We are applying 3480000 and in process as soon as workers start it come out of adpatch session and give su the following error:
************* Start of AD Worker session *************
AD Worker version: 11.5.0
AD Worker started at: Sun Sep 02 2007 23:11:01
APPL_TOP is set to /sgmtemp/prodappl
Worker process 4 started.
Checking if all jobs have their actual and symbolic arguments in sync....
Done.
Writing jobs to run to restart file.
Reading jobs from FND_INSTALL_PROCESSES table ...
Done reading jobs from FND_INSTALL_PROCESSES table ...
Telling workers to read 'todo' restart file.
Done.
Starting phase 0 (A0): first
There are now 98197 jobs remaining (current phase=A0):
0 running, 123 ready to run and 98074 waiting.
Assigned: file adsysapp2.sql on worker 1 for product admin username APPLSYS.
Assigned: file cssruwq1.sql on worker 2 for product cs username CS.
Connecting to CSD......Unable to connect.
AutoPatch error:
The following ORACLE error:
ORA-01017: invalid username/password; logon denied
occurred while executing the SQL statement:
CONNECT CSD/*****
AutoPatch error:
Error while evaluating "Check Object"
Telling workers to quit...
3 workers have quit. Waiting for 1 more.
All workers have quit.
Error running SQL and EXEC commands in parallel
You should check the file
/sgmtemp/prodappl/admin/msbep004/log/3480000_sbm3.log
for errors.
applmgr@21:/sgmtemp/Oglupgr/3480000>
What could be the issue, i tried to connect CSD/CSD in sql and it connected.
Thanks in Advance
Regards
Kiran Rana
Hi Gurus,
Even i tried to recreate the FND_GLOBAL by performing the following, but still no luck:
output for scripts hearder value in FND_TOP:
applmgr@21:/sgmtemp/prodcomn/temp> cd $FND_TOP/patch/115/sql
applmgr@21:/sgmtemp/prodappl/fnd/11.5.0/patch/115/sql> grep Header AFSCGBL*
AFSCGBLB.pls:/* $Header: AFSCGBLB.pls 115.78 2005/03/21 11:40:02 vbalakri ship $ */
AFSCGBLS.pls:/* $Header: AFSCGBLS.pls 115.33 2004/06/30 05:00:18 rsheh ship $ */
Output for script header value in Database:
SQL> select text from dba_source where name='FND_GLOBAL' and line <5;
TEXT
package FND_GLOBAL as
/* $Header: AFSCGBLS.pls 115.33 2004/06/30 05:00:18 rsheh ship $ */
package body FND_GLOBAL as
/* $Header: AFSCGBLB.pls 115.78 2005/03/21 11:40:02 vbalakri ship $ */
8 rows selected.
We tried to re-apply 4 hours back when one of the support personnal ask use to run those
scripts. one of them went with out any errors but second one went with errors
as follows:
First Script @AFSCGBLS.pls
applmgr@21:/sgmtemp/prodappl/fnd/11.5.0/patch/115/sql> sapps @AFSCGBLS.pls
SQL*Plus: Release 8.0.6.0.0 - Production on Mon Sep 3 03:24:10 2007
(c) Copyright 1999 Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production
With the Partitioning and Oracle Data Mining options
JServer Release 9.2.0.7.0 - Production
DOC> | Copyright (c) 1993 Oracle Corporation Redwood Shores, California, USA|
DOC> | All rights reserved. |
DOC> +=======================================================================+
DOC> | FILENAME
DOC> | AFSCGBLS.pls
DOC> |
DOC> | DESCRIPTION
DOC> | PL/SQL specification for package: FND_GLOBAL
DOC> |
DOC> | NOTES
DOC> | This module is called by AutoInstall (afplss.drv) on install and
DOC> | upgrade. The WHENEVER SQLERROR and EXIT (at bottom) are required.
DOC> |
DOC> | HISTORY
DOC> | June, 1999 - Added function AUDIT_ACTIVE, bug 879630. Jan Smith.
DOC> | 11/19/01 MSkees - Added DBDrv line and 'SET VERIFY OFF' for ARU auto
DOC> | generation bug 2047263 build
DOC> |
DOC> *=======================================================================*/
Package created.
Commit complete.
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production
With the Partitioning and Oracle Data Mining options
JServer Release 9.2.0.7.0 - Production
Second Script AFSCGBLB.pls:
applmgr@21:/sgmtemp/prodappl/fnd/11.5.0/patch/115/sql> sapps @AFSCGBLB.pls <
SQL*Plus: Release 8.0.6.0.0 - Production on Mon Sep 3 03:27:15 2007
(c) Copyright 1999 Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production
With the Partitioning and Oracle Data Mining options
JServer Release 9.2.0.7.0 - Production
Warning: Package Body created with compilation errors.
Commit complete.
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production
With the Partitioning and Oracle Data Mining options
JServer Release 9.2.0.7.0 -
Production
applmgr@21:/sgmtemp/prodappl/fnd/11.5.0/patch/115/sql>
The second script (AFSCGBLB.pls) run's out with errors and changes status of almost 15000 objects as INVALID in database.
Regards
Kiran Rana
Similar Messages
-
Adpatch: Error running SQL and EXEC commands in parallel
Hi
I am applying R12 RUP2 to an instance at the moment. I had an OS crash (I'm running R12 on Linux on VMWARE) and on reboot attempted to restart the patch.
I now get an error as follows:
Error running SQL and EXEC commands in parallel
I must admit, I'm not a DBA, so if anyone has any ideas or has seen this before then it would be most appreciated!
Thanks
ChrisHi Adith
The patch is 5484000, RUP 2 for E-Business Suite R12
Here's the adpatch output:
Start date: Wed Sep 12 2007 15:15:14
0 "left over" javaupdates.txt files uploaded to DB: Wed Sep 12 2007 15:15:14
0 patches uploaded from the ADPSV format patch history files: Wed Sep 12 2007 15:15:14
Uploading information about files copied during the previous runs ...
0 "left over" filescopied_<session_id>.txt files uploaded to DB: Wed Sep 12 2007 15:15:14
****************** E N D O F U P L O A D ******************
End date: Wed Sep 12 2007 15:15:14
Already asked for the name of the patch directory.
(The answer was: /oracle/patches/5484000)
Already asked for the name of the patch driver file.
(The answer was: /oracle/patches/5484000/u5484000.drv)
Reading release list save file...
Done reading release list save file
Log and Info File sync point:
Wed Sep 12 2007 15:15:15
Turning off actions that reference unrecognized products.
Log and Info File sync point:
Wed Sep 12 2007 15:15:15
End of unrecognized products checking.
(The number of parallel workers is: " 2 ")
AutoPatch will run in parallel mode.
Did not need to apply new applterr.txt.
Skipping...
Determine directories to create for Specified driver
since no such action is present for this driver file
Skipping...
Determine Oracle Reports libraries to generate for Specified driver
since no such action is present for this driver file
Skipping...
Determine if need to generate message files for Specified driver
since no such action is present for this driver file
Skipping...
Create Directories for Specified driver
since no such action is present for this driver file
Number of invalid objects: 31057
Running SQL scripts and EXEC commands...
Determining which SQL and EXEC commands to run...
Validating PL/SQL direct execute exceptions file ...
Done validating PL/SQL direct execute exceptions file.
SERVICE_NAME/INSTANCE_NAME : [VIS]
connect_string : [(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ebusr12.chriseebee.me.uk)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=VIS)))]
Done determining which SQL and EXEC commands to run.
Running SQL and EXEC commands in parallel...
Creating the AD_UTIL_PARAMS table...
Table AD_UTIL_PARAMS already exists, so dropping the table and recreating it.
Creating FND_INSTALL_PROCESSES table...
Already created fnd_install_processes table
Already created FND_INSTALL_PROCESSES_U1 index.
Already created AD_DEFERRED_JOBS table
Already created AD_DEFERRED_JOBS_U1 index.
Writing dependencies of jobs to run to appldep.txt file...
There are now 7569 jobs remaining (current phase=A0):
0 running, 5 ready to run and 7564 waiting.
Reading completed jobs from restart file (if any).
There are now 3474 jobs remaining (current phase=A18):
0 running, 1 ready to run and 3473 waiting.
Determining which java executables are supported by adJavaWorker...
Starting worker processes.
Worker process 1 started.
Worker process 2 started.
Checking if all jobs have their actual and symbolic arguments in sync....
Done.
Writing jobs to run to restart file.
Reading jobs from FND_INSTALL_PROCESSES table ...
Running: file adobjcmp.sql on worker 1 for product ad username APPLSYS.
AutoPatch error:
The worker should not have status 'Running' or 'Restarted' at this point.
Telling workers to quit...
************* Start of AD Worker session *************
AD Worker version: 12.0.0
AD Worker started at: Wed Sep 12 2007 15:15:34
APPL_TOP is set to /oracle/VIS/apps/apps_st/appl
************* Start of AD Worker session *************
AD Worker version: 12.0.0
AD Worker started at: Wed Sep 12 2007 15:15:34
APPL_TOP is set to /oracle/VIS/apps/apps_st/appl
All workers have quit.
AutoPatch error:
Error running SQL and EXEC commands in parallel
You should check the file
/oracle/VIS/apps/apps_st/appl/admin/VIS/log/adpatch.log
for errors. -
Error running SQL and EXEC commands in parallel when adpatch
Hi,
AutoPatch error:
aiprfp: product 'cle' not in release 'R120'
AutoPatch error:
Error running SQL and EXEC commands in parallel
Freeing includes hash table
Freeing fixes hash table
Freeing basedons hash table
Freeing entities hash table
You should check the file
/a02/prod/apps/apps_st/appl/admin/PROD/log/adpatch_7305220_1.log
for errors.
How to resolve this errror while applying patch 7305220.
Regards,Hi,
Please check logfile */a02/prod/apps/apps_st/appl/admin/PROD/log/adpatch_7305220_1.log* for any errors recoded.
Post error messages from this logfile.This is the main patch log file and it should show the same error "aiprfp: product 'cle' not in release 'R120'".
Thanks,
Hussein -
RMAN-10006: error running SQL statement: alter session set remote_dependenc
Backups are failing with following error
RMAN-00554: initialization of internal recovery manager package failed
RMAN-12001: could not open channel default
RMAN-10008: could not create channel context
RMAN-10002: ORACLE error: ORA-00096: invalid value SIGNATURE for parameter remote_dependencies_mode, must be from among MANUAL, AUTO
RMAN-10006: error running SQL statement: alter session set remote_dependencies_mode = signature
Not able to change to signature
SQL> alter session set remote_dependencies_mode=signature;
ERROR:
ORA-00096: invalid value SIGNATURE for parameter remote_dependencies_mode, must
be from among MANUAL, AUTO
I dont see MANUAL or AUTO as valid value for this parameter (http://download.oracle.com/docs/cd/B10501_01/server.920/a96536/ch1175.htm#1023124) DB version is 9.2.0
Parameter type
String
Syntax
REMOTE_DEPENDENCIES_MODE = {TIMESTAMP | SIGNATURE}
Default value
TIMESTAMP
Parameter class
Dynamic: ALTER SESSION, ALTER SYSTEM
=======================================
I believe it could be because of following bug
"A PRE-PATCHED ORACLE IMAGE CAN BE INSTALLED IN MEMORY "
Refer: "https://metalink2.oracle.com/metalink/plsql/f?p=130:15:1613505143885559758::::p15_database_id,p15_docid,p15_show_header,p15_show_help,p15_black_frame,p15_font:BUG,4610411,1,1,1,helvetica"
I appreciate your effort in fixing this issue.
Edited by: user10610722 on Nov 25, 2008 4:37 PMHi:
It seems when you are starting RMAN it's executing some commands (one 'ALTER SESSION...'. It's seems to be a batch which has a bad value for SORT_AREA_SIZE. Find it and modify to a proper value as message shows. If you can't find start RMAN by calling directly the executable ($ORACLE_HOME/bin/rman or %ORACLE_HOME%/bin/rman.exe). -
How to run SQL and export results to Excel
My task is to run a custom SQL script and create Excel file via running SQL Developer from command line (invoked by a scheduled script). Is this possible using SQL Developer?
The thing I'm trying first is to run a user-defined report in SQL Developer and save the results to an Excel file. Only 16000 result rows, but took 10 minutes to do the export and still cannot finish. Is there another way to do it?
Many thanks.Thanks K for the update.
I have done csv files before using pl/sql, no problem at all. It's just that in current work environment, we're using a 3rd party tool to make the Excels and I was asked to study the feasibility of using SQL Developer instead of our current commercial tool to do the job. -
Syntax errors using sql and java
Could somebody inform of the correct syntax for using UPDATE and INSERT SQL commands in a java program? Any information I can find demonstrates this with:
INSERT INTO table_name(column_name, ..., column_name)
VALUES(value, ..., value)
However - this isn't working? any suggestions - and I know its very basic, but I'm just learning.
String query = " INSERT INTO SESSIONS (" +
"id,module_name, module_number, level, session " +
"term, class_list, location, lecturer" + ")
VALUES('"+
fields.id.getText() + "', '"+
fields.module_name.getText() + "', '" + fields.module_number.getText() + "', '" +
fields.level.getText() + "', '" fields.session.getText() "', '" +
fields.term.getText() + "', '" fields.class_list.getText() "', '" +
fields.location.getText() + "', '" fields.lecturer.getText() "')";
output.append( " \nSending query: " + connection.nativeSQL(query)+ "\n");
output.append( "query sent");
thanks
int result = statement.executeUpdate(query);With all those quotes and apostrophes and string concatenations, I'd be surprised if you got it right by the fourth try. (By the way, you appear to have missed a comma between "session" and "term".) Are you planning to insert more than one record in your program? If so, you should consider using a PreparedStatement. This will likely run faster, and your program will definitely be easier to read. Also, you won't have to come back here later to ask how you deal with data that includes apostrophes (the notorious "O'Brien" problem). Here's how you do that... you define the PreparedStatement only once:
String query =
"INSERT INTO SESSIONS (id,module_name, module_number, level, session, term, class_list, location, lecturer) " +
"VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)";
PreparedStatement insert = connection.prepareStatement(query);and then every time you want to insert a record you do this:
insert.setString(1, fields.id.getText());
insert.setString(2, fields.module_name.getText());
// and so on...
insert.executeQuery(); -
Running SQL and Reports in Multiple LMS's
Hi,
We have an Oracle ilearning implementation that covers a number of subjects. The Ilearning system/database is partioned for each subject with each subject having the same schema and database objects. The only thing that is different is the data within the tables etc... I occasionally have to run SQL reports on all these partitioned databases. The only I can do this is to switch context from subject partition to subject partition. I was wondering if there is a quick way (one time SQL execution) to run the SQL report against all the partitions we have in total 18 subject partitions. Not having this ability means I have to run the same SQL multiple times which is a very time consuming exercise. I would preferably like to do this at the database end using SQL developer.
Your help and advice will be greatly appreciated.
ThanksHi Scott,
Yes you are right I am referring to site. At the moment I have been created a 'user' that has access to the database objects in the ILEARN schema via synonyms. So this means having access to the ILEARN schema will allow me to use one single piece of SQL to report accross the 18 different sites we have and pull all the data into a single report. Currently, I have to report site by site and have 18 outputs for each SQL I run. We have to run 4 SQL statements and I'd rather have 4 outputs with all 18 site data in each of these outputs.
Thanks -
Long Running SQL and ORDS Spawns Multiple Database Sessions
Hi all.
We have a strange situation when accessing a long running SQL Report (a single APEX Page).
The SQL takes about 15 mins to run but when I monitor what database sessions are spawned by the APEX Listener, I see multiple sessions all executing the same SQL. It appears that after 6 minutes, the APEX Listener spawns a new database session to execute the same SQL.
Has anyone seen this before and if so, is there a key setting I am missing as I don't want this to happen. I am new to the APEX Listener and WebLogic so apologies if this is the way it's meant to work but it seems odd that after a certain amount of time (6 minutes in my case) a new database session is spawned to do the same work.
We are running:
WebLogic: 10.3.0.6
APEX_LISTENER_VERSION 2.0.0.354.17.06
Datadate: 11.2.0.3.0 Production
APEX: 4.2.1.00.08
Cheers for any help.
DuncsHi Duncan,
With all respect, you should please rethink your interface. I would never consider writing a Web application with a request that knowingly takes 15 minutes to return the results. You can consider doing this asynchronously via DBMS_SCHEDULER and then alerting the user (via email, perhaps) that their results are ready. Or if you can precompute this in advance, consider using materialized views so that the user's response time is sub-second.
In an era where the patience of the average end-user is measured in single-digit seconds, it is impractical to ever expect an end-user to wait 15 minutes for their resultant Web page.
Joel -
Hi,
I can able ran the SSIS package in BIDS, since set to false in Run64BitRuntime property.
Then I created SQL server Agent job I tried the following ways
Step 1:
Type is set as SQL Server Integration Services Packages,
Run as - SQL Server Agent Service Account
Package source - FileSystem
then Execution option tab I selected 32 bit runtime
and then run the job I am getting the below error
Message
Executed as user: CIT\svc_CS_SS2008Agent. Microsoft (R) SQL Server Execute Package Utility Version 11.0.2100.60 for 32-bit Copyright (C) Microsoft Corporation. All rights reserved. Started: 7:29:17 AM Error: 2013-11-28
07:29:18.57 Code: 0xC0014020 Source: Example Connection manager "DataSource.DataExtract" Description: An ODBC error -1 has occurred. End Error Error: 2013-11-28 07:29:18.57
Code: 0xC0014009 Source: Imports20_OAC_Gifts Connection manager "DataSource.DataExtract" Description: There was an error trying to establish an Open Database Connectivity (ODBC) connection with the
database server. End Error Error: 2013-11-28 07:29:18.59 Code: 0x0000020F Source: DFT_Example ODBC_SRC Example [11] Description: The AcquireConnection method call to the connection
manager DataSource.DataExtract failed with error code 0xC0014009. There may be error messages posted before this with more information on why the AcquireConnection method call failed. End Error Error: 2013-11-28 07:29:18.59
Code: 0xC0047017 Source: DFT_Example SSIS.Pipeline Description: ODBC_SRC Example failed validation and returned error code 0x80004005. End Error Error: 2013-11-2
Step 2:
Type - Operating sytem (CmdExec)
Run as - Sql Server agent service account
Command - C:\Program Files\Microsoft SQL Server\110\DTS\Binn\dtexec.exe /FILE "D:\Example\Example.dtsx" /x86 /CHECKPOINTING OFF /REPORTING E
then run the job I am getting the below error
Message
Executed as user: MIS\svc_CS_SS2008Agent. Microsoft (R) SQL Server Execute Package Utility Version 11.0.2100.60 for 64-bit Copyright (C) Microsoft Corporation. All rights reserved. Started: 6:37:58 AM Error: 2013-11-28
06:37:58.94 Code: 0xC0014020 Source: Example Connection manager "DataSource.DataExtract" Description: An ODBC error -1 has occurred. End Error Error: 2013-11-28 06:37:58.96
Code: 0xC0014009 Source: Example Connection manager "DataSource.DataExtract" Description: There was an error trying to establish an Open Database Connectivity (ODBC) connection with the database server.
End Error Error: 2013-11-28 06:37:59.01 Code: 0x0000020F Source: DFT_Example ODBC_SRC Example [11] Description: The AcquireConnection method call to the connection manager DataSource.DataExtract
failed with error code 0xC0014009. There may be error messages posted before this with more information on why the AcquireConnection method call failed. End Error Error: 2013-11-28 06:37:59.07 Code: 0xC0047017
Source: DFT_Example SSIS.Pipeline Description: ODBC_SRC Example failed validation and returned error code 0x80004005. End Error Error: 2013-11-28 06:37:59.12 Code: 0xC004700C
Source: DFT_Example SSIS.Pipeline Description: One or more component failed validation. End Error Error: 2013-11-28 06:37:59.16 Code: 0xC0024107 Source: DFT_Example
Description: There were errors during task validation. End Error DTExec: The package execution returned DTSER_FAILURE (1).Started: 6:37:58 AM Finished: 6:37:59 AM Elapsed: 1.373 seconds. Process Exit Code 1.
The step failed.
Note:
My source server is 32 bit and development environment in 64 bit
if anybody have idea please share your knowledgeHi BIRam,
Based on the current information, the issue may be caused by the factor that the SQL Server Agent Service Account doesn’t have access to the MySQL server. Try to create a SQL Server Agent Proxy account that has sufficient permission on the MySQL server.
In addition, also pay attention to the package protection level setting.
For more information, please see:
http://social.technet.microsoft.com/Forums/sqlserver/en-US/e13c137c-1535-4475-8c2f-c7e6e7d125fc/how-do-i-troubleshoot-ssis-packages-failed-execution-in-a-sql-agent-job?forum=sqlintegrationservices.
Regards,
Mike Yin
TechNet Community Support -
Error running Maxl and ESSMSH Commads
Hello,
I had recently installed EAS Client while my system was getting changed from a previous one . Firstly , I was unable to enter the Maxl with essmsh command , so i had started going to the directory where startmaxl.cmd site and from there when I run it i get into Maxl shell . i was curious on how to fix this. But the main concern now is , i am trying to encrypt few passwords and while i run essmsh -gk from Maxl shell , the key is not getting recognized . Previously , before re installing EAS i had no issues on this at all . Any comments or suggestion ?
Thanks !!I am able to run maxl commands , not a problem with that . However my main issue now si teh decryption , we can try working the other way for now . Because the maxl issue is in my local machine , i went to essbase server directly and started this encryption process.
This what it looks like :
login $key AAAAAAAAA (ADMIN ID) $key BBBBBBBBBB (PASSWORD) on Essbase Server ;
import database 'App'.DB' dimensions
connect as $key XXXXXXXXXXXXXXXXXXXX identified by $key YYYYYYYYYYY using server rules_file 'A',
connect as $key XXXXXXXXXXXXXXXXXXXX identified by $key YYYYYYYYYYY using server rules_file 'B',
connect as $key XXXXXXXXXXXXXXXXXXXX identified by $key YYYYYYYYYYY using server rules_file 'C'
on error write to "A\\File.err";
X is the database log in ID and Y is its password which was recently changed and this script was working till then .
I followed the regular encryption process , I had to Just change the encryption keys of X and Y , the proxy ID and password are still the same . SO , i created a .simple text txt file ;
login db ID db Password,
From cmd , ran essmsh -E File name publick key
I got encrypted ID and password .
When i implemented them on the above script , the script failed to execute in the db login stage as:
ERROR - 1021001 - Failed to Establish Connection With SQL Database Server. See log for more information. (The log just gives the same info , SQL Login failed )
ERROR - 1241101 - Unexpected Essbase error 1021001. -
Error Running SQL Insert Statement with & in it
Eclipse: 3.5 Galileo on Window Vista
OEPE: 11gR1 11.1.14
I get "invalid character" error when running this query in Eclipse:
INSERT INTO RECIPE (recipeId, name1, name2, recipeCategoryId) VALUES (2, 'Chunky Chicken Egg Rolls', 'No take–out joint can compare!', 1);
I've tried multiple ways trying to escape the & character, but nothing worked. What is the right way of executing SLQ via OEPE plugin that have special characters in them.
FYI, the following worked fine in Oracle 10g iSQL*Plus:
SET DEFINE ~;
INSERT INTO RECIPE (recipeId, name1, name2, recipeCategoryId) VALUES (2, 'Chunky Chicken Egg Rolls', 'No take–out joint can compare!', 1);
Thanks,
Dmitri.Very interesting case. I tried your insert stmt and got the same error. I finally got it to work by removing the ";" in the end. It looks like the jdbc driver choked up while there is ";" in the middle of the pl/sql statement and ";" in the end. If you remove ";" in the "No take–out joint can compare!" string and leave the ";" in the end, it also works!
I don't quite understand why Oracle JDBC dirver behaves like that. I'll investigate it more and we may need to do some preprocessing on the pl/sql statement before sending it to the driver. At the mean time, just remove the ";" in the end if your string literal contains ";".
Please let me know whether this workaround works for you. Thanks!
Shenxue -
Hi,
run sql script through command line(CMD). IS it possiple.
Thanks.user638559,
Do I miss something else ? Are you the OP ?
Nicolas.
And also, it's a dup thread
run sql script
Message was edited by:
N. Gasparotto -
Capturing Users with running sql in shell script after every 10min
Hi All,
we have a strange prob. of database crash, therefore decided to check what users do when OS/DB crashes,
i need your input in RUNNING/SCHEDULING such a script which gathers all active users with running SQL and append in a logfile so that we are aware of what happened when DB/OS Crashed.
i can run this run a query from V$SESSION,V$SQL, and V$PROCESS but i need your input writing such a SHELL Script and scheduling can run by CRON.
Regards.Here ya go.
(Assuming you want a script to run against one sid)
script:
#!/bin/ksh
# Set environment
. $HOME/.profile
export ORACLE_SID=your sid
sqlplus <<! > /some_report_file
/ as sysdba
sql you want to execute here*
exit
cron entry:
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /your/script/name/here > /dev/null 2>&1 -
Help: use command "run" and "exec", no output
I create a script file Test.sql, and type "run d:\test.sql" in ttisql's command prompt, but there is no output, not even any error messages.
Command> run d:\test.sql;
Command>
I try to use "Prepare" and "Exec", still no output
Command> prepare 1 select * from employee;
Command> exec 1;
Command>
ttisql looks recognize these commands, but it doesn't execute them. Who knows the reason? thanks.Hi,
I create a script file Test.sql, and type "run d:\test.sql" in ttisql's command prompt, but there is no output, not even any error messages.What SQL statements are in Test.sql? To see more verbose output from ttIsql, try increasing verbosity. The default is 2. The highest (most verbose) is 4.
Command>verbosity;
verbosity = 2
Command> verbosity 4;
The command succeeded.
try to use "Prepare" and "Exec", still no outputTry adding a fetchone or fetchall command to retreive the result. e.g.
Command> prepare 1 select * from emp;
Command> exec 1;
Command> fetchone;
< 7369, SMITH, CLERK, 7902, 1980-12-17 00:00:00.000000, 800.0000, <NULL>, 20 >
1 row found.
Command> fetchone;
< 7499, ALLEN, SALESMAN, 7698, 1981-02-20 00:00:00.000000, 1600.000, 300.0000, 3
0 >
1 row found.
Command> fetchall;
< 7521, WARD, SALESMAN, 7698, 1981-02-22 00:00:00.000000, 1250.000, 500.0000, 30
>
< 7566, JONES, MANAGER, 7839, 1981-04-02 00:00:00.000000, 2975.000, <NULL>, 20 >
< 7654, MARTIN, SALESMAN, 7698, 1981-09-28 00:00:00.000000, 1250.000, 1400.000,
30 >
< 7698, BLAKE, MANAGER, 7839, 1981-05-01 00:00:00.000000, 2850.000, <NULL>, 30 >
< 7782, CLARK, MANAGER, 7839, 1981-06-09 00:00:00.000000, 2450.000, <NULL>, 10 >
< 7788, SCOTT, ANALYST, 7566, 1987-04-19 00:00:00.000000, 3000.000, <NULL>, 20 >
< 7839, KING, PRESIDENT, <NULL>, 1981-11-17 00:00:00.000000, 5000.000, <NULL>, 1
0 >
< 7844, TURNER, SALESMAN, 7698, 1981-09-08 00:00:00.000000, 1500.000, 0.000000e+
00, 30 >
< 7876, ADAMS, CLERK, 7788, 1987-05-23 00:00:00.000000, 1100.000, <NULL>, 20 >
< 7900, JAMES, CLERK, 7698, 1981-12-03 00:00:00.000000, 950.0000, <NULL>, 30 >
< 7902, FORD, ANALYST, 7566, 1981-12-03 00:00:00.000000, 3000.000, <NULL>, 20 >
< 7934, MILLER, CLERK, 7782, 1982-01-23 00:00:00.000000, 1300.000, <NULL>, 10 >
12 rows found.
Command>
Good luck.
Simon -
"ORA-00054 Resource Busy Error" when running SQL*Loader in Parallel
Hi all,
Please help me on an issue. We are using Datastage which uses sql*loader to load data into an Oracle Table. SQL*Loader invokes 8 parallel sessions for insert on the table. When doing so, we are facing the following error intermittently:
SQL*Loader-951: Error calling once/load initialization
ORA-00604: error occurred at recursive SQL level 1
ORA-00054: resource busy and acquire with NOWAIT specifiedSince the control file is generated automatically by datastage, we cannot modify/change the options and test. Control File for the same is:
OPTIONS(DIRECT=TRUE, PARALLEL=TRUE, SKIP_INDEX_MAINTENANCE=YES)
LOAD DATA INFILE 'ora.2958.371909.fifo.1' "FIX 1358"
APPEND INTO TABLE X
x1 POSITION(1:8) DECIMAL(15,0) NULLIF (1:8) = X'0000000000000000',
x2 POSITION(9:16) DECIMAL(15,0) NULLIF (9:16) = X'0000000000000000',
x3 POSITION(17:20) INTEGER NULLIF (17:20) = X'80000000',
IDNTFR POSITION(21:40) NULLIF (21:40) = BLANKS,
IDNTFR_DTLS POSITION(41:240) NULLIF (41:240) = BLANKS,
FROM_DATE POSITION(241:259) DATE "YYYY-MM-DD HH24:MI:SS" NULLIF (241:259) = BLANKS,
TO_DATE POSITION(260:278) DATE "YYYY-MM-DD HH24:MI:SS" NULLIF (260:278) = BLANKS,
DATA_SOURCE_LKPCD POSITION(279:283) NULLIF (279:283) = BLANKS,
EFFECTIVE_DATE POSITION(284:302) DATE "YYYY-MM-DD HH24:MI:SS" NULLIF (284:302) = BLANKS,
REMARK POSITION(303:1302) NULLIF (303:1302) = BLANKS,
OPRTNL_FLAG POSITION(1303:1303) NULLIF (1303:1303) = BLANKS,
CREATED_BY POSITION(1304:1311) DECIMAL(15,0) NULLIF (1304:1311) = X'0000000000000000',
CREATED_DATE POSITION(1312:1330) DATE "YYYY-MM-DD HH24:MI:SS" NULLIF (1312:1330) = BLANKS,
MODIFIED_BY POSITION(1331:1338) DECIMAL(15,0) NULLIF (1331:1338) = X'0000000000000000',
MODIFIED_DATE POSITION(1339:1357) DATE "YYYY-MM-DD HH24:MI:SS" NULLIF (1339:1357) = BLANKS
)- it occurs intermittently. When this job runs, no one will be accessing the database or the tables.
- When we do not run in parallel, then we are not facing the error but it is very slow (obviously).Just in case, I am also attaching the Datastage Logs:
Item #: 466
Event ID: 1467
Timestamp: 2009-06-02 23:03:19
Type: Info
User Name: dsadm
Message: main_program: APT configuration file: /clu01/datastage/Ascential/DataStage/Configurations/default.apt
node "node1"
fastname "machine_name"
pools ""
resource disk "/clu01/datastage/Ascential/DataStage/Datasets" {pools ""}
resource scratchdisk "/clu01/datastage/Ascential/DataStage/Scratch" {pools ""}
node "node2"
fastname "machine_name"
pools ""
resource disk "/clu01/datastage/Ascential/DataStage/Datasets" {pools ""}
resource scratchdisk "/clu01/datastage/Ascential/DataStage/Scratch" {pools ""}
node "node3"
fastname "machine_name"
pools ""
resource disk "/clu01/datastage/Ascential/DataStage/Datasets" {pools ""}
resource scratchdisk "/clu01/datastage/Ascential/DataStage/Scratch" {pools ""}
node "node4"
fastname "machine_name"
pools ""
resource disk "/clu01/datastage/Ascential/DataStage/Datasets" {pools ""}
resource scratchdisk "/clu01/datastage/Ascential/DataStage/Scratch" {pools ""}
node "node5"
fastname "machine_name"
pools ""
resource disk "/clu01/datastage/Ascential/DataStage/Datasets" {pools ""}
resource scratchdisk "/clu01/datastage/Ascential/DataStage/Scratch" {pools ""}
node "node6"
fastname "machine_name"
pools ""
resource disk "/clu01/datastage/Ascential/DataStage/Datasets" {pools ""}
resource scratchdisk "/clu01/datastage/Ascential/DataStage/Scratch" {pools ""}
node "node7"
fastname "machine_name"
pools ""
resource disk "/clu01/datastage/Ascential/DataStage/Datasets" {pools ""}
resource scratchdisk "/clu01/datastage/Ascential/DataStage/Scratch" {pools ""}
node "node8"
fastname "machine_name"
pools ""
resource disk "/clu01/datastage/Ascential/DataStage/Datasets" {pools ""}
resource scratchdisk "/clu01/datastage/Ascential/DataStage/Scratch" {pools ""}
Item #: 467
Event ID: 1468
Timestamp: 2009-06-02 23:03:20
Type: Warning
User Name: dsadm
Message: main_program: Warning: the value of the PWD environment variable (/clu01/datastage/Ascential/DataStage/DSEngine) does not appear to be a synonym for the current working directory (/clu01/datastage/Ascential/DataStage/Projects/Production). The current working directory will be used, but if your ORCHESTRATE job does not start up correctly, you should set your PWD environment variable to a value that will work on all nodes of your system.
Item #: 468
Event ID: 1469
Timestamp: 2009-06-02 23:03:32
Type: Warning
User Name: dsadm
Message: Lkp_1: Input dataset 1 has a partitioning method other than entire specified; disabling memory sharing.
Item #: 469
Event ID: 1470
Timestamp: 2009-06-02 23:04:22
Type: Warning
User Name: dsadm
Message: Lkp_2: Input dataset 1 has a partitioning method other than entire specified; disabling memory sharing.
Item #: 470
Event ID: 1471
Timestamp: 2009-06-02 23:04:30
Type: Warning
User Name: dsadm
Message: Xfmer1: Input dataset 0 has a partitioning method other than entire specified; disabling memory sharing.
Item #: 471
Event ID: 1472
Timestamp: 2009-06-02 23:04:30
Type: Warning
User Name: dsadm
Message: Lkp_2: When checking operator: Operator of type "APT_LUTProcessOp": will partition despite the
preserve-partitioning flag on the data set on input port 0.
Item #: 472
Event ID: 1473
Timestamp: 2009-06-02 23:04:30
Type: Warning
User Name: dsadm
Message: SKey_1: When checking operator: A sequential operator cannot preserve the partitioning
of the parallel data set on input port 0.
Item #: 473
Event ID: 1474
Timestamp: 2009-06-02 23:04:30
Type: Warning
User Name: dsadm
Message: SKey_2: When checking operator: Operator of type "APT_GeneratorOperator": will partition despite the
preserve-partitioning flag on the data set on input port 0.
Item #: 474
Event ID: 1475
Timestamp: 2009-06-02 23:04:30
Type: Warning
User Name: dsadm
Message: buffer(1): When checking operator: Operator of type "APT_BufferOperator": will partition despite the
preserve-partitioning flag on the data set on input port 0.
Item #: 475
Event ID: 1476
Timestamp: 2009-06-02 23:04:30
Type: Info
User Name: dsadm
Message: Tgt_member: When checking operator: The -index rebuild option has been included; in order for this option to be
applicable and to work properly, the environment variable APT_ORACLE_LOAD_OPTIONS should contain the options
DIRECT and PARALLEL set to TRUE, and the option SKIP_INDEX_MAINTENANCE set to YES;
this variable has been set by the user to `OPTIONS(DIRECT=TRUE, PARALLEL=TRUE, SKIP_INDEX_MAINTENANCE=YES)'.
Item #: 476
Event ID: 1477
Timestamp: 2009-06-02 23:04:35
Type: Info
User Name: dsadm
Message: Tgt_member_idtfr: When checking operator: The -index rebuild option has been included; in order for this option to be
applicable and to work properly, the environment variable APT_ORACLE_LOAD_OPTIONS should contain the options
DIRECT and PARALLEL set to TRUE, and the option SKIP_INDEX_MAINTENANCE set to YES;
this variable has been set by the user to `OPTIONS(DIRECT=TRUE, PARALLEL=TRUE, SKIP_INDEX_MAINTENANCE=YES)'.
Item #: 477
Event ID: 1478
Timestamp: 2009-06-02 23:04:41
Type: Warning
User Name: dsadm
Message: Lkp_2,6: Ignoring duplicate entry at table record 1; no further warnings will be issued for this table
Item #: 478
Event ID: 1479
Timestamp: 2009-06-02 23:04:41
Type: Warning
User Name: dsadm
Message: Tgt_member_idtfr,0: SQL*Loader-951: Error calling once/load initialization
Item #: 479
Event ID: 1480
Timestamp: 2009-06-02 23:04:41
Type: Warning
User Name: dsadm
Message: Tgt_member_idtfr,0: ORA-00604: error occurred at recursive SQL level 1
Item #: 480
Event ID: 1481
Timestamp: 2009-06-02 23:04:41
Type: Warning
User Name: dsadm
Message: Tgt_member_idtfr,0: ORA-00054: resource busy and acquire with NOWAIT specified
Item #: 481
Event ID: 1482
Timestamp: 2009-06-02 23:04:41
Type: Warning
User Name: dsadm
Message: Tgt_member_idtfr,6: SQL*Loader-951: Error calling once/load initialization
Item #: 482
Event ID: 1483
Timestamp: 2009-06-02 23:04:41
Type: Warning
User Name: dsadm
Message: Tgt_member_idtfr,6: ORA-00604: error occurred at recursive SQL level 1
Item #: 483
Event ID: 1484
Timestamp: 2009-06-02 23:04:41
Type: Warning
User Name: dsadm
Message: Tgt_member_idtfr,6: ORA-00054: resource busy and acquire with NOWAIT specified
Item #: 484
Event ID: 1485
Timestamp: 2009-06-02 23:04:41
Type: Fatal
User Name: dsadm
Message: Tgt_member_idtfr,6: The call to sqlldr failed; the return code = 256;
please see the loader logfile: /clu01/datastage/Ascential/DataStage/Scratch/ora.23335.478434.6.log for details.
Item #: 485
Event ID: 1486
Timestamp: 2009-06-02 23:04:41
Type: Fatal
User Name: dsadm
Message: Tgt_member_idtfr,0: The call to sqlldr failed; the return code = 256;
please see the loader logfile: /clu01/datastage/Ascential/DataStage/Scratch/ora.23335.478434.0.log for details.
Maybe you are looking for
-
if @CustNo = '0142' begin insert #custnos (CustNo, ClientNo) values ('0142', '1100') ,('0142', '1200') ,('0142', '1201') ,('0142', '1700')
-
Recently the hard drive on my mac book was damaged beyond repair and I had to reinstall the OS. MY iPhone still has all its original dta. How can I connect my iPhone to my computer (virtually new) without loosing the data I have on my iPhone? Obvious
-
Adobe Digital Editions 2.0 for Windows with Kobo Desktop reader.
I need to transfer PDF files to my Kobo Desktop reader which is installed on the same PC ad the Adobe Digital Editions 2.0 ADE is authorized with Adobe. I believe I need to access the Kobo Desktop Reader from ADE first to be able to authorize the KOB
-
Using 2 15" ADC studio displays with G5?? How??
I have just recently purchased a second 15" studio display to use with my G5 powermac. One display is currently connected to the adc port on the back of the G5. How can I connect the second display? I have seen some adapters you can buy which convert
-
Exporting HumanResources.Jobcandidate with SS Import/Export Wizard
The default mapping results in execution errors. What is the correct setup for exporting the table to flat file from AdventureWorks2012? Thanks. Kalman Toth Database & OLAP Architect SQL Server 2014 Design & Programming New Book / Kindle: Exam 70-4