How to find out Index Rebuild times?
Hi,
We have many indexes but I can't find out when they were rebuilded last. Is it possible to find index last rebuild time?
db version: 9.2.0.8
Regards and thanks
Query for LAST_DDL_TIME in DBA_OBJECTS / USER_OBJECTS for those indexes.
Hemant K Chitale
Similar Messages
-
How to find out the last time login for a locked login account?
In ASE 15.4,there are many login account show as locked and unlocked. How to find out the last login time for those locked login account?
Thank you. The version of my ASE is 12.5.4.
This is what I got from select * from syslogins:
suid status accdate totcpu totio spacelimit timelimit resultlimit dbname name password language pwdate audflags fullname srvname logincount procid
1
30 2 10/25/2012 11:41:10.430 AM 0 0 0 0 0 . . ... us_english 02/24/2.0.08 12:55:38.640 PM 0 [NULL] [NULL] [NULL] [NULL]
this is what I got from exec sp_displaylogin 'mylogin':
1 Suid: 46
2 Loginame: mylogin
3 Fullname: FN LN
4 Default Database: mydb
5 Default Language: us_english
6 Auto Login Script:
7 Configured Authorization:
8 Locked: YES
9 Date of Last Password Change: Apr 17 2010 2:36PM
10 Password expiration interval: 0
11 Password expired: NO
12 Minimum password length: 6
13 Maximum failed logins: 0
14 Current failed login attempts:
15 Authenticate with: AUTH_DEFAULT
which one is for last login time? -
How to find out index of string
Hi,
Can you help me to find out index of following strting.
"sss.xxxxx_pain.001.001.02_1002225618.xml"
need to get value "1002225618".
ideally i need to get the value inbetween after second "_" and value before ".xml".
Thanks
MahiHi Mahi,
UDF should be like this:
If you do not want .xml in the out replace statement
var1=var1.substring(sublen+1, len);
with
var1=var1.substring(sublen+1, len-4);
Regards,
Krupa -
How to find out the execution time of a sql inside a function
Hi All,
I am writing one function. There is only one IN parameter. In that parameter, i will pass one SQL select statement. And I want the function to return the exact execution time of that SQL statement.
CREATE OR REPLACE FUNCTION function_name (p_sql IN VARCHAR2)
RETURN NUMBER
IS
exec_time NUMBER;
BEGIN
--Calculate the execution time for the incoming sql statement.
RETURN exec_time;
END function_name;
/Please note that wrapping query in a "SELECT COUNT(*) FROM (<query>)" doesn't necessarily reflect the execution time of the stand-alone query because the optimizer is smart and might choose a completely different execution plan for that query.
A simple test case shows the potential difference of work performed by the database:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
Session altered.
SQL>
SQL> drop table count_test purge;
Table dropped.
Elapsed: 00:00:00.17
SQL>
SQL> create table count_test as select * from all_objects;
Table created.
Elapsed: 00:00:02.56
SQL>
SQL> alter table count_test add constraint pk_count_test primary key (object_id)
Table altered.
Elapsed: 00:00:00.04
SQL>
SQL> exec dbms_stats.gather_table_stats(ownname=>null, tabname=>'COUNT_TEST')
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.29
SQL>
SQL> set autotrace traceonly
SQL>
SQL> select * from count_test;
5326 rows selected.
Elapsed: 00:00:00.10
Execution Plan
Plan hash value: 3690877688
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 5326 | 431K| 23 (5)| 00:00:01 |
| 1 | TABLE ACCESS FULL| COUNT_TEST | 5326 | 431K| 23 (5)| 00:00:01 |
Statistics
1 recursive calls
0 db block gets
419 consistent gets
0 physical reads
0 redo size
242637 bytes sent via SQL*Net to client
4285 bytes received via SQL*Net from client
357 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
5326 rows processed
SQL>
SQL> select count(*) from (select * from count_test);
Elapsed: 00:00:00.00
Execution Plan
Plan hash value: 572193338
| Id | Operation | Name | Rows | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 5 (0)| 00:00:01 |
| 1 | SORT AGGREGATE | | 1 | | |
| 2 | INDEX FAST FULL SCAN| PK_COUNT_TEST | 5326 | 5 (0)| 00:00:01 |
Statistics
1 recursive calls
0 db block gets
16 consistent gets
0 physical reads
0 redo size
412 bytes sent via SQL*Net to client
380 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
1 rows processed
SQL>As you can see the number of blocks processed (consistent gets) is quite different. You need to actually fetch all records, e.g. using a PL/SQL block on the server to find out how long it takes to process the query, but that's not that easy if you want to have an arbitrary query string as input.
Regards,
Randolf
Oracle related stuff blog:
http://oracle-randolf.blogspot.com/
SQLTools++ for Oracle:
http://www.sqltools-plusplus.org:7676/
http://sourceforge.net/projects/sqlt-pp/ -
How to find out index from table?
Hi all,
I've tried to create indexes to some columns from some tables to use for Oracle Text.
I ve got a error message saying that I can not create an index:
"cannot create multiple domain indexes on a column list using same indextype".
I was wondering if an index already exists for that column, how do I find out the name of the index that points to that paticular colum?
Thanks a lot
E.Check the view dba_ind_columns
That will tell you.
something like;
select index_name, column_position, column_name from dba_ind_columns
where table_name = '<table name>'
order by 1,2 -
How to find out which schema(time and payroll) is being used for which empl
Hi,
Can anyone tell me if there is any way we can find out which schema is relevant for which group of employees, for example in a system which has employees from different countries and for each country there is a diffrerent schema being used ?
Is there any feature which defaults the schema names according to groups of employees ? If so what is the name of the feature?
Regards
QBhai
generally the schemas are named X000 which stands for common schema nomination
x replaced by respective country like for india it is IN00 for US U000etc
it is not given according to the group of emplyees but according to the country grouping for your org units
time schemas are country independent they work for all the countries
regards
nalla -
How to find out the first time RMAN be utilized in DB
I need to find out the history of RMAN process in my database, like when it was used first time, and status ect...
I have checked all v$RMAN_xxx view and v$backup_XXXX views, didn't fine anything.
Is there other views that may be helpful?
Also any way I can find out when was archivelog turned on?
ThanksHere is the version
SQL> select banner from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.1.0.4.0 - Prod
PL/SQL Release 10.1.0.4.0 - Production
CORE 10.1.0.4.0 Production
TNS for 32-bit Windows: Version 10.1.0.4.0 - Production
NLSRTL Version 10.1.0.4.0 - Production
Here is what I got if I just issue RMAN from command line:
E:\>rman
Recovery Manager: Release 10.2.0.2.0 - Production on Tue Feb 27 11:21:18 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
RMAN>
here is what I got if I got into $oracle_home/bin
E:\>cd oracle\product\10.1.0\db_1\bin
E:\oracle\product\10.1.0\Db_1\BIN>rman
Recovery Manager: Release 10.1.0.4.0 - Production
Copyright (c) 1995, 2004, Oracle. All rights reserved.
RMAN>
Thanks for the help. -
How to find out the exact time in UK with daylight savings.
Hi,
how can i get the exact time in UK even if the daylight savings time is implemented in UK..,
now my code is implemented for IST ,how can i get the BST timings?
Thankx.the setTimeZone method of SimpleDateFormat (actually inherited from DateFormat). Use it to set it to your timezone when parsing or formatting a date string for your timezone and set it to the UK timezone when parsing or formatting a date string for their timezone.
Edit: IOW SimpleDateFormat was the answer, not a question. -
How to find out last DDL time on a partition of a partitioned index?
I looked into the data dictionary all_ind_partitions but I couldn't find a timestamp...
Any one have an idea?Couldn't you get it from all_objects (owner, object_name, subobject_name)?
-
How to find out the remaining time of guarantee of an iPad Air?
I have received a second hand iPad air today and I would like to know how long of guarantee it still has. Is there any way that, by serial number, activation or other thing, I can access it?If I need to use the guarantee do I must show any receipt or the activation is already enough?
Enter your Serial Number here:
Check Your Service and Support Coverage
You can find your serial number here:
Settings > General > About > Serial Number -
How to find out, How many times a form is printed !
<i>Hi,
I just like to change some text depends on number of times a form has been printed. How to find out the count here.
Please come up with ur answers.
Thank you,
Senthil</i>Hi senthil,
1. which form are u talking about ?
2. There is no such direct facility,
which keeps track of all forms,
which are printed /preview !
regards,
amit m. -
How to find out which query run how many times using ST03?
Hi experts,
I am trying to clean up all the junk queries in BWP. my questions is, How to find out that the particular query ran how my times in a year and by which user using ST03, How to do it step by step?
I don't like to use statistic reports for this. How to do it using ST03?
Please let me know. Thanks in advance.
Sharat.Hi,
Please find the below links which would help you solving you problem,
SAP BW performance tunning : Includes screen shots
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/68fbb490-0201-0010-8eb5-f7e0adaff5bd
SAP BW Query Performance Tuning with Aggregates:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3f66ba90-0201-0010-ac8d-b61d8fd9abe9
With Regards,
PCR -
ADF: How to find out which query has taken what time?
Hi,
I have an ADF application which has many SQL queried running on each button click/page load, so how to find out which query is taking what amount of time? So that i can identify the long running queries and modify them to improve the application performance.
Thanks in advance.Hi,
As suggested by Timo,you need to start tracing on oracle.jbo package for getting the SQL queries.But I think the second option suggested by him would be better.You will have to override executeQueryForCollection method in VO Impl class .Pseudo code would be
@Override
Take start time
super.executeQueryForCollection
Take end time -
How to find out the rows inserted between a time period.
Hi,
Please help me to solve this.
Table - emp.
Colmns - empno(Primary Key),ename, mgr
How to find out the rows inserted between a time period.
For eg:- Between 02-Oct-2006 1 PM and 03-Oct-2006 2 PM.
regards,
Mathew.Hi,
Maybe work:
For each row, ORA_ROWSCN returns the conservative upper bound system change number (SCN) of the most recent change to the row. This pseudocolumn is useful for determining approximately when a row was last updated. It is not absolutely precise, because Oracle tracks SCNs by transaction committed for the block in which the row resides
e.g.:
SGMS@ORACLE10> create table test(cod number);
Table created.
SGMS@ORACLE10> insert into test values (1);
1 row created.
SGMS@ORACLE10> insert into test values (2);
1 row created.
SGMS@ORACLE10> commit;
Commit complete.
SGMS@ORACLE10> insert into test values (3);
1 row created.
SGMS@ORACLE10> commit;
Commit complete.
SGMS@ORACLE10> select SCN_TO_TIMESTAMP(ora_rowscn),ora_rowscn,cod from test;
SCN_TO_TIMESTAMP(ORA_ROWSCN) ORA_ROWSCN COD
06/11/06 08:56:56,000000000 727707205 1
06/11/06 08:56:56,000000000 727707205 2
06/11/06 08:57:05,000000000 727707210 3Cheers -
How can i find out the last time a back up to icloud was done
How can i find out the last time a back up was done to icloud?
Go to Settings>iCloud>Storage & Backup. It will be shown just below the Back Up Now button at the bottom.
Maybe you are looking for
-
Hi all, I'm running a site that requires user login. I approached the building of this site as almost a complete newb to CF (and dynamic coding in general), and it's been a great learing experience (with lots of help from you guys). However, I guess
-
I only want to apply iMatch/iCloud to one of my iTunes playlists, not my entire library. Is that possible?
-
Hi, I am using Adobe Flash CS3 in windows server 2003 SP2. I get an issue while publishing. Its publishing flas for some time and at some point of time, fails throwing flash encountered some problem and stops publishing there after.I am calling Flash
-
Is phone signal seperate from data or do I have to have date turned on to keep my phone signal
I leave my data off, due to being a new iPhone owner and worrying about charges. Twice my phone service dropped to "searching". The AT&T store said that the phone is defective as phone and data are to separate functions of the phone, person at the he
-
Did you get error 1067 when updating Reader?
If you got update error 1067 when updating Reader, I'd like to hear more so we can find a solution. What OS are you using and what version (such as Window XP SP2)? What version of Reader do you have? What was the error message you got? How much disk