How to trace every dml statement for a schema/ database
hi,
how to trace every dml statement for a schema/ database
PFile Entrie
init.ora Parameter Example event='1401 trace name errorstack, level 12';
tkprof orcl_ora_3632.trc b.txt
after these two steps I am not able to see the sql statements in trace ...
Please suggest.
Thanks & Regards,
Hi,
Trace Event 1401 will create a trace file and dumps the information when ORA-01401 error occurs. This error occurs when "inserted value too large for column"
You will see the trace file getting populated only when you encounter ORA-01401 error.
Regards
Similar Messages
-
How to trace the SQL statements executed in a database
I am using Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production on a sun server and I am not familiar with Oracle but with MS SQL there is a tool called profiler, it allows you to monitor and see what is going on in a specific databases whether it is SQL statement executins or anything else. I have installed the oracle enterpise manager console at my windows client and I tried to look for a tool similar to the profiler in the MS SQL. I tried the TRACE DATA VIEWER and I inputed the login credentials but I don' t actually know the service name and I am getting an error ORA-12514 The TSN listener can not resolve the service name given in the connect descriptor. Therefore, am I on the right road so i have to look for the service name or are there any other ways i can trace the currently executing SQL statement in a specific database. I am really stuck there. I would appreciate if somebody help me out. Thanks
Abdel MoalimAbdel Moalim wrote:
I am using Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production on a sun server and I am not familiar with Oracle but with MS SQL there is a tool called profiler, it allows you to monitor and see what is going on in a specific databases whether it is SQL statement executins or anything else. I have installed the oracle enterpise manager console at my windows client and I tried to look for a tool similar to the profiler in the MS SQL. I tried the TRACE DATA VIEWER and I inputed the login credentials but I don' t actually know the service name and I am getting an error ORA-12514 The TSN listener can not resolve the service name given in the connect descriptor. Therefore, am I on the right road so i have to look for the service name or are there any other ways i can trace the currently executing SQL statement in a specific database. I am really stuck there. I would appreciate if somebody help me out. Thanks
Abdel MoalimHi
I see others have answered the network connectivity issues, I'll try and address the tracing issue. Your best bet is to review http://www.petefinnigan.com/ramblings/how_to_set_trace.htm for the many ways in which a sessions SQL and indeed other activity can be traced. In version 7 (which I'm guessing is yours from the sid) the only profiler available was tkprof (Trace Kernel Profiler) which will do a good job of analysing your trace file. The trace files themselves are generated on the server in a protected directory so you may need to ask your dba for access to them. There are other profilers around now (I have one which runs in v9 and higher database at http://www.niall.litchfield.dial.pipex.com/SimpleProfiler/SimpleProfiler.html which will analyse your files for example) but tkprof is the start point - or else just reading the trace file in a text editor. There is also a utility written by the Oracle Apps guys trcanalyzer that will do a good job for you. In general the interface is poor compared with the ms utility but the information is deeper and more helpful
Niall Litchfield
http://www.orawin.info/ -
How would I create buttons states for MCs I am creating abstract MCs
I am creating a generic website that would have abstract MCs that would load jpg or TXT fields for the user interface to allow for fast updates to the site. The MCs that would make up the user interface would be empty and load things into it using XML or PHP later on. How would I create button states for the user interface MCs. I started creating a function for every MC button state but I thought there might be a more efficient way.
would creating a array help in this case?
and is using URLRequest the way to link to pages with in a movie well the flash movie that is the site it's self?
/*---------------------------- THE START OF MY ACTION SCRIPT ------------------------------*/
var waywardLogo_mc:MovieClip = new MovieClip;
var theCollection_mc:MovieClip = new MovieClip;
var newsPage_mc:MovieClip = new MovieClip;
var whatthe#$@!doyouwant!?_mc:MovieClip = new MovieClip;
/*---------------------------- onOver ------------------------------*/
waywardLogo_mc.addEventListener(MouseEvent.ROLL_OVER,onOver);
theCollection_mc.addEventListener(MouseEvent.ROLL_OVER,onOver);
newspage_mc.addEventListener(MouseEvent.ROLL_OVER,onOver);
whatthe#$@!doyouwant!?_mc.addEventListener(MouseEvent.ROLL_OVER,onOver);
/*---------------------------- onOut ------------------------------*/
waywardLogo_mc.addEventListener(MouseEvent.ROLL_OUT,onOut);
theCollection_mc.addEventListener(MouseEvent.ROLL_OUT,onOut);
newspage_mc.addEventListener(MouseEvent.ROLL_OUT,onOut);
whatthe#$@!doyouwant!?_mc.addEventListener(MouseEvent.ROLL_OUT,onOut);
/*---------------------------- onClick ------------------------------*/
waywardLogo_mc.addEventListener(MouseEvent.CLICK,onClick);
theCollection_mc.addEventListener(MouseEvent.CLICK,onClick);
newspage_mc.addEventListener(MouseEvent.CLICK,onClick);
whatthe#$@!doyouwant!?_mc.addEventListener(MouseEvent.CLICK,onClick);
function onOver(event:MouseEvent):void
event.target.alpha = .5;
function onOut(event:MouseEvent):void
event.target.alpha = 1;
function onClick(event:MouseEvent):void
event.target.URLRequest("");
/*---------------------------- onover, onOut, onClick buttonModes ------------------------------*/
waywardLogo_mc.buttonMode = true;
theCollection_mc.buttonMode = true;
newspage_mc.buttonMode = true;
whatthe#$@!doyouwant!?_mc.buttonMode = true;click insert/new symbol, tick movieclip, assign a name, tick export for actionscript and in the class textfield enter a name (say ButtonClass) and click ok.
attached to the first frame of your new movieclip, type stop() in the actions panel. put whatever graphic you want on-stage for your button's up stage. create another keyframe, label it "over" and put whatever graphic you want for button's over state on-stage.
in a layer above those graphics, you'll probably want to add a dynamic textfield so each of your buttons can have different text. assign the textfield and instance name (say tf) and extend its timeline to the last frame of your movieclip button.
then when you want to create a button, on your timeline you can use:
var b:ButtonClass=new ButtonClass(); // these two lines need to be entered for each button
buttonhandlerF(b,someX,someY);
//-------code between dotted lines only needs to be entered once no matter how many buttons you add --------------------
function buttonhandlerF(b:ButtonClass,x:Number,y:Number){
b.addEventListener(MouseEvent.MOUSE_OVER,overF);
b.addEventListener(MouseEVent.MOUSE_OUT,outF);
b.x=x
b.y=y
addChild(b);
function overF(e:MouseEvent){
e.currentTarget.gotoAndStop("over");
function outF(e:MouseEvent){
e.currentTarget.gotoAndStop(1);
//-------code between dotted lines only needs to be entered once --------------------
// you'll also want to create a click listener and listener function
the code between the dotted lines is amenable to being added to a ButtonClass.as class file if want to expand your capabilities. -
Please Help!!!
How to write a case statement for the totals column of two different years (2013 and 2014) of the same month so that I can get a +/- column.
January 2014 January
2013 +/-
Region Entry Exit Total Entry Exit Total (Total of Jan2014-Total of Jan2013)
A 2 3
40 5 7 30 40-30= 10What is a table structure? Sorry cannot test it right now..
SELECT <columns>,(SELECT Total FROM tbl WHERE Y=2014)-(SELECT Total FROM tbl WHERE Y=2013)
FROM tbl
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
How to consolidate the financial statements for 3 company codes, assigned t
Hi Friends,
How to consolidate the financial statements for 3 company codes, assigned to 3 different companies, 3 different fiscal years, 3 different controlling areas and all the 3 Company Codes assigned to same chart of accounts in the same client?
Can we need any ABAP program for this (or) Is it possible using Report Painter?
Please help me.
ThanksHi friend,
Is it a real-time situation or something you are visualising ?
For consolidation, you can use a group chart of accounts and select that in the operative chart of accounts for consolidation purposes. This would work provided the company codes use the same operative chart of accounts and fiscal year.
I hope the above would be helpful to you.
Regards, -
How to know last access date for the schema's
Dear all,
could u plz tell me How to know last access date for the schema’s
Regards,
Srinivasa rao.PSrinivas,
could u plz tell me How to know last access date for the schema’s
In Oracle, we don't access schemas but schema objects.And this informationis not kept anywhere persistantly.As Amit also mentioned,if you do need it,you have to enable Auditing.
Aman.... -
How to save the session states for a tabular form WITHOUT using check boxs?
Greeting guys,
As you know that we can use collections to save the session states of a tabular forms, described in the how-to doc of manual tabular forms. However, what I am trying to do ( or have to do) is to provide a manual tabular form, and save the session states for validation, without using the check boxes. Because a user can put contents into some columns in a row without checking the corresponding checkbox, according to the requirements. So basically what I tried is to loop over all the rows and save Every entry into a collection. However, sometimes I got "no data found" error with unknown reasons.
My current solution is to use the "dirty" Retry button that gets back the history, which IMO is not a good workabout. So, I'd appreciate if somebody can shed some light on a better solution, especially if it is close to the one in that how-to doc.
Thanks in advance.
LucThe following is the first collection solutin I've tried:
htmldb_collection.create_or_truncate_collection('TEMP_TABLE');
for i in 1..p_row_num loop -- Loop on the whole form rows
if (htmldb_application.g_f01(i) is not null) or (htmldb_application.g_f05(i) <> 0)
--If either of them has some input values, the row should be saved into the colleciton.
then
htmldb_collection.add_member(
p_collection_name => 'TEMP_TABLE',
p_c001 => htmldb_application.g_f01(i),
p_c002 => htmldb_application.g_f03(i),
p_c003 => htmldb_application.g_f04(i),
p_c004 => htmldb_application.g_f05(i),
p_c005 => htmldb_application.g_f06(i),
p_c006 => htmldb_application.g_f08(i)
end if;
end loop;
Some of columns have null values, but I don't think that's the reason. Because once I clicked all the check boxes, there would be no error no matter what values were in other columns.
Another issue would be extract the values FROM the collection, which has been tried because I had problem to store the data into the collection. I used "decode" functions inside the SQL to build the tabular form. I am not sure whether it will be the same as a regular SQL for a tabular form, like the example in the How-to doc.
Also I didn't use the checksum, for it is not an issue at the current stage. I am not sure whether that's the reason which caused the NO DATA FOUND error. -
How to monitor/capture SQL statement for an event?
I want to capture all sql statements for 10 minutes that ran against the database. How should i do that?
Thanks,
DaveThe following document will give u the requred know how.
http://www.oracle.com/technology/products/manageability/database/pdf/ow05/PS_S001_274001_106-1_FIN_v1.pdf -
How can I change the state for normal. All I get is a question mark.
I can't change the normal state for my site. The button for color of text for the normal state is a question mark. Is there a way to reset this?
Thanks. I am trying to change the appearance of a hyperlink on a web page. Specifically, I want to change the default text color from blue to another color. I can change the color for the other states of the hyperlink (rollover, etc.) but the attempt to change the normal state of the hyperlink is unsuccessful because the color box for that state is a question mark. Bill
-
How to configure Oracle Enterprise Manager for ASM RAC Database ?
Dears,,
We have two databases (Primary & Standby), each database has two instances
Database version: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit
How to configure Oracle Enterprise Manager for this environment ?
I need documentation for this please.
Many thanks & Regards,,Assuming an agent is running on the servers you want to monitor,
navigate to the Agent home page (Via setup --> Agent)
When in the agent home page select 'Add Database'and press [Go]
Assuming yopur database now gets recognized, select the Configure icon and enter the password for dbsnmp.
When done, press [Ok] to return to the agent home page.
Regards
Rob
http://oemgc.wordpress.com -
How to suppress Log Shipping alert for a specific database?
I want to disable log shipping for a database temporarily. I have disabled the backup job, copy job, and restore job created automatically when log shipping is configured for the database. However, I cannot disable the Log Shipping alert
job since there are other databases configured for log shipping. How can I suppress Log Shipping alert for specific database? I don't want to disable the log shipping for the primary database since it will delete all jobs and history
related to the log shipping configuration at the primary, secondary and monitor server instances.Too late but this is possible. We just need to set the value threshold_alert_enabled to 0 in the system table msdb.dbo.log_shipping_monitor_primary on the primary server and in msdb.dbo.log_shipping_monitor_secondary on the secondary server.
I just tested it out and it should work.
To test this out, perform the below:-
1. Run exec master.sys.sp_check_log_shipping_monitor_alert will show the same error message that thresholds have been crossed. This is the same script used in LSAlert job.
Use something like the below command to edit:-
2. Run the below to change the values:
update msdb.dbo.log_shipping_monitor_primary
set threshold_alert_enabled = 0
where primary_database = 'XYZ'
Run this for all databases that needs to be excluded from monitoring.
3. Run the script in step 1 again and it should run now.
Please mark the answer as helpful if i have answered your query. Thanks and Regards, Kartar Rana -
How to dynamically create sql statement for Defaulting Segment Values?
Hi,
Navigation:
1) Descriptive/Segments
2) Query for DFF to be modified
3) Uncheck “Freeze Flexfield Definition”
4) (B) Segments
5) Segments Summary form opens
6) (B) open - Segments form opens
Now, here I want to specify Default type as "SQL Statement" and in the default value field I want to use SQL statement with parameters (to evaluate the default value).
The parameters should be pass at runtime from the form in which we have this DFF. The parameters value should be one of the values which get evaluated at runtime in the form window.
Please suggest how we can achieve this?
Or is there any alternative to achieve this?
Thanks!!
Regards,
Narender
Edited by: Narender Singh on Mar 30, 2010 7:47 AM
Edited by: Narender Singh on Mar 30, 2010 7:48 AMJason,
it is possible, though not so simple as with a report.
What you need to do is to create a pipelined function, that returns your date and count data. This pipelined function can be the base of a pseudo-table, which can be used in a select. For the pipelined function you need to define types for one row and a table to define the return-type for your function:
create or replace type calendar_row as object (date_time date, description varchar2(250));
create type calendar_table as table of calendar_row;
Then you can create the package with the function:
================================================
create or replace package dyn_calendar is
procedure set_query(i_query in varchar2);
function view_source return calendar_table pipelined;
end;
create or replace package body dyn_calendar is
v_query varchar2(100) := null;
procedure set_query(i_query in varchar2) is
begin
v_query := i_query;
end;
function view_source return calendar_table pipelined is
TYPE cursor IS REF CURSOR;
c_cal cursor;
v_date_time date := null;
v_description varchar2(100) := null;
r_cal calendar_row;
begin
open c_cal for v_query;
fetch c_cal into v_date_time, v_description;
loop
exit when c_cal%notfound;
r_cal := calendar_row(v_date_time, v_description);
pipe row(r_cal);
fetch c_cal into v_date_time, v_description;
end loop;
return;
end;
end;
================================================
Now you can set query in a PL/SL region before the calendar:
dyn_calendar.set_query(SELECT count(*), ' || :P8_SOURCE_DATE || ' FROM ' || :P8_SOURCE_TABLE || ' GROUP BY ' || :P8_SOURCE_DATE);
and you can base your calendar on the query:
select * from table(dyn_calendar(view_source))
Good luck,
Dik -
How to have a DML-Stat. page process between regions
i have a form with 6 regions.
in one of the region i place a button save.
i have a conditional process to insert the data in the table
after entering the data into the respective fields when i click the save button
it is giving this error.
ORA-01403: no data found
Error UNABLE TO INSERT
OK
what is this error why it is comming?
how to solve it? if anyone gives solution it would be a bright day for me.hi scott,
sorry for not replying quickly,
I was very busy with finishing the project week end.
My Answers:
1. I asked you if I had your first name right.
My first name is kavita. but everybody will call me srikavi
2. I asked you to please update your duplicate post.
yes i have modified saying not to view this thread as the contents are same posted in another thread with a different subject
3. I looked at your application. You did not tell me which page has the problem or how I could run the page to see the problem. So I looked around a bit and found:
Application: 24585 - paramaterized report page no. 4 create card
4. It has no pages with 6 regions, and
Region names:
New contract info
client
followup
type
brief
reference
comment
terms
the items in these regions belongs to a view named vw_cont_card.
5. It has no pages with a "create" button in the last region, and
in the top region named "New contract info" i have the create button
6. It has no pages with conditional processes.
yes, there is no conditional processes, but Automatic Row Processing (DML) is present
My Problem is how to create a new record after inputing the datas into the items.
thanks, sorry for the delayed reply, -
How to tune the Update statement for 20 million rows
Hi,
I want to update 20 million rows of a table. I wrote the PL/SQL code like this:
DECLARE
v1
v2
cursor C1 is
select ....
BEGIN
Open C1;
loop
fetch C1 bulk collect into v1,v2 LIMIT 1000
exit when C1%NOTFOUND;
forall i in v1.first..v1.last
update /*+INDEX(tab indx)*/....
end loop;
commit;
close C1;
END;
The above code took 24 mins to update 100k records, so for around 20 million records it will take 4800 mins (80 hrs).
How can I tune the code further ? Will a simple Update statement, instead of PL/SQL make the update faster ?
Will adding few more hints help ?
Thanks for your suggestions.
Regards,
Yogini JoshiHello
You have implemented this update in the slowest possible way. Cursor FOR loops should be absolute last resort. If you post the SQL in your cursor there is a very good chance we can re-code it to be a single update statement with a subquery which will be the fastest possible way to run this. Please remember to use the {noformat}{noformat} tags before and after your code so the formatting is preserved.
David -
I have a Windows Server 2012 R2 virtualization cluster. All the hosts are connected to an external storage system, and virtual machines' files are stored on external volumes (CSVs). All the hosts and virtual machines are a part of the same AD domain
(mixed Windows Server 2012 RTM / 2008 R2 domain controllers). All the domain controllers are running in the virtual machines on the hosts of this cluster.
To prevent problems when all the hosts are turned off and then on simultaneously (for example, because of a power failure) all the domain controller VM files has been placed on local disks of the virtualization hosts (not on the Cluster Shared
Volumes). As Hyper-V services don't depend on other Windows Server services (except its networking components), it means that my domain controllers can always start, providing the virtualization host can start at all. However, it also means
that those DCs cannot be (quickly) migrated to other hosts while their current hosts are being rebooted. So if I need to reboot a virtualization host to install new updates, for example, I have to shut down the corresponding DC, reboot the host
and wait for the DC to finish cold boot and come back online. It means some interruption of service for our users, which, in turn, requires me to perform the reboots late in night.
The downtime can be significantly decreased by saving the state of the VM in which the DC is running. However, all the articles I've found on the Internet strongly recommend against it. I'm trying to understand why this recommendation was issued in the first
place. However, I'm unable to find a clear explanation. I've found some statements that saving state of a DC can cause serious AD replication problems because of tombstoning, and that the password of a DC computer account may be changed
while the DC itself stays in the saved state, which could prevent the DC from connecting to the domain after its state has been restored. However, those considerations are non-significant when we discuss a short-time
(5 to 10 minutes) saved state.
I work with AD and virtualization long time, and I fail to see any danger in saving state of a DC for several minutes. In my opinion, after its state has been restored it would simply replicate all the AD changes from other DCs, and that's all.
What's your opinion?
Evgeniy Lotosh
MSCE: Server infractructire, MCSE: MessagingHello,
as stated in "http://technet.microsoft.com/en-us/library/virtual_active_directory_domain_controller_virtualization_hyperv(v=ws.10).aspx"
Operational Considerations for Virtualized Domain Controllers
Domain controllers that are running on virtual machines have operational restrictions that do not apply to domain controllers that are running on physical machines. When you use a virtualized domain controller, there are some virtualization software features
and practices that you should not use:
Do not pause, stop, or store the
saved state of a domain controller
in a virtual machine for time periods longer than the tombstone lifetime of the forest and then resume from the paused or saved state.
This may sound as it is supported to store it for shorter times and use it.
BUT recommendation also from the Hyper-V Program manager in
http://blogs.msdn.com/b/virtual_pc_guy/archive/2008/11/24/the-domain-controller-dilemma.aspx recommends against using them.
Also best practices
http://blogs.technet.com/b/vikasma/archive/2008/07/24/hyper-v-best-practices-quick-tips-2.aspx
Best regards
Meinolf Weber
MVP, MCP, MCTS
Microsoft MVP - Directory Services
My Blog: http://blogs.msmvps.com/MWeber
Disclaimer: This posting is provided AS IS with no warranties or guarantees and confers no rights.
Twitter:
Maybe you are looking for
-
Purchase Requisitions created instead of Schedule lines
Hi Experts, When I run MRP for materials with mrp type as PD, MRP creates Purchase Requisitions instead of Schedule lines I have Scheduling agreement in place. Kindly let me know what could be the possible reasons for this Thanks & regards, Shashidha
-
Tx 2000 tablet PC overheating. HP refuses to help me.
I have an HP tx 2000 tablet PC with AMD Turion 64 x2 TL-60 2.00 GHz. I am running Windows Vista 32 Bit SP1. My laptop has been reaching temps of 80 degrees C and sometimes even higher. This is with only one program (IE or Firefox open and running).
-
Hi all! In Sale Order, i create UDF on title and want to get value of total Sale Order. My query: Select $[$29.0.number] . I don;t know to create UDF t But i get error. Can you help me!
-
A fix for a blurry external monitor for the mac air 11
http://gizmodo.com/5938452/a-trick-to-make-using-an-external-monitor-with-your-m acbook-way-better After a frustrating evening with a blurry external monitor I found the fix at link above. Very happy!
-
When opening a link on a web page or in email is attempted, the download window opens up and begins to download the linked info. The link can't be opened