Need help Recording SQL Execution Times in Database
Hello,
I have an interesting thing I am tiring to do. I want to record how much time (Wall Clock) it took the database to execute any select statement against o one particular view lets call it CUST_ORDERS_V.
I would like to record who ran it, what the select statement was (SQL Text) and how much time it took and maybe a few other ancillary things if possible.
Looking at most of my requirements took me right to Oracle Auditing and the SYS.AUD$ table. After setting up auditing with:
audit_trail=db,extended
and
audit select on ME.CUST_ORDERS_V by access;I get every piece of information I need except for the execution time! Wow that would be great if Oracle recorded that!!! So I was thinking if I could. I was considering a trigger on SYS.AUD$ (I know evil thoughts) that would look into some V$ view and get the execution time and write it into some custom table with a link back to SYS.AUD$.
This might be the complete wrong way to do it. I was wondering if anyone had any ideas on this.
I am running on 11.2.0.3 EE. I am on EE so I can use Fine Grained Auditing if it is needed. However I DO NOT have the Tuning or Diagnostic Pack.
>
Hi again,
Yes, a complete set of times from end to end would be great. However
for now I need to stick with what is in my domain of control, the database.
Maybe after the DB I will look to get the others.But your point about the operators blaming the db brings up the probability
that after you tell them that the db is not the issue, they'll start to blame
the app server, the cabling, their OS, the browser, the tea-lady...
If you have click===> page, they have no more places to hide and have to
actually work for a living ;)
I do not think I can access v$active_session_history as I do not have the Tuning Pack.Well, presumably there is a business case for this project. Why not tell management
that it's required?
Otherwise, you could go to ashmasters.com - a site run by Kyle Hailey (Oak Table
member and author). He has an Open Source ASH "substitute" which you might
like to try - haven't used it myself, but if Kyle Hailey's behind it, then it's at
least worthy of investigation.
HTH,
Paul...
Similar Messages
-
Need help to reduce execution time for a procedure
the following procedure takes to long to execute and the server times out. each individual select works perfectly. It does not have to do with the SORT_AREA_SIZE/PGA_AGGREGATE_TARGET not being large enough. Possible rewriting it in funcions might help i don't know.
Thanks in advance
PROCEDURE GET_RM_WORKABILITY_BY_PLANT
(p_in_plantcode IN VARCHAR2,
p_in_statusnum IN NUMBER,
p_out_cursor IN OUT tcursor) AS
BEGIN
OPEN p_out_cursor FOR
select comp.segment1,
comp.description,
comp.organization_id,
nvl(sum(jot.qty), 0) job_qty,
nvl(moq.qty, 0) onhand_qty
from (select jdl.bill_sequence_id bsid,
sum(jdl.job_qty) qty
from job_detail_lines jdl
where jdl.job_stat = p_in_statusnum
and jdl.prod_plant_id = p_in_plantcode
group by jdl.bill_sequence_id) jot,
(select m.inventory_item_id,
sum(m.transaction_quantity) qty
from mtl_onhand_quantities m
where exists
(select 'x'
from plant_codes p1,
plant_codes p
where p.plant_code = p_in_plantcode
and p1.fac_id = p.fac_id
and m.organization_id = p1.organization_id)
group by m.inventory_item_id) moq,
(select msi.segment1,
msi.description,
msi.organization_id,
msi.inventory_item_id,
bom.bill_sequence_id
from bom.bom_bill_of_materials bom,
bom.bom_inventory_components bic,
mtl_system_items msi,
plant_codes pc
where pc.plant_code = p_in_plantcode
and msi.organization_id = pc.organization_id
and msi.item_type||'' IN ('PSSRM', 'PSRM')
and bic.component_item_id = msi.inventory_item_id
and ((bic.disable_date IS NULL AND SYSDATE>= bic.effectivity_date)
or (SYSDATE <= bic.disable_date AND SYSDATE >= bic.effectivity_date))
and bom.bill_sequence_id = bic.bill_sequence_id
and bom.organization_id = 102) comp
where moq.inventory_item_id(+) = comp.inventory_item_id
and jot.bsid(+) = comp.bill_sequence_id
group by comp.segment1,
comp.description,
comp.organization_id,
moq.qty;
END;Ok, so how does it perform if you use the bom info as an in-line query outer join to job detail lines?
SELECT v.plant_code,
v.segment1,
v.description,
v.organization_id,
v.inventory_item_id,
SUM (jdl.job_qty) job_qty
FROM (
SELECT pc.plant_code,
msi.segment1,
msi.description,
msi.organization_id,
msi.inventory_item_id,
bom.bill_sequence_id
FROM bom.bom_bill_of_materials bom,
bom.bom_inventory_components bic,
mtl_system_items msi,
plant_codes pc
WHERE pc.plant_code = p_in_plantcode
AND msi.organization_id = pc.organization_id
AND msi.item_type || '' IN ('PSSRM', 'PSRM')
AND bic.component_item_id = msi.inventory_item_id
AND bic.effectivity_date <= SYSDATE
AND ( bic.disable_date IS NULL
OR bic.disable_date >= SYSDATE)
AND bom.bill_sequence_id = bic.bill_sequence_id
AND bom.organization_id = 102
) v,
job_detail_lines jdl
WHERE jdl.prod_plant_id(+) = v.plant_code
AND jdl.bsid(+) = v.bill_sequence_id
AND jdl.job_stat(+) = p_in_statusnum
GROUP BY
v.plant_code,
v.segment1,
v.description,
v.organization_id,
v.inventory_item_id; -
To track SQL Execution time automatically
Hi All,
I have requirement of tracking execution time of for each SQL executed.
For Eg, If i run command create index, in SQLPLus session, time to execute create index command should be tracked.
Any idea how to implement this?
Any help is appreciated.899485 wrote:
You have mistaken me. We have 2 environments. Dev,Prod and QA. 2 or 3?
So when code is moving to Production we need atleast approx time of deployment of code. Why should there be a relationship between execution times on Prod and Dev?
Do Prod and Dev have the very same hardware? Same type storage system? Same storage system configuration ito redundancy? Same data volumes? Same processing loads? Are the execution plans the same? Are the Oracle version and patch levels the same? Are the instance and database initialisation settings the same? Etc. etc.
It may vary but we want approx time. For that we want to capture SQL execution time.So if the Prod execution time is larger than the Dev approx time, then there is a problem?
How is that a more sensible approach than looking at overall performance and utilisation on Prod, determining the most CPU intensive SQLs, the most I/O intensive SQLs, the most often executed SQLs, and addressing these within the context and environment and h/w and processing loads on Prod?
Comparing execution times will simply say that the may be a problem. Not that there is a definitive problem. You still need to evaluate that metric and determine if this indicates a problem.
So seeing that this evaluation needs to be done, why not use better metrics? Like what AWR uses? Like what OEM shows?
Our application is dataware house application. So before insertion we disable the index and after load we enable index while enabling we capture execution time for enabling.Instrumentation is a different principle. And instrumenting your code to record the process run, the number of rows processed is a sensible approach to keeping track of production run-times, data volumes processed and even failures.
But I see very little value in taking Dev runtimes and trying to apply that as a benchmark on Prod for identifying performance issues. -
Need help with SQL Query with Inline View + Group by
Hello Gurus,
I would really appreciate your time and effort regarding this query. I have the following data set.
Reference_No---Check_Number---Check_Date--------Description-------------------------------Invoice_Number----------Invoice_Type---Paid_Amount-----Vendor_Number
1234567----------11223-------------- 7/5/2008----------paid for cleaning----------------------44345563------------------I-----------------*20.00*-------------19
1234567----------11223--------------7/5/2008-----------Adjustment for bad quality---------44345563------------------A-----------------10.00------------19
7654321----------11223--------------7/5/2008-----------Adjustment from last billing cycle-----23543556-------------------A--------------------50.00--------------19
4653456----------11223--------------7/5/2008-----------paid for cleaning------------------------35654765--------------------I---------------------30.00-------------19
Please Ignore '----', added it for clarity
I am trying to write a query to aggregate paid_amount based on Reference_No, Check_Number, Payment_Date, Invoice_Number, Invoice_Type, Vendor_Number and display description with Invoice_type 'I' when there are multiple records with the same Reference_No, Check_Number, Payment_Date, Invoice_Number, Invoice_Type, Vendor_Number. When there are no multiple records I want to display the respective Description.
The query should return the following data set
Reference_No---Check_Number---Check_Date--------Description-------------------------------Invoice_Number----------Invoice_Type---Paid_Amount-----Vendor_Number
1234567----------11223-------------- 7/5/2008----------paid for cleaning----------------------44345563------------------I-----------------*10.00*------------19
7654321----------11223--------------7/5/2008-----------Adjustment from last billing cycle-----23543556-------------------A--------------------50.00--------------19
4653456----------11223--------------7/5/2008-----------paid for cleaning------------------------35654765-------------------I---------------------30.00--------------19
The following is my query. I am kind of lost.
select B.Description, A.sequence_id,A.check_date, A.check_number, A.invoice_number, A.amount, A.vendor_number
from (
select sequence_id,check_date, check_number, invoice_number, sum(paid_amount) amount, vendor_number
from INVOICE
group by sequence_id,check_date, check_number, invoice_number, vendor_number
) A, INVOICE B
where A.sequence_id = B.sequence_id
Thanks,
NickIt looks like it is a duplicate thread - correct me if i'm wrong in this case ->
Need help with SQL Query with Inline View + Group by
Regards.
Satyaki De. -
TS4268 I need help getting my face time and imessage to work.
I need help getting my face time and imessage to work. It is saying wating for activation. I just got my iphone 5 2 days ago. I have reset it from the phone and from itunes on the computer, made sure I'm attached to wifi.
The 3 basic troubleshooting steps are these in order: 1. Restart your iphone 2. Reset your settings/iphone 3. Restore your iphone. Since your iphone is only a couple of days old, you should backup your device before restoring. If you don't have anything on your iphone that you care to lose, then simply restoring without a backup is fine. A quick reset of pressing the sleep/wake button (top of iphone) and your home button simultaneously and holding it until the silver Apple logo appears.
-
I need help regarding measurement of "time domain parameters of Heart rate variability" using labview.
I am using Labview 8 ... I need to develop a software to accquire the ECG data (simulated enironment ) and compute the time domain parameters of Heart rate variability like "SDNN, SDANN...etc". Can some 1 plllzzzz help me out.Plzz help me if u can.Thanx in advance.Hi Andy,
Thanx for responding. The input is from a text file. SDNN, SDANN,etc are the timedomain parameters of heart rate variability.
SDNN: the standard deviation of the NN or RR interval i.e. the square root of variance.
SDANN:the standard deviation of the averageNN interval calculated over short periods, usually 5 min,which is an estimate of the changes in heart rate due tocycles longer than 5 min
SDNN index, the meanof the 5-min standard deviation of the NN intervalcalculated over 24 h,
RMSSD: the square root ofthe mean squared differences of successive NN intervals
NN50: the number of interval differences of successiveNN intervals greater than 50 ms, and
pNN50 the proportionderived by dividing NN50 by the total numberof NN intervals.
The problem is dat I am a fresher to the world of Labview. I have jus recently started working on it. Can u please suggest me some some idea as soon as possible.
As i said I have the ECG data in the form of text files..I need to create sort of GUI to calculate the time domain parmeters....I need help urgently. Plzzz help me if u can. If u have and .vi example to calculate the RR interval plzz send it to me ASAP.
Thanku -
Need Help: Generate Customer Data from Prod Database
Hi All,
My company have an Oracle Financial System, with and old version Oracle Application 11.0.3 and Oracle Database 8.0.5. The database name PROD. This system has been use for more than 7 years and in between there were many stuff resigned without handover and therefore many records and supporting steps cannot be trace back. However the system is still keep running and updated daily.
Recently we have a user request to generate out a list of customer company name, and their related products purchase from the database, this is because they does not have any methods to print out the list from application. Unfortunately, we do not know which tables or index is actualy storing the name of the customer and products. We have the list of below users accounts that able to log in to the database.
PA/PA
APPLSYS/APPS
APPS/APPS
ALR/ALR
AX/AX
AK/AK
GL/GLRG/RG
FA/FAHR/HR
SSP/SSP
HXT/HXT
OTA/OTA
RLA/RLA
VEH/VEH
QA/QA
ICX/ICX
AZ/AZ
AP/AP
AR/AR
OE/OE
OSM/OSM
NSM/NSM2020
CN/CN
MFG/MFG
INV/INV
PO/PO
BOM/BOM
ENG/ENG
MRP/MRP
CRP/CRP
WIP/WIP
CZ/CZ
PJM/PJM
FLM/FLM
MSC/MSC
CS/CS
CE/CE
EC/EC
JG/JG
APPS/APPS
All the reference documents is no longer exist. I am able to use SQL Plus to generate the list of tables with the command : select table_name from user_tables. Each user accounts will return different kind of table names. But still I cant locate which table that actually storing the name of the customers and products.
Is that anybody got hands on this case before? UrgentWe have this table: And need to unload this table data in flat file format.
Need help with unload SQL file with these two columns:
AMT_PAID_ORIG, AMT_PAID_ADJ
SQL> desc flconv.claim_adj_less
Name Null? Type
SAK_CLAIM_ADJ_LESS NUMBER(10)
SAK_CLAIM_ADJ NUMBER(10)
ADJ_CLAIM_ICN NUMBER(13)
ORIGINAL_CLAIM_ICN NUMBER(13)
DATE_PAID_ORIG NUMBER(8)
DATE_PAID_ADJ NUMBER(8)
AMT_PAID_ORIG NUMBER(10,2)
AMT_PAID_ADJ NUMBER(10,2)
SAK_PROV_LOC NUMBER(9)
SAK_FUND_CODE NUMBER(9)
CHECK_SAK NUMBER(9)
SAK_PUB_HLTH NUMBER(9) -
Need help connecting to Oracle to create database
Am student taking DBA course; have altered pfile so that path shows where createdb is located. Cannot connect to Oracle; keep getting message "insufficient privileges." Createdb file amended per book to "REMOTE_LOGIN_PASWORDFILE=exclusive" and still can't connect. Can I grant connect privileges to internal/oracle? Tried several times to create database and am now using new database name to try again, but when I get to svrmgrl and type in "connect internal" and give password "oracle" as book says to do I get the "insufficient privileges" message again. Need help.
Linda,
when you use exclusive in remote_login_passwordfile is necessary make one file. Use the following instructions:
orapw file=orapw<SID> password=<password> entries=<users>
where
file=name of password file (mandatory)
password=password for SYS and INTERNAL (mandatory)
entries=maximum number of distinct DBA and OPERs (opt)
There are no spaces around the equal to (=) character.
Find orapwd.exe by Windows Explorer
Bye,
DQC -
I am using Sybase as my back end database. I need help on my SQL statement regarding datetime. The datetime is store as a 9 digit integer in the database (...I believe it is a Decimal(30,6) format, let me know if I am wrong).
If I do this, "select * from mytable;" It works out fine (except I don't know what the date means e.g. 998919534)
If I do this, "select * from mytable where datetime_col < '9/5/2002' ; I got an error. I even tried '9/5/02 11:00 000 am' but it didn't help.
How do I specify a date or datetime in my query?
Thanks in advance.I execute the sql statement
select * from mytable where datetim_col < convert(datetime, '3/4/2002', 101) ;
I got mix result. I got an error message "cannot convert 10375584 to a date.
Yet, he statistics window of the I-sql says
"estimated 493 rows in query (I/O estimate 87)
PLan> mytable (seq)"
It looks like I my the SQL statement is correct and then the system can't display it in the Data window.
Any thought ? -
Need help on DR Failover to production database
Database : Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
OS: Solaris
Replication type: Dataguard (with out broker)
Problem:
Due to power fail on production we switched our secondary to primary for our safety purpose we enabled flashback point on present production(old standby), Now hope we will face problem while switching back to production please help and guide what will be the best practice in this situation and due to the flashback on squnce is not changing how to come out of this problem please help and guide
MAX(SEQUENCE#)
9221
========#######================
Last login: Wed Sep 5 01:51:32 from 10.245.13.6
$ su - oracle
Password:
mesg: cannot change mode
$ ps -ef|grep pmon
oratst 2978 1 0 Sep 08 ? 233:10 ora_pmon_amantst
oracle 3039 1 0 Sep 08 ? 209:09 ora_pmon_airman
oracle 17582 17574 0 05:41:15 pts/1 0:00 grep pmon
$ sqlplus
SQL*Plus: Release 10.2.0.3.0 - Production on Wed Sep 5 05:56:21 2012
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Enter user-name: /as sysdba
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/oradata/airman/archive
Oldest online log sequence 9220
Next log sequence to archive 0
Current log sequence 9222
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
$ sqlplus
SQL*Plus: Release 10.2.0.3.0 - Production on Wed Sep 5 05:57:08 2012
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Enter user-name: /as sysdba
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> show parameter dump
NAME TYPE VALUE
background_core_dump string partial
background_dump_dest string /u01/app/oracle/admin/airman/b
dump
core_dump_dest string /u01/app/oracle/admin/airman/c
dump
max_dump_file_size string UNLIMITED
shadow_core_dump string partial
user_dump_dest string /u01/app/oracle/admin/airman/u
dump
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
$ cd /u01/app/oracle/admin/airman/bdump
$ ls -lrt alert
alert: No such file or directory
$ *
ksh: airman_arc0_11192.trc: cannot execute
$ ls -lrt alert*
-rw-r----- 1 oracle oinstall 5323818 Sep 4 20:54 alert_airman.log
$ mkdir flashback
$ chmod 755 flashback
$ sqlplus
SQL*Plus: Release 10.2.0.3.0 - Production on Wed Sep 5 06:10:06 2012
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Enter user-name: /as sysdba
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> select max(sequence#) from v$log_history;
MAX(SEQUENCE#)
9221
SQL> select NAME,DATABASE_ROLE,GUARD_STATUS,SWITCHOVER_STATUS, SWITCHOVER#,OPEN_MODE,PROTECTION_MODE from v$database;
NAME DATABASE_ROLE GUARD_S SWITCHOVER_STATUS SWITCHOVER# OPEN_MODE
PROTECTION_MODE
AIRMAN PHYSICAL STANDBY NONE SESSIONS ACTIVE 4176335025 MOUNTED
MAXIMUM PERFORMANCE
SQL> select NAME,DATABASE_ROLE,GUARD_STATUS from v$database;
NAME DATABASE_ROLE GUARD_S
AIRMAN PHYSICAL STANDBY NONE
SQL> select SWITCHOVER_STATUS, SWITCHOVER#,OPEN_MODE,PROTECTION_MODE from v$database;
SWITCHOVER_STATUS SWITCHOVER# OPEN_MODE PROTECTION_MODE
SESSIONS ACTIVE 4176335025 MOUNTED MAXIMUM PERFORMANCE
==================================================
Enter user-name: /as sysdba
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> select name,open_mode from v$database;
NAME OPEN_MODE
AIRMAN MOUNTED
SQL> show parameter log_archive_dest_
NAME TYPE VALUE
log_archive_dest_1 string LOCATION=/u01/oradata/airman/a
rchive VALID_FOR=(ALL_LOGFILES
,ALL_ROLES) db_unique_name=air
man_sj
log_archive_dest_10 string
log_archive_dest_2 string SERVICE=airman_kj LGWR ASYNC V
ALID_FOR=(ONLINE_LOGFILE,PRIMA
RY_ROLE) db_unique_name=airman
_kj
log_archive_dest_3 string
log_archive_dest_4 string
NAME TYPE VALUE
log_archive_dest_5 string
log_archive_dest_6 string
log_archive_dest_7 string
log_archive_dest_8 string
log_archive_dest_9 string
log_archive_dest_state_1 string enable
log_archive_dest_state_10 string enable
log_archive_dest_state_2 string enable
log_archive_dest_state_3 string enable
log_archive_dest_state_4 string enable
log_archive_dest_state_5 string enable
NAME TYPE VALUE
log_archive_dest_state_6 string enable
log_archive_dest_state_7 string enable
log_archive_dest_state_8 string enable
log_archive_dest_state_9 string enable
SQL>
SQL> alter system set log_archive_dest_2=defer;
alter system set log_archive_dest_2=defer
ERROR at line 1:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-16024: parameter LOG_ARCHIVE_DEST_2 cannot be parsed
SQL> alter system set log_archive_dest_2=defer scope=memory;
alter system set log_archive_dest_2=defer scope=memory
ERROR at line 1:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-16024: parameter LOG_ARCHIVE_DEST_2 cannot be parsed
SQL> alter system set log_archive_dest_2=defer scope=both;
alter system set log_archive_dest_2=defer scope=both
ERROR at line 1:
ORA-32001: write to SPFILE requested but no SPFILE specified at startup
SQL> show parameter spfile
NAME TYPE VALUE
spfile string
$ sqlplus
SQL*Plus: Release 10.2.0.3.0 - Production on Wed Sep 5 06:26:40 2012
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Enter user-name: /as sysdba
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> select name,open_mode from v$database;
NAME OPEN_MODE
AIRMAN MOUNTED
SQL> create spfile from pfile;
File created.
SQL> alter database recover managed standby database cancel;
Database altered.
SQL> show parameter dump
NAME TYPE VALUE
background_core_dump string partial
background_dump_dest string /u01/app/oracle/admin/airman/b
dump
core_dump_dest string /u01/app/oracle/admin/airman/c
dump
max_dump_file_size string UNLIMITED
shadow_core_dump string partial
user_dump_dest string /u01/app/oracle/admin/airman/u
dump
SQL> shutdown immediate;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 209715200 bytes
Fixed Size 2029008 bytes
Variable Size 150997552 bytes
Database Buffers 54525952 bytes
Redo Buffers 2162688 bytes
SQL> show parameter spfile
NAME TYPE VALUE
spfile string /u01/app/oracle/product/10.2.0
/Db_1/dbs/spfileairman.ora
SQL> alter database mount standby database;
Database altered.
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
Database altered.
SQL> show parameter log_archive_dest_
NAME TYPE VALUE
log_archive_dest_1 string LOCATION=/u01/oradata/airman/a
rchive VALID_FOR=(ALL_LOGFILES
,ALL_ROLES) db_unique_name=air
man_sj
log_archive_dest_10 string
log_archive_dest_2 string SERVICE=airman_kj LGWR ASYNC V
ALID_FOR=(ONLINE_LOGFILE,PRIMA
RY_ROLE) db_unique_name=airman
_kj
log_archive_dest_3 string
log_archive_dest_4 string
NAME TYPE VALUE
log_archive_dest_5 string
log_archive_dest_6 string
log_archive_dest_7 string
log_archive_dest_8 string
log_archive_dest_9 string
log_archive_dest_state_1 string enable
log_archive_dest_state_10 string enable
log_archive_dest_state_2 string enable
log_archive_dest_state_3 string enable
log_archive_dest_state_4 string enable
log_archive_dest_state_5 string enable
NAME TYPE VALUE
log_archive_dest_state_6 string enable
log_archive_dest_state_7 string enable
log_archive_dest_state_8 string enable
log_archive_dest_state_9 string enable
SQL> alter system set log_archive_dest_2=defer scope=both;
alter system set log_archive_dest_2=defer scope=both
ERROR at line 1:
ORA-32017: failure in updating SPFILE
ORA-16179: incremental changes to "log_archive_dest_2" not allowed with SPFILE
SQL> alter system set log_archive_dest_2=defer scope=memory;
alter system set log_archive_dest_2=defer scope=memory
ERROR at line 1:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-16024: parameter LOG_ARCHIVE_DEST_2 cannot be parsed
SQL> alter system set log_archive_dest_state_2=defer scope=both;
System altered.
SQL> show parameter log_archive_dest_state_2
NAME TYPE VALUE
log_archive_dest_state_2 string DEFER
SQL> show parameter db_recovery_file_dest
NAME TYPE VALUE
db_recovery_file_dest string
db_recovery_file_dest_size big integer 0
SQL> alter system set db_recovery_file_dest='/u01/oradata/flashback';
alter system set db_recovery_file_dest='/u01/oradata/flashback'
ERROR at line 1:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-19802: cannot use DB_RECOVERY_FILE_DEST without DB_RECOVERY_FILE_DEST_SIZE
SQL> alter system set db_recovery_file_dest_size=14G;
System altered.
SQL> alter system set db_recovery_file_dest='/u01/oradata/flashback';
System altered.
SQL> show parameter db_recovery_file_dest
NAME TYPE VALUE
db_recovery_file_dest string /u01/oradata/flashback
db_recovery_file_dest_size big integer 14G
SQL> show parameter db_flashback_retention_target
NAME TYPE VALUE
db_flashback_retention_target integer 1440
SQL> alter system set db_flashback_retention_target=2880;
System altered.
SQL> create pfile from spfile;
File created.
SQL> alter database recover managed standby database cancel;
Database altered.
SQL> alter database flashback on;
Database altered.
SQL> create restore point before_open_standby guarantee flashback database;
Restore point created.
SQL> select scn, storage_size, time, name from v$restore_point;
SCN STORAGE_SIZE
TIME
NAME
1536320779 8192000
05-SEP-12 06.37.50.000000000 AM
BEFORE_OPEN_STANDBY
SQL> set linesize 200
SQL> col scn,storage_size,time,name format a25
SQL> select scn,storage_size,time,name from v$restore_point;
SCN STORAGE_SIZE TIME
NAME
1536320779 8192000 05-SEP-12 06.37.50.000000000 AM
BEFORE_OPEN_STANDBY
SQL> alter database activate standby database;
Database altered.
SQL> select database_role from v$database;
DATABASE_ROLE
PRIMARY
SQL> shutdown immediate;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 209715200 bytes
Fixed Size 2029008 bytes
Variable Size 150997552 bytes
Database Buffers 54525952 bytes
Redo Buffers 2162688 bytes
Database mounted.
Database opened.
SQL> select name,open_mode from v$database;
NAME OPEN_MODE
AIRMAN READ WRITE
SQL> select max(sequence#) from v$log_history;
MAX(SEQUENCE#)
9221
Edited by: SHANOJ on Sep 7, 2012 9:31 AMLooking at the information provided by you. You have created a flashback restore point and then activated your standby database. As you have flashback restore you can flashback your current primary database(old standby) to standby mode but all your changes made on your database will be lost. And you have not done a switchover. you have activated your standby.
-
Do we need run catbundle.sql file for new databases.
dear all,
i have doubt over execution of catbundle.sql or not?
scenario:
i have insatlled 10gr2 on rhel5 and applied patchset 4 (10.2.0.5) and applied Oracle® Database Patch 10248542 - 10.2.0.5.2 Patch Set Update
after this i have create fresh database.
now,
in Oracle® Database Patch 10248542 - 10.2.0.5.2 Patch Set Update document it has specified in belwo section
3.4 Post Installation Instructions for Databases Created or Upgraded after Installation of PSU 10.2.0.5.2 in the Oracle Home
These instructions are for a database that is created or upgraded after the installation of PSU 10.2.0.5.2.
You must execute the steps in Section 3.3.2, "Loading Modified SQL Files into the Database" for any new database only if it was created by any of the following methods:
Using DBCA (Database Configuration Assistant) to select a sample database (General, Data Warehouse, Transaction Processing)
Using a script that was created by DBCA that creates a database from a sample database
Cloning a database that was created by either of the two preceding methods, and if the steps in Section 3.3.2, "Loading Modified SQL Files into the Database" were not executed after PSU 10.2.0.5.2 was applied
Upgraded databases do not require any post-installation steps.
so do we need to run catbundle here or not.
since i have created fresh database after applying 10.2.0.5 PSU2 why does it required.
opatch output:
[oracle@RG615 ~]$ opatch lsinventory
Invoking OPatch 10.2.0.5.1
Oracle Interim Patch Installer version 10.2.0.5.1
Copyright (c) 2010, Oracle Corporation. All rights reserved.
Oracle Home : /prd/crm/swbcrmdb/usr/oracle/product/10.2.0/db_1
Central Inventory : /prd/crm/swbcrmdb/usr/oracle/oraInventory
from : /etc/oraInst.loc
OPatch version : 10.2.0.5.1
OUI version : 10.2.0.5.0
OUI location : /prd/crm/swbcrmdb/usr/oracle/product/10.2.0/db_1/oui
Log file location : /prd/crm/swbcrmdb/usr/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch2011-05-03_11-41-34AM.log
Patch history file: /prd/crm/swbcrmdb/usr/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch_history.txt
Lsinventory Output file location : /prd/crm/swbcrmdb/usr/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2011-05-03_11-41-34AM.txt
Installed Top-level Products (2):
Oracle Database 10g 10.2.0.1.0
Oracle Database 10g Release 2 Patch Set 4 10.2.0.5.0
There are 2 products installed in this Oracle Home.
Interim patches (1) :
Patch 10248542 : applied on Tue May 03 07:32:29 BST 2011
Unique Patch ID: 13292123
Created on 25 Dec 2010, 23:11:24 hrs PST8PDT
Bugs fixed:
6402302, 9713537, 8350262, 9949948, 8394351, 10327179, 8546356, 9711859
9714832, 9952230, 10248542, 8544696, 9963497, 9772888, 8664189, 10249537
7519406, 9952270, 8277300, 9726739
OPatch succeeded.Pl post the output of view DBA_REGISTRY_HISTORY - see MOS Doc 605795.1 (Introduction To Oracle Database catbundle.sql)
Was the database created using DBCA or manually using scripts ?
Srini -
I would like to see exact execution time of SQL query (without seeing TOAD execution time, because that may not be correct if I executed the same query 2nd time).
Please let me know.If you want to display the information in the front end, you would have to do something like
start_time := dbms_utility.get_time();
<<your query>>
end_time := dbms_utility.get_time();end_time - start_time would give you the wall clock run time of the query in hundredths of a second.
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC -
Need help recording live drums on seperate tracks.
I used to be a professional recording engineer, and as such took pride in knowing my way around a console. But with GB I am stumped.
I need to record a live drummer, and subsequently place each drum on a seperate "track" as when recording analog.
Being totally new to hard disc recording, means learning all over again. Drums are set & miced, what do I need to make this happen (or is it even possible in GB)?
Watched the seminar for Logic, and sure enough there was a drum kit properly recorded on individual tracks, but they gave no detailed explination of how that was done.
Thanks for all help. I'm retired now, and looking for something to fill my time.Basically you select the channels for each track in
the DAW. In this case GB.
At the bottom of the 'track info' window on your real
instrument (mic) tracks use the 'input' pulldown menu
to assign channels for each mic for each track you
wish to record on.
In case you are not familiar enough with GB.
If the track info window is not open. You can open it
by double clicking on the track, or under 'Track'
menu use: Show Track Info.
Or keystroke: 'Command I'.
The available channels will be available and show in
the input pulldown menu.
So basically you will want an interface with the
right I/0.
Depending on what you may have been used to in the
past for analog quality.
You may wish to take some time to research what's
available for the right amount of I/O with good pre's
and conversion. There is definitely a line of
demarcation in the quality of analog circuits and
digital converters and clock.
It may or may not matter to you, I don't know but
judging from your past and post maybe worth a
mention. However, I don't know to what standards you
wish to work in.
Standards such as Alan Parsons, Geoff Emerick, and Jeff Lynne.
Also if you want to use outboard analog while
tracking with an interface you may want to have
insert I/O available.
And of course if you are wanting to use bussing
sends, complete editing, etc. within your DAW you
will want start looking at other DAW's like Logic or
PT or DP, etc.
Thanks, I want to get started with GB, and have some basic tracks laid & get Logic in a couple of months. Got to have bussing send/recieve for fx on SN, EQing the kit, compression, etc.
If you are not familiar with other forums here are a
couple that may be of interest to you.
http://recforums.prosoundweb.com/
http://www.gearslutz.com/board/
Mac based:
http://www.bigbluelounge.com/forums/index.php
Lots of great info here, thanks. -
Need help Recording G-Force VST's Like MInimonsta and M-Tron
Hello everyone!
Having a great time with logic pro 7 so far,
I need some help recording my G-Force synths.
Do I use the instrument,Rewire, or Audio tracks?
Any basic setup tips would be golden!
Thanks Folks
Abe
1.5 ghz, 1 gig ram Mac OS X (10.3.9)You should be using the AU versions... any reason not to or was the VST term used as a generic term for softsynth? They are avalable as AU.
You would use an Audio Instrument track and then where you would set the input if it were an audio track... in audio instrument this is a pop up for your softdynths/samplers.
Once you are ready to commit them as audio files then use "export track as audio file".
J -
Need help in SQL (DENSE_RANK) function
Hello All,
I need the help in SQL.
We have a table called status and the column are
status_id number
account_id number
status_cd varchar2(10)
created_id varchar2(10)
created_by date
and data is as follows
insert into status values (1,101,'ENTER','ABC',to_date('21-JAN-2007 11:15:14','DD-MON-YYYY HH:MI:SS'));
insert into status values (2,101,'REVIEW','DEF',to_date('21-JAN-2007 11:30:25','DD-MON-YYYY HH:MI:SS'));
insert into status values (3,101,'APPROVE','GHI',to_date('21-JAN-2007 11:30:25','DD-MON-YYYY HH:MI:SS'));
insert into status values (4,102,'ENTER','ABC',to_date('21-JAN-2007 11:18:14','DD-MON-YYYY HH:MI:SS'));
insert into status values (5,102,'REVIEW','DEF',to_date('21-JAN-2007 11:33:25','DD-MON-YYYY HH:MI:SS'));
insert into status values (6,102,'CANCEL','GHI',to_date('21-JAN-2007 11:33:25','DD-MON-YYYY HH:MI:SS'));
insert into status values (7,103,'ENTER','ABC',to_date('21-JAN-2007 11:21:14','DD-MON-YYYY HH:MI:SS'));We have different status as follows
1. ENTER
2. REVIEW
3. APPROVE
4. CANCEL
5. REJECT
My requirement ..
I need the max of created_id column for the status in ('APPROVE','CANCEL') and if there is no status in ('APPROVE','REVIEW') than it should be NULL.
I wrote an SQL as
select account_id,max(created_id) keep (dense_rank first order by decode(status_cd,'APPROVE',created_dt,'REVIEW',created_dt,NULL) DESC NULLS LAST,
decode(status_cd,'APPROVE',status_id,'REVIEW',status_id,NULL) DESC NULLS LAST) last_app_rev_user
from status
group by account_id and gives me the output like
ACCOUNT_ID LAST_APP_R
101 GHI
102 DEF
103 ABCBut I want the Output like
ACCOUNT_ID LAST_APP_R
101 GHI
102 DEF
103 NULLAs the account 103 has no status called 'REVIEW' and 'APPROVE'
My DB Version in 10.2.0.3.0.
Hope I explain it properly. And if you have any other option without dense_rank still i will be happy.
Thanks in advance for your help.
AB
null
Message was edited by:
ABinstead of max(created_id) keep... use
smth like max(case when status_cd in ('APPROVE','REVIEW') then created_id end) keep...
Maybe you are looking for
-
I have transferred my website from another pc, i have not changed a thing and. started up TomCat. A number of the pages work correctly, but i get the following error on other pages. org.apache.jasper.JasperException: Unable to compile class for JSP C
-
Large iDVD Project (help with iMovie formats, time totals, quality)
Hi, I am in the process of finishing up a large DVD project. I went on a six month backpacking trip, and have lots of photos/small clips to make a DVD from. I will have a main menu in iDVD with submenus for each country (Mexico, Cook Islands, NZ, Aus
-
Background java thread stops after running the fx thread
in my server thread i am accepting a file . so i used Platform.runLater() to display a scene that gets confirmation from user. But when it reach the scene it is not going back to the server thread. class server implements Runnable public void run() w
-
Hi, I need to add sales orders through my add-on. I could add the sales orders. But, when I'm adding lines to the sales order, I'm getting the following issue: There is a difference between the document total and its components. [ORDR.DocTotal][line
-
Create FK Auto Creates Columns in Child
In ERwin when I created an FK releationship from parent to child it would automatically add the columns to the child name with the matching names. But in Data Modeler 3.1.0691 it just adds {column}, {column1}, and {column2} and then I have to manuall