Finding dbid
how can I find the dbid of the database, incase the control file is lost and the status is nomount.
how can I find the dbid of the database, incase the control file is lost and the >status is nomount. Since the control file has been lost you will not be able to mount.
There are two places you can find it without opening your database if the DBID has not been recorded.
1.The DBID is used in forming the filename for the control file autobackup.
2. Any saved text files that have output from an RMAN session. Example
Recovery Manager: Release 10.2.0.3.0 - Production on Tue Apr 8 22:00:17 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
RMAN>
connected to target database: LIVEDB (DBID=4244080946)Please also review;
Determining your DBID
http://download.oracle.com/docs/cd/B19306_01/backup.102/b14192/recov003.htm#sthref551
Adith
Similar Messages
-
Greetings friends
Is it possible to find DBID of database when DB is not open given
- DB is in non-archive mode
- No backup is available
- No RMAN catalog repositoryThread on the link has a slighly different issue where user requires
I want to restore the control file from an autobackup.DBID can be find using v$database, rman respository etc.
I am wondering if oracle keeps the DBID in plain text anywhere on filesystem or registry. -
Where can I find DBID?----------No.174
I am connected to RMAN without a recovery catalog. there is no copy of the control file available. I want to restore the control file from an autobackup. What soureces can I find DBID?
The controlfile autobackup file name generally has the dbid in the name.
c-<dbid>-<date>-xx -
Dear all,
I need to restore control files. During the process,
RMAN> run
2> {
3> restore controlfile from autobackup;
4> }
Starting restore at 04-DEC-12
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=541 devtype=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 12/04/2012 15:12:24
RMAN-06495: must explicitly specify DBID with SET DBID commandAm unable to find DBID since the DB is in nomount stage. all the links and docs are referring to find DBID in mount stage. Please adviseTry this
C:\ rman target sys/oracle@orcl3 catalog catalog/catalog@rman
RMAN-06193: connected to target database (not started)
RMAN-06008: connected to recovery catalog database
RMAN> startup nomount;
RMAN-06196: Oracle instance started
Total System Global Area 94980124 bytes
Fixed Size 75804 bytes
Variable Size 57585664 bytes
Database Buffers 37240832 bytes
Redo Buffers 77824 bytes
2) RMAN> list incarnation;
RMAN-03022: compiling command: list
List of Database Incarnations
DB Key Inc Key DB Name DB ID CUR Reset SCN Reset Time
1 2 ORCL3 691421794 YES 542853 12-DEC-12 -
Find DBID in compressed backup
Hi all,
Is there anyway to find dbid from a compressed backup ? autobackup is turned OFF.
Thanks in advanceHi SRP,
thank you for your prompt reply.
Actually im just doing some testing here.
I have backed up all my datafile, controlfile, spfile and archivelog and controlfile using compress method. autobackup is set to OFF. Then i have deleted all the physical files. including databafile, control, redo spfile.. all.... only have the binaries here. Currently using RMAN i am able to use a dummy i am able to nomount. Since the backupset is compressed i am unable to use any of the method to retrieve the DBID. -
Dear DBAs,
Kindly inform me how can I find DBID using RMAN in catalog and nocatalog mode.
Regards,
AsifIf you have catalog, you could use sqlplus to connect to catalog and query the RC_DATABASE table:
$ sqlplus rman/passwd@rmanacat
SQL> Select * From RC_DATABASE;
DB_KEY DBINC_KEY DBID NAME RESETLOGS_CHANGE# RESETLOGS
429198 429199 3495523758 DB1PRD 4743256238 12-SEP-07
4141 4142 1749408380 DB1TST 7931440 17-JUL-03
5274 5275 1097417818 OEMDB 2126690 20-AUG-03With no catalog just do:
$ rman target / nocatalog
Recovery Manager: Release 9.2.0.6.0 - 64bit Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database: DB1PRD (DBID=1795113435)
using target database controlfile instead of recovery catalog
RMAN> -
Hi friends,
I am new person. I saw lots of example abouy restore/revovery DB. How do I know a DBID ( for set DBID= ) during recovering DB or control file.
Thanks
JimYou can see Note 227060.1 How To Determine The DBID When Using RMAN and Note:580414.1 RMAN - How to restore the controlfile using RMAN to know where you can get dbid and under what circumstances it's needed.
Enrique
PS. There another not documented ways to get the dbid as stated here: http://arjudba.blogspot.com/2008/05/how-to-discover-find-dbid.html -
How to find DBID in idle instance?
sybrand_b wrote:
This is a contradictio in terminis. If the database is not running, there is no database available, so you will not be able to get the database id.
Remember an instance can host any database and is not coupled to any database. When the database is not at least mounted, v$database is not available.
Sybrand Bakker
Senior Oracle DBAHi,
Thanks a lot!
Can please help me know how does the instance get coupled with database. I guess it uses the dbname,db_unique_name parameters and then it verifies with the controlfile._ So, in mount stage we can say the database is coupled with instance . But in nomount there is no database oupled.Am I correct?
And iif I loose the database completely then can we restore the entire database(spfile,control+datafile) without knowing the DBID?
Thanks and regards,
Saikat
Edited by: Saikat Banerjee on Jul 31, 2012 7:20 AM -
How to find the dbid for the particular datafile
Hi,
I am aware of ----- select dbid from v$database and rman connection option for finding the dbid.
Any option for findout the dbid for a particular datafile and for controlfiles.? ( I heard the dbid stored in the datafile headers and controlfiles)
Please help
Thanks
ShijuYou need to be connected as SYS user to view these tables as below.
SQL> conn sys/oracle@orcl as sysdba
Connected.
SQL> desc dba_hist_datafile
Name Null? Type
DBID NOT NULL NUMBER
FILE# NOT NULL NUMBER
CREATION_CHANGE# NOT NULL NUMBER
FILENAME NOT NULL VARCHAR2(513)
TS# NOT NULL NUMBER
TSNAME NOT NULL VARCHAR2(30)
BLOCK_SIZE NUMBER
SQL> -
How to find the list of unused stored procedures in SQL Server 2005?
Hi,
I need to find out the list of stored procedures which are not in use.
I found there is something called "sys.dm_exec_procedure_stats " for SQL server 2008.
Can you please suggest your ides here to do the same job for SQL server 2005.
Many Thanks.In SQL 2005 there is, sort of. This is query lists the last execution
time for all SQL modules in a database:
SELECT object_name(m.object_id), MAX(qs.last_execution_time)
FROM sys.sql_modules m
LEFT JOIN (sys.dm_exec_query_stats qs
CROSS APPLY sys.dm_exec_sql_text (qs.sql_handle) st)
ON m.object_id = st.objectid
AND st.dbid = db_id()
GROUP BY object_name(m.object_id)
But there are tons of caveats. The starting point of this query is
the dynamic management view dm_exec_query_stats, and the contents is
per *query plan*. If a stored procedure contains several queries,
there are more than one entry for the procedure in dm_exec_query_stats.
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 include DBID in controlfile backup filename
Hi,
I've googled over this issue a lot...actually, for disaster recovery purposes, I want to have dbid somewhere "visible" (I know there are some workarounds to find the dbid of the db, also I log the RMAN execution and the dbid is there, but i prefer to have it ready at hand) so I found that F% parameter puts the dbid in filename. But RMAN throws error when I use this parameter and says F is an unknown one.
Any ideas?Hello;
Test :
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> SELECT DBID FROM V$DATABASE;
DBID
3806912436
SQL> Recovery Manager: Release 11.2.0.3.0 - Production on Mon Dec 31 10:05:49 2012
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: RECOVER2 (DBID=3806912436)
connected to recovery catalog database
RMAN> configure controlfile autobackup ON;
old RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete
RMAN> configure controlfile autobackup format for device type disk to 'B_%F';
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'B_%F';
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete
RMAN> Check
RECOVER2 >ls -al /u01/app/oracle/product/11.2.0.3/dbs/B_c-3806912436*
-rw-r----- 1 oracle oinstall 10223616 Dec 31 10:09 /u01/app/oracle/product/11.2.0.3/dbs/B_c-3806912436-20121231-00Adding %I seems to help the most, the problem with FORMAT is, it does not put the file where I like it. You can hard code it, but it's not exactly what I want.
'/disk1/control_files/autobackup_%F';
Best Regards
mseberg
Edited by: mseberg on Dec 31, 2012 11:13 AM
Edited by: mseberg on Dec 31, 2012 11:28 AM -
There is anyway to find the tables name where data is getting inserted currently.
Hi All,
I need T-Sql Query to find list of tables in which data is getting loaded currently.
Thanks Shiven:) If Answer is Helpful, Please VoteHi,
What About This Query:
SELECT B.TEXT,A.SESSION_ID,A.STATUS,A.COMMAND,A.CPU_TIME,A.TOTAL_ELAPSED_TIME,A.*,B.*
FROM SYS.DM_EXEC_REQUESTS A
CROSS APPLY SYS.DM_EXEC_SQL_TEXT (SQL_HANDLE) B
WHERE TEXT NOT LIKE '%SELECT B.TEXT,A.SESSION_ID,A.STATUS,A.COMMAND,A.CPU_TIME,A.TOTAL_ELAPSED_TIME,A.*,B.*%'
--AND TEXT LIKE '%'
ORDER BY START_TIME DESC
Thanks Shiven:) If Answer is Helpful, Please Vote
The query would return the currently executing query irrespective of insert. But, you are looking for the logging of table. Is my understanding wrong?
If you are looking for what is running on the server, then you can use the above script. The below is the one am using to get those info:
SELECT r.session_id ,
(Select Top 1 CON.client_net_address From sys.dm_exec_connections AS CON
where CON.session_id = r.session_id) Client_Address,
OBJECT_NAME(qt.objectid, qt.dbid),
r.[status] ,
r.wait_type ,
r.scheduler_id ,
SUBSTRING(qt.[text], r.statement_start_offset / 2,
( CASE WHEN r.statement_end_offset = -1
THEN LEN(CONVERT(NVARCHAR(MAX), qt.[text])) * 2
ELSE r.statement_end_offset
END - r.statement_start_offset ) / 2) AS [statement_executing] ,
DB_NAME(qt.[dbid]) AS [DatabaseName] ,
Object_NAME(qt.objectid) AS [ObjectName] ,
r.cpu_time ,
r.total_elapsed_time ,
r.reads ,
r.writes ,
r.logical_reads ,
r.plan_handle
FROM sys.dm_exec_requests AS r
CROSS APPLY sys.dm_exec_sql_text(sql_handle) AS qt
WHERE r.session_id > 50 and r.session_id <> @@SPID -
Finding table fragmentation in Oracle 8.1.6.3.0
Hi All,
I just want to find table fragmentation for one table named LOG. I used below query to find this....
SQL> select table_name,round((blocks*8),2)||'kb' "size"
from dba_tables
where table_name = 'LOG' and owner='AMRWF1'; 2 3
TABLE_NAME size
LOG 6301408kb
SQL> select table_name,round((num_rows*avg_row_len/1024),2)||'kb' "size"
from dba_tables
where table_name = 'LOG' and owner='AMRWF1'; 2 3
TABLE_NAME size
LOG 1468846.2kbAnd tablespace infromation is below.
SQL> select bytes/1024/1024,TABLESPACE_NAME,EXTENTS,MAX_EXTENTS from dba_segments where owner='AMRWF1' and segment_name='LOG';
BYTES/1024/1024 TABLESPACE_NAME EXTENTS MAX_EXTENTS
6154.16406 WFMKTLEAST 12214 2147483645
SQL> sho parameter block
NAME TYPE VALUE
db_block_buffers integer 100000
db_block_checking boolean FALSE
db_block_checksum boolean FALSE
db_block_lru_latches integer 3
db_block_max_dirty_target integer 100000
db_block_size integer 8192
db_file_multiblock_read_count integer 8
hash_multiblock_io_count integer 0
sort_multiblock_read_count integer 2Please mention whether i am fallowing proper method to find table fragmentation and this table is severly fragmented or not???
-Yasser
Edited by: YasserRACDBA on May 12, 2009 7:17 PMSir Please refer below statspack report
STATSPACK report for
Snap Length
Start Id End Id Start Time End Time (Minutes)
201 213 13-May-09 01:32:02 13-May-09 01:51:30 19.47
Cache Sizes
~~~~~~~~~~~
db_block_buffers: 100000
db_block_size: 8192
log_buffer: 2097152
shared_pool_size: 132003840
Load Profile
~~~~~~~~~~~~
Per Second Per Transaction
Redo size: 186,962.61 2,244.02
Logical reads: 18,690.20 224.33
Block changes: 835.84 10.03
Physical reads: 1,422.98 17.08
Physical writes: 59.20 0.71
User calls: 693.17 8.32
Parses: 219.19 2.63
Hard parses: 95.50 1.15
Sorts: 122.47 1.47
Transactions: 83.32
Rows per Sort: 13.87
Pct Blocks changed / Read: 4.47
Recursive Call Pct: 57.35
Rollback / transaction Pct: 0.01
Instance Efficiency Percentages (Target 100%)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Buffer Nowait Ratio: 99.82
Buffer Hit Ratio: 92.39
Library Hit Ratio: 85.79
Redo NoWait Ratio: 99.99
In-memory Sort Ratio: 100.00
Soft Parse Ratio: 56.43
Latch Hit Ratio: 99.55
Top 5 Wait Events
~~~~~~~~~~~~~~~~~ Wait % Total
Event Waits Time (cs) Wt Time
log file sync 98,328 308,489 52.94
db file sequential read 1,462,138 135,491 23.25
buffer busy waits 40,122 41,574 7.13
log file parallel write 67,541 29,561 5.07
latch free 14,153 29,250 5.02
^LWait Events for DB: PRDTDB Instance: prdtdb Snaps: 201 - 213
->cs - centisecond - 100th of a second
->ms - millisecond - 1000th of a second (unit often used for disk IO timings)
Avg
Total Wait wait Waits
Event Waits Timeouts Time (cs) (ms) /txn
log file sync 98,328 4 308,489 31 1.0
db file sequential read 1,462,138 0 135,491 1 15.0
buffer busy waits 40,122 1 41,574 10 0.4
log file parallel write 67,541 8 29,561 4 0.7
latch free 14,153 10,702 29,250 21 0.1
db file parallel write 5,099 0 18,117 36 0.1
db file scattered read 18,561 0 9,258 5 0.2
db file parallel read 3,227 0 5,658 18 0.0
SQL*Net more data to client 44,457 0 1,188 0 0.5
log file sequential read 8,020 0 1,070 1 0.1
direct path write 410 0 669 16 0.0
direct path read 688 0 556 8 0.0
control file parallel write 444 0 533 12 0.0
library cache pin 517 0 461 9 0.0
LGWR wait for redo copy 798 143 414 5 0.0
log file switch completion 30 0 349 116 0.0
single-task message 4 0 27 68 0.0
file open 959 0 23 0 0.0
log file single write 20 0 7 4 0.0
control file sequential read 458 0 4 0 0.0
refresh controlfile command 36 0 3 1 0.0
enqueue 9 0 2 2 0.0
file identify 40 0 1 0 0.0
SQL*Net break/reset to clien 4 0 0 0 0.0
buffer deadlock 2 2 0 0 0.0
SQL*Net message from client 809,303 0 19,936,895 246 8.3
virtual circuit status 38 38 116,785 ##### 0.0
SQL*Net message to client 809,327 0 310 0 8.3
SQL*Net more data from clien 477 0 43 1 0.0
^LSQL ordered by Gets for DB: PRDTDB Instance: prdtdb Snaps: 201 - 213
Gets % of
Buffer Gets Executes per Exec Total Hash Value
SQL statement
262,083 159,120 1.6 1.2 382965845
SELECT GEOPAR,NAME FROM GEO WHERE GEOCOD = RTRIM(:b1)
146,040 1 146,040.0 .7 1754824507
SELECT ERROR,TIME_STAMP,O_RESOURCE,QUEUE,NEW_QUEUE FROM LOG WHERE ID = '09120A
141,075 1 141,075.0 .6 1542925332
SELECT ERROR,TIME_STAMP,O_RESOURCE,QUEUE,NEW_QUEUE FROM LOG WHERE ID = '09120A
128,943 12,612 10.2 .6 4085293067
UPDATE OBJECT SET OWNER = NULL, LOCKTIME = 0, QUEUE_TIMESTAMP = NULL WHERE "ID
91,085 1 91,085.0 .4 323282248
SELECT ERROR,TIME_STAMP,O_RESOURCE,QUEUE,NEW_QUEUE FROM LOG WHERE ID = '09126A
90,887 1 90,887.0 .4 2613220927
SELECT ERROR,TIME_STAMP,O_RESOURCE,QUEUE,NEW_QUEUE FROM LOG WHERE ID = '09126A
66,045 9,174 7.2 .3 3352553713
SELECT DOC_NUM,TITLE,AUTHOR,C.TYPE,DATE_RPT,S.COLLECTION,S.AUTOMATION,LANG,SOU
61,337 9,498 6.5 .3 2345958421
SELECT PAGENO PAGENO FROM NONBILL WHERE REPORTID = :b1
59,669 9,500 6.3 .3 4181220996
SELECT RTRIM(SUBCOLLECT) SUBCOLLECT_CODE FROM MARK_SUBCOLLECT WHERE SRCCOD
54,543 1 54,543.0 .2 2236963897
SELECT ERROR,TIME_STAMP,O_RESOURCE,QUEUE,NEW_QUEUE FROM LOG WHERE ID = '09128A
54,517 1 54,517.0 .2 2215353317
SELECT ERROR,TIME_STAMP,O_RESOURCE,QUEUE,NEW_QUEUE FROM LOG WHERE ID = '09128A
54,493 1 54,493.0 .2 1430216754
SELECT ERROR,TIME_STAMP,O_RESOURCE,QUEUE,NEW_QUEUE FROM LOG WHERE ID = '09128A
54,450 1 54,450.0 .2 3671439846
SELECT ERROR,TIME_STAMP,O_RESOURCE,QUEUE,NEW_QUEUE FROM LOG WHERE ID = '09128A
54,443 1 54,443.0 .2 4024618165
SELECT ERROR,TIME_STAMP,O_RESOURCE,QUEUE,NEW_QUEUE FROM LOG WHERE ID = '09128A
54,404 1 54,404.0 .2 4144413353
SELECT ERROR,TIME_STAMP,O_RESOURCE,QUEUE,NEW_QUEUE FROM LOG WHERE ID = '09128A
54,185 1 54,185.0 .2 3853441439
SELECT ERROR,TIME_STAMP,O_RESOURCE,QUEUE,NEW_QUEUE FROM LOG WHERE ID = '09128A
54,122 1 54,122.0 .2 4066390851
SELECT ERROR,TIME_STAMP,O_RESOURCE,QUEUE,NEW_QUEUE FROM LOG WHERE ID = '09128A
^LSQL ordered by Reads for DB: PRDTDB Instance: prdtdb Snaps: 201 - 213
Physical Reads % of
Reads Executes per Exec Total Hash Value
SQL statement
52,578 1 52,578.0 3.2 1754824507
SELECT ERROR,TIME_STAMP,O_RESOURCE,QUEUE,NEW_QUEUE FROM LOG WHERE ID = '09120A
31,998 1 31,998.0 1.9 2613220927
SELECT ERROR,TIME_STAMP,O_RESOURCE,QUEUE,NEW_QUEUE FROM LOG WHERE ID = '09126A
16,013 1 16,013.0 1.0 323282248
SELECT ERROR,TIME_STAMP,O_RESOURCE,QUEUE,NEW_QUEUE FROM LOG WHERE ID = '09126A
10,819 1 10,819.0 .7 1542925332
SELECT ERROR,TIME_STAMP,O_RESOURCE,QUEUE,NEW_QUEUE FROM LOG WHERE ID = '09120A
5,940 9,500 0.6 .4 1788460650
SELECT RTRIM(SUBJCT) TICKER,RTRIM(NAME) NAME,RTRIM(STATE) STATE,RTRIM(COUNTRY)
5,011 5 1,002.2 .3 1283665788
INSERT INTO STATS$SQL_SUMMARY ( SNAP_ID,DBID,INSTANCE_NUMBER,SQL_TEXT,SHARABLE
3,532 104 34.0 .2 2416764375
INSERT INTO DOC_SUBJCT ( DOC_NUM,TYPE,SUBJCT ) VALUES ( TO_NUMBER(:b1),:b2,:b
3,178 3 1,059.3 .2 2869630514
BEGIN statspack.snap(i_snap_level => 10, i_modify_parameter => 'true'); END;
1,576 9,174 0.2 .1 3352553713
SELECT DOC_NUM,TITLE,AUTHOR,C.TYPE,DATE_RPT,S.COLLECTION,S.AUTOMATION,LANG,SOU
816 1,753 0.5 .0 2074917603
INSERT INTO LOG (ID,TIME_STAMP,TYPE,ERROR,INSTANCE,RULE_NUM,RULE_TYPE,PRIORITY
754 324 2.3 .0 4111801531
begin packager.get_citation(:param1 , :out); end;
567 83 6.8 .0 924335069
INSERT INTO CORDOC ( DOC_NUM,PARENT_DOC,SOURCE,AUTHOR,TITLE,DATE_RPT,DATE_RCVD
441 9,500 0.0 .0 2184883084
SELECT TPCCOD,TPCNAM FROM TOPICS T,DOC_SUBJCT D WHERE D.DOC_NUM = :b1 AND
430 104 4.1 .0 2993182807
INSERT INTO DOC_SUBJCT_UPD_LOG ( DOC_NUM,TYPE,SUBJCT,TYPE_OF_CHANGE,CREATED_LO
406 9,498 0.0 .0 2345958421
SELECT PAGENO PAGENO FROM NONBILL WHERE REPORTID = :b1
304 414 0.7 .0 199702406
select i.obj#,i.ts#,i.file#,i.block#,i.intcols,i.type#,i.flags, i.property,i.p
300 7,733 0.0 .0 3207681720
SELECT NVL(IMAGES,0) IMAGES,NVL(NONBILLABLE,0) NONBILLABLE FROM IMAGED_DOCUM
^LSQL ordered by Rows for DB: PRDTDB Instance: prdtdb Snaps: 201 - 213
Rows Rows
Processed Executes per Exec Hash Value
SQL statement
87,357 159,120 0.5 382965845
SELECT GEOPAR,NAME FROM GEO WHERE GEOCOD = RTRIM(:b1)
32,818 9,498 3.5 2345958421
SELECT PAGENO PAGENO FROM NONBILL WHERE REPORTID = :b1
12,612 12,612 1.0 4085293067
UPDATE OBJECT SET OWNER = NULL, LOCKTIME = 0, QUEUE_TIMESTAMP = NULL WHERE "ID
9,544 9,544 1.0 1230017382
SELECT LOG_SEQUENCE.NEXTVAL FROM DUAL
9,498 9,498 1.0 2684256693
SELECT RTRIM(NAME) NAME FROM LANG WHERE LANG.CODE = :b1
9,174 9,174 1.0 3352553713
SELECT DOC_NUM,TITLE,AUTHOR,C.TYPE,DATE_RPT,S.COLLECTION,S.AUTOMATION,LANG,SOU
7,575 7,733 1.0 3207681720
SELECT NVL(IMAGES,0) IMAGES,NVL(NONBILLABLE,0) NONBILLABLE FROM IMAGED_DOCUM
7,526 9,500 0.8 1788460650
SELECT RTRIM(SUBJCT) TICKER,RTRIM(NAME) NAME,RTRIM(STATE) STATE,RTRIM(COUNTRY)
6,485 514 12.6 395844583
select name,intcol#,segcol#,type#,length,nvl(precision#,0),decode(type#,2,nvl(
3,308 9,499 0.3 3612837332
SELECT RTRIM(D.SUBJCT) INDCOD,RTRIM(INDNAM) INDNAM,NIC_COD_BEST FROM DOC_SUB
2,642 9,500 0.3 4181220996
SELECT RTRIM(SUBCOLLECT) SUBCOLLECT_CODE FROM MARK_SUBCOLLECT WHERE SRCCOD
1,753 1,753 1.0 2074917603
INSERT INTO LOG (ID,TIME_STAMP,TYPE,ERROR,INSTANCE,RULE_NUM,RULE_TYPE,PRIORITY
1,380 1,855 0.7 1867085649
INSERT INTO LOG (ID,TIME_STAMP,TYPE,ERROR,INSTANCE,RULE_NUM,RULE_TYPE,PRIORITY
1,347 359 3.8 1536916657
select con#,type#,condlength,intcols,robj#,rcon#,match#,refact,nvl(enabled,0),
870 104 8.4 2416764375
INSERT INTO DOC_SUBJCT ( DOC_NUM,TYPE,SUBJCT ) VALUES ( TO_NUMBER(:b1),:b2,:b
828 433 1.9 1943674664
SELECT CLASS, PRIVILEGE FROM PRIVILEGE WHERE GROUP_NAME = 'SYSADMIN'
723 433 1.7 2958422142
SELECT CLASS, PRIVILEGE FROM PRIVILEGE WHERE GROUP_NAME = 'DEFAULT'
^LLatch Activity for DB: PRDTDB Instance: prdtdb Snaps: 201 - 213
->"Pct Misses" should be very close to 0.0
Pct Avg Pct
Get Get Sleeps Nowait Nowait
Latch Name Requests Miss /Miss Requests Miss
Active checkpoint queue latch 82,223 0.0 0
Checkpoint queue latch 828,701 0.0 0.0 0
Token Manager 739 0.0 5,586 0.0
archive control 10 0.0 0
archive process latch 10 0.0 0
cache buffer handles 8,728 0.0 0
cache buffers chains 45,374,520 0.0 0.1 1,915,719 0.2
cache buffers lru chain 293,252 0.5 0.1 1,667,702 0.6
channel handle pool latch 293 0.0 294 0.0
channel operations parent latch 586 0.0 294 0.0
dml lock allocation 197,311 0.0 0.0 0
enqueue hash chains 438,592 0.1 0.1 0
enqueues 697,793 0.1 0.0 0
event group latch 293 0.0 0
job_queue_processes parameter l 65 0.0 0
ktm global data 4 0.0 0
latch wait list 6,541 2.5 0.0 6,559 0.2
library cache 6,095,682 0.9 0.2 186,918 0.8
library cache load lock 4,494 0.0 0
list of block allocation 201,252 0.0 0.1 0
loader state object freelist 46 0.0 0
longop free list 1,508 0.0 0
messages 925,509 0.2 0.0 0
multiblock read objects 45,236 0.0 4.6 3 0.0
ncodef allocation latch 65 0.0 0
process allocation 293 0.0 293 0.0
process group creation 587 0.0 0
redo allocation 624,066 0.1 0.0 0
redo writing 511,337 0.8 0.0 0
row cache objects 9,553,633 1.0 0.0 13,023 3.7
sequence cache 31,263 0.0 0.0 0
session allocation 454,171 0.3 0.0 0
session idle bit 1,841,211 0.0 0.1 0
session switching 65 0.0 0
session timer 416 0.0 0
shared pool 4,602,509 3.3 0.0 0
sort extent pool 78 0.0 0
transaction allocation 295,180 0.0 0.0 0
transaction branch allocation 65 0.0 0
undo global data 346,591 0.1 0.2 0
user lock 2,114 0.0 0
virtual circuit queues 56 0.0 0
^LLatch Sleep breakdown for DB: PRDTDB Instance: prdtdb Snaps: 201 - 21
Get Spin &
Latch Name Requests Misses Sleeps Sleeps 1-4
shared pool 4,602,509 152,786 3,804 150445/1393/
698/250/0
row cache objects 9,553,633 98,968 364 98730/210/3/
25/0
library cache 6,095,682 53,621 8,107 49775/1473/1
726/647/0
cache buffers chains 45,374,520 10,906 1,415 10308/336/71
/191/0
redo writing 511,337 3,927 39 3892/31/4/0/
0
messages 925,509 1,443 61 1382/61/0/0/
0
cache buffers lru chain 293,252 1,388 130 1260/127/0/1
/0
session allocation 454,171 1,334 15 1319/15/0/0/
0
enqueues 697,793 1,000 11 989/11/0/0/0
redo allocation 624,066 623 5 618/5/0/0/0
session idle bit 1,841,211 447 50 400/46/0/1/0
Checkpoint queue latch 828,701 378 8 374/3/0/1/0
undo global data 346,591 330 62 315/4/1/10/0
enqueue hash chains 438,592 273 32 259/7/2/5/0
transaction allocation 295,180 138 5 133/5/0/0/0
dml lock allocation 197,311 46 2 44/2/0/0/0
list of block allocation 201,252 40 4 36/4/0/0/0
multiblock read objects 45,236 7 32 2/1/1/3/0
^LLatch Miss Sources for DB: PRDTDB Instance: prdtdb Snaps: 201 - 213
No Wait
Latch Name Where Misses Sleeps
Checkpoint queue latch kcbswcu: Switch buffers 0 5
Checkpoint queue latch kcbk0rrd: update recovery 0 2
Checkpoint queue latch kcbbcthc: check thread que 0 1
cache buffers chains kcbrls: kslbegin 0 724
cache buffers chains kcbgtcr: kslbegin 0 533
cache buffers chains kcbgcur: kslbegin 0 62
cache buffers chains kcbchg: kslbegin: call CR 0 29
cache buffers chains kcbzgb: scan from tail. no 0 25
cache buffers chains kcbzib: multi-block read: 0 14
cache buffers chains kcbzib: finish free bufs 0 9
cache buffers chains kcbzwb 0 8
cache buffers chains kcbchg: kslbegin: bufs not 0 6
cache buffers chains kcbget: pin buffer 0 3
cache buffers chains kcbget: exchange rls 0 1
cache buffers lru chain kcbbiop: lru scan 0 105
cache buffers lru chain kcbzgb: multiple sets nowa 0 21
cache buffers lru chain kcbzgb: posted for free bu 0 3
cache buffers lru chain kcbbwlru 0 1
dml lock allocation ktaiam 0 2
enqueue hash chains ksqgtl3 0 16
enqueue hash chains ksqrcl 0 16
enqueues ksqgtl2 0 5
enqueues ksqies 0 4
enqueues ksqrcl 0 2
library cache kgllkdl: child: cleanup 0 895
library cache kglpnal: child: alloc spac 0 711
library cache kglic 0 344
library cache kglupc: child 0 261
library cache kglhdgn: child: 0 227
library cache kglpnal: child: before pro 0 116
library cache kglhdgc: child: 0 82
library cache kglobpn: child: 0 74
library cache kgldnp: child 0 57
library cache kglsca: parent 0 57
library cache kgllkdl: child: free pin 0 29
library cache kglati 0 27
library cache kglpnc: child 0 15
library cache kgldte: child 0 0 8
library cache kglget: child: KGLDSBYD 0 3
library cache kglobld: child: 0 2
library cache kglpin 0 2
library cache kgldti: not under latch 0 1
library cache kglpnp: child 0 1
list of block allocation ktlbbl 0 4
messages ksaamb: after wakeup 0 40
messages ksarcv: after wait 0 13
messages ksarcv 0 8
multiblock read objects kcbzib: MBRGET 0 32
redo allocation kcrfwr: redo allocation 0 4
redo allocation kcrfwi: before write 0 1
redo writing kcrfss 0 17
redo writing kcrfsr 0 16
redo writing kcrfwi: after write 0 5
redo writing kcrfwcr 0 1
row cache objects kqrpre: find obj 0 190
^LLatch Miss Sources for DB: PRDTDB Instance: prdtdb Snaps: 201 - 213
No Wait
Latch Name Where Misses Sleeps
row cache objects kqreqd: rel enqueue 0 93
row cache objects kqreqd 0 64
row cache objects kqrso 0 1
session allocation ksuxds: not user session 0 12
session allocation ksucri 0 2
session allocation ksuxds: KSUSFCLC not set 0 1
session idle bit ksuxds 0 22
session idle bit ksupuc: clear busy 0 17
session idle bit ksupuc: set busy 0 11
shared pool kghfrunp: parent clatch: w 0 5,059
shared pool kghfrunp: alloc: wait 0 1,296
shared pool kghfrunp: alloc: clatch no 0 1,152
shared pool kghalo 0 852
shared pool kghfnd: min scan 0 180
shared pool kghfrunp: clatch: wait 0 112
shared pool kghupr1 0 104
shared pool kghfnd: get next extent 0 72
shared pool kghfnd: req scan 0 55
shared pool kghfre 0 40
shared pool kghalp 0 31
shared pool kghfrunp: clatch: nowait 0 30
shared pool kghfen: not perm alloc cla 0 15
shared pool kghfrunp: no latch 0 2
shared pool kghfrunp: reget min scan 0 1
transaction allocation ktcdso 0 3
transaction allocation ktcxba 0 2
undo global data ktudba: KSLBEGIN 0 61
undo global data ktudnx: KSLBEGIN 0 1
End of ReportPlease find partial output of v$sql;
EXECUTIONS DISK_READS BUFFER_GETS ROWS_PROCESSED
11170 0 0 0
11726 6206 36460 11286
11727 3079 193977 11727
12007 278 69951 39346
12700 0 31165 43631
13371 564 26871 7113
15568 0 1045 0
16122 28 25925 8603
16583 292 10230 2016
16943 31 1092 209
17933 896 35957 17933
EXECUTIONS DISK_READS BUFFER_GETS ROWS_PROCESSED
17958 0 3675 0
22750 6968 132458 32748
22840 518 31455 43631
22840 1 37398 0
22976 109 46286 22966
23002 53 23280 22975
23002 16 23216 23002
23003 61 23362 23003
23005 764 78363 23003
25580 1303 81762 373057
27092 0 0 0
EXECUTIONS DISK_READS BUFFER_GETS ROWS_PROCESSED
29218 1069 88739 29218
32750 3 1020 355
35790 453 279237 27807
38630 488 116142 1331
42128 13 2679 180
45899 0 229499 45896
45984 87 230393 45984
50588 3 1931 145
51215 81 256945 51215
52212 9 2248 674
62501 2 2087 506
EXECUTIONS DISK_READS BUFFER_GETS ROWS_PROCESSED
75230 1393 950678 71295
95712 29410 1451214 87782
102950 5250 1694896 102950
165722 254 870666 165722
527966 790 2773361 527965
674310 190 5482921 674307
709403 1198 3727110 709403
1093841 2338 11416812 1093840Btree index type has been created.
Please guide me in finding CPU problem.
-Yasser -
Hi,
I'm trying to find plan changes in same sql statements (same hash_value).
Thinking about query on stats$sql_plan_usage table , but have no idea how to use analytics on that.
Tried some lag approach but no success.
Can You please point me in right direction ?
Basicaly I need report like:
snap_id, snap_time,plan_hash_value, hash_value
1|2009-01-01|12345678|34434343
8|2009-01-09|22222222|34434343
and so on.
Regards.
GrzegorzGot something like this:
select min(rn), min(snap_id), plan_hash_value, hash_value from (
select spu.snap_id,spu.plan_hash_value,spu.hash_value, text_subset,
row_number() over (partition by spu.plan_hash_value,spu.hash_value,spu.dbid, spu.instance_number order by spu.snap_id) rn
from perfstat.stats$sql_plan_usage spu
) group by plan_hash_value, hash_value ;
but I want rows with min 2 plan_hash_value changes , dont want with static plan_hash_value (only 1 record per hash_value).
So 2 or more changes should be reported.
Regards.
Grzegorz -
How to find the existing sql server backup plan/schedule is there a script for that?
Friends,
Is there a easy way to find out in SQLServer (for All DB's) what is the current backup plan/schedule ? is there a script for that?
Thanks,
Karthikeyan JothiTo check the database backup
Select
SERVERPROPERTY('ServerName'),
db.name,
CONVERT(VARCHAR(10), b.backup_start_date, 103) + + convert(VARCHAR(8), b.backup_start_date, 14) backup_start_date,
CONVERT(VARCHAR(10), b.backup_finish_date, 103) + + convert(VARCHAR(8), b.backup_finish_date, 14) backup_finish_date,
case
when (DATEDIFF(hour, b.backup_start_date, getdate())<24)then 'Success'
when (DATEDIFF(hour, b.backup_start_date, getdate())>=24)then 'Failed'
end Status,
DATEDIFF(hh, b.backup_finish_date, GETDATE())BackupAgeInHours,
(b.backup_size/1024/1024/1024 )BackupSize,
case b.[type]
WHEN 'D' THEN 'Full'
WHEN 'I' THEN 'Differential'
WHEN 'L' THEN 'Transaction Log'
END Type,
ISNULL(STR(ABS(DATEDIFF(day, GetDate(),(Backup_finish_date)))), 'NEVER')DaysSinceLastBackup
FROM sys.sysdatabases db
Left OUTER JOIN (SELECT * , ROW_NUMBER() OVER(PARTITION BY database_name ORDER BY backup_finish_date DESC) AS RNUM
FROM msdb.dbo.backupset) b ON b.database_name = db.name AND RNUM = 1
where dbid<>2
OR
SELECT
DISTINCT
a.Name AS DatabaseName ,
CONVERT(SYSNAME, DATABASEPROPERTYEX(a.name, 'Recovery')) RecoveryModel ,
COALESCE(( SELECT CONVERT(VARCHAR(12), MAX(backup_finish_date), 101)
FROM msdb.dbo.backupset
WHERE database_name = a.name
AND type = 'd'
AND is_copy_only = '0'
), 'No Full') AS 'Full' ,
COALESCE(( SELECT CONVERT(VARCHAR(12), MAX(backup_finish_date), 101)
FROM msdb.dbo.backupset
WHERE database_name = a.name
AND type = 'i'
AND is_copy_only = '0'
), 'No Diff') AS 'Diff' ,
COALESCE(( SELECT CONVERT(VARCHAR(20), MAX(backup_finish_date), 120)
FROM msdb.dbo.backupset
WHERE database_name = a.name
AND type = 'l'
), 'No Log') AS 'LastLog' ,
COALESCE(( SELECT CONVERT(VARCHAR(20), backup_finish_date, 120)
FROM ( SELECT ROW_NUMBER() OVER ( ORDER BY backup_finish_date DESC ) AS 'rownum' ,
backup_finish_date
FROM msdb.dbo.backupset
WHERE database_name = a.name
AND type = 'l'
) withrownum
WHERE rownum = 2
), 'No Log') AS 'LastLog2'
FROM sys.databases a
LEFT OUTER JOIN msdb.dbo.backupset b ON b.database_name = a.name
WHERE a.name <> 'tempdb'
AND a.state_desc = 'online'
GROUP BY a.Name ,
a.compatibility_level
ORDER BY a.name
To check the schedule you can try the below script
https://gallery.technet.microsoft.com/SQL-Jobs-Complete-eabe0050
--Prashanth
Maybe you are looking for
-
External Hard Drive changed permissions to 'read only'
I have been searching everywhere for a solution to this with no luck, so I figured I would start my own post and see what comes of it. Computer: iMac Intel 24" /3.0ghz/4gb ram/1TB WD hard drive External Drive giving me issues: Western Digital 1.5TB (
-
Hi- I am having an issue with FB60 when I have multiple taxable lines and the correct tax amount is outside of the tolerance. It will only assess the first line of the invoice and when you try to correct it the amount entered is allocated across all
-
Issue with 2LIS_11_VAITM
Hi, we are extracting sales related information from ECC through 2LIS_11_VAHDR & 2LIS_11_VAITM to the BW Evironment. but last few delta runs we are missing new/chanaged records from the VBAK/VBAP. I am not able to understand why we are missing these
-
How to animate line drawing in Keynote
I want to draw a line and have it take say 3 seconds to go from one end to the other.
-
Changing font size within a cell.
There doesn't seem to be any way to change the font size within a single cell. Hitting the i button doesn't bring up any options to make this change. Is this correct? Message was edited by: jng65