Display string from a log file on a Dashboard?
Hello everyone,
I need a little guidance on how to solve this problem in SCOM 2012 R2.
I need SCOM to do this:
Read a log file on a specific application server (say its hostname is server21)
Look for the text: Total number of users: 15
Display the text “Users on Server21 =
15” on a SCOM dashboard (or something to that effect)
Sounds simple enough? Well, I am stumped :-(
I have read and followed tutorials on internet, telling me how to create a rule and alerts. However I don’t want alerts. I want this data to be simply shown on a dashboard.
How can I do that?
PS: I hear that I may have to create my own management pack with only server21 in it. Is that right?
-Rajeev rajdude.com
Thanks for the tip. The powershell grid widget is pretty powerful. However it will take me quite some time and effort to write a PS script which can extract the exact info I need from that application's log file. I was hoping SCOM's own log parsing
capabilities would do it.
By the way, yes, we can create a MP and have only one server in it. We can use the (free)
MPAuthor to make a MP with only one server in it. Here is a video showing how to do it...
http://www.silect.com/static/mpauthor/MP_Author_Creating_a_New_Single_Server_Application_MP.mp4
I tried doing what I want using MPAuthor, but it again boiled down to me writing a PS script which can extract the exact info I need
from that application's log file.
-Rajeev rajdude.com
Similar Messages
-
Using JTables to display data from a text file
How do I display data from a .txt file into a column inside a JTable?
dont quite get the "vectors" part..
by the way, my program is as follows
* Damn Java ..
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import java.awt.Dimension;
import java.awt.GridLayout;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
public class ScoreBoard extends JPanel {
private boolean DEBUG = false;
public ScoreBoard() {
super(new GridLayout(1,0));
String[] columnNames = {"Player's Name",
"Time Completed",
"$ Amount Earned $"};
/* Object[][] data = {
{"1",
new Integer(5), new Integer(500)},
{"2",
new Integer(5), new Integer(3200)},
{"3",
new Integer(5), new Integer(1000)},
{"4",
new Integer(5), new Integer(100)},
{"5",
new Integer(5), new Integer(200)},
final JTable table = new JTable(data, columnNames);
table.setPreferredScrollableViewportSize(new Dimension(600, 90));
if (DEBUG) {
table.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent e) {
printDebugData(table);
//Create the scroll pane and add the table to it.
JScrollPane scrollPane = new JScrollPane(table);
//Add the scroll pane to this panel.
add(scrollPane);
private void printDebugData(JTable table) {
int numRows = table.getRowCount();
int numCols = table.getColumnCount();
javax.swing.table.TableModel model = table.getModel();
System.out.println("Value of data: ");
for (int i=0; i < numRows; i++) {
System.out.print(" row " + i + ":");
for (int j=0; j < numCols; j++) {
System.out.print(" " + model.getValueAt(i, j));
System.out.println();
System.out.println("--------------------------");
* Create the GUI and show it. For thread safety,
* this method should be invoked from the
* event-dispatching thread.
private static void createAndShowGUI() {
//Make sure we have nice window decorations.
JFrame.setDefaultLookAndFeelDecorated(true);
//Create and set up the window.
JFrame frame = new JFrame("ScoreBoard");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//Create and set up the content pane.
ScoreBoard newContentPane = new ScoreBoard();
newContentPane.setOpaque(true); //content panes must be opaque
frame.setContentPane(newContentPane);
//Display the window.
frame.pack();
frame.setVisible(true);
public static void main(String[] args) {
//Schedule a job for the event-dispatching thread:
//creating and showing this application's GUI.
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
createAndShowGUI();
and i want to display the player name from a textfile.txt to the player column instead of hardcoding it like above. Thanks! -
Fast way to compare strings in a log file
I am having a log file ( contains more than 100,000 lines) based on system statistics for a time period. For each time point I am logging 12 sets of data each set starts with a tag /**START**/ and ends with a tag /**END**/. I would like to know the best and fast way to read from the log file and prepare records for each set for a specific time period.
Currently I am reading from the file using BufferedReader.readLine() method and compare the tags and distribute the data sets accordingly....
any suggestions...?Yes You are right.... I am doing the string parsing after reading each line... May be that is taking much time.. since we are providing an option to customize chart list, I have to process all the lines and distribute the data accordingly before preparing the charts. Some data set (between START & END) contains upto 256 lines and some single line... Here is a sample format....
@@LOG@@[email protected]_040507143739@@
**/START1/**
[3, 15, 1, 20, 0]
[6, 2181452, 292, 7477, 7475]
[11, 14, 2, 8, 0]
[13, 14, 1, 12, 0]
[14, 10568857, 320, 33068, 30223]
[20, 0, 0, 3, 0]
[54, 2, 2, 1, 0]
[130, 17, 0, 3275, 0]
[132, 3457, 0, 7303, 0]
[133, 0, 0, 1, 0]
[134, 400, 400, 1, 1]
[139, 5, 5, 1, 0]
[153, 0, 0, 2, 0]
[174, 7, 1, 12, 0]
[175, 0, 0, 7, 0]
[176, 5, 0, 3280, 3274]
[177, 0, 0, 78, 0]
[184, 1047, 2, 558, 6]
[187, 1062, 0, 3177, 0]
[188, 111, 0, 581, 0]
[189, 1, 0, 12, 0]
[190, 0, 0, 888, 438]
[212, 0, 0, 52, 0]
[213, 0, 0, 24, 0]
[242, 0, 0, 1, 0]
[243, 2072050, 25269, 82, 71]
[295, 2171328, 2918, 744, 744]
[296, 2165224, 5820, 372, 372]
[338, 4, 0, 15034, 0]
[340, 1, 0, 140, 0]
[342, 993643, 66, 14979, 0]
[343, 0, 0, 27, 0]
[346, 26, 0, 218, 0]
[351, 2097798, 2984, 703, 703]
end
**/START2/**
end
**/START3/**
[0.0,0.0,0.0]
end
**/START4/**
end
**/START5/**
0=0,99
1=0,11
2=0,33280
3=0,60
4=0,328
6=0,14913
7=0,383150
8=0,4505
9=0,848635
11=0,12152
12=0,12167
13=0,60698377887
14=0,60698377887
15=0,3429960
16=0,34000240
17=0,3289
18=0,3290
19=0,26217
20=0,12276884
21=0,14439988
25=0,123226
26=0,19
27=0,123209
40=0,169917
41=0,678718
42=0,9063
43=0,235714
44=0,33269
45=0,89
46=0,1525
47=0,1384
48=0,280
49=0,1295
50=0,122
51=0,966
53=0,3
54=0,521
55=0,3
56=0,640
57=0,640
58=0,1
71=0,841
72=0,646
73=0,1066
75=0,28283
76=0,28
78=0,2226
79=0,28
86=0,54801
87=0,54801
90=0,962
92=0,17308
95=0,5177
97=0,52
98=0,24
102=0,247531
103=0,72296
105=0,325
107=0,51452
110=0,237986
114=0,120630
115=0,27158624
117=0,878432
119=0,3280
120=0,56544
121=0,340
163=0,33269
164=0,293974
165=0,56
166=0,3766
167=0,4
171=0,8
173=0,2604
174=0,60
175=0,33094
176=0,83
177=0,27
178=0,100
183=0,30506
184=0,191
188=0,2804828
189=0,55236
190=0,476465
191=0,116
192=0,59771
193=0,81252
194=0,88210
195=0,10
196=0,2
203=0,152412
204=0,70002
207=0,378
222=0,706016
223=0,488746
224=0,4
227=0,29438
230=0,1177
231=0,1757
232=0,39397
233=0,1361
234=0,19
235=0,75451
236=0,1925701
237=0,1141694
238=0,14802
242=0,23470
244=0,619811
end
**/START6/**
teln
[Filesystem, 1024-blocks, Used, Available, Capacity, Mounted, on]
[dev/hda2, 18112140, 12153812, 5038276, 71%, /]
[dev/hda1, 102454, 17303, 79861, 18%, /boot]
[none, 256928, 0, 256928, 0%, /dev/shm]
[dev/hdb1, 19228276, 1426104, 16825424, 8%, /hdb1]
[dev/hdb2, 19235868, 6691572, 11567168, 37%, /hdb2]
[dev/hdc1, 12822880, 3236, 12168276, 1%, /hdc1]
[dev/hdc2, 12822912, 1204140, 10967404, 10%, /hdc2]
[dev/hdc3, 12823416, 190408, 11981616, 2%, /hdc3]
end
**/START7/**
[0.0,0.0,0.0,0.0]
end
**/START8/**
[11,9]
end
**/START9/**
[99.94,94.17]
end
**/START10/**
[99.14,040507143739]
end
**/START11/**
[1.0]
end
**/START12/**
procs memory swap io system cpu
r b w swpd free buff cache si so bi bo in cs us sy id
0 0 0 8 49112 24376 364320 0 0 19 28 540 48 1 0 99
0 0 0 8 49112 24376 364320 0 0 0 0 526 22 1 0 99
end
-- Next Time Point -
Connection string in listener log file for loading balance/failover
Hi Experts,
I have 4 node RAC for oracle 10g2 in rad hate 5.0
We creaed service dbsale ( sale1,2 as pr imary and sale3/4 as available) with loading balance/failover.
The remote user created a local TNS as
localmarket =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 155.206.xxx.xx)(PORT = 1521))
(LOAD_BALANCE = OFF)
(CONNECT_DATA = (SERVICE_NAME = dbsale))
From server side, I saw that user send two request connection string. one fail and another is OK.
It seems that fail connecting come from failover/loading balance from dbsale3?
Why do we get two connection string in listener log file?
Which difference is between two connection string?
Where does system change these connection string?
Thanks for your explaining.
Jim
==============listener.log message
[oracle@sale log]$ cat listener_sale.log|grep pmason
15-SEP-2009 13:52:24 * (CONNECT_DATA=(SERVICE_NAME=dbsale)(CID=(PROGRAM=oracle)(HOST=rock)(USER=test ))) * (ADDRESS=(PROTOCOL=tcp)(HOST=161.55.xxx.xx)(PORT=54326)) * establish * dbsale * 0
15-SEP-2009 13:52:25 * (CONNECT_DATA=(SERVICE_NAME=dbsale)(CID=(PROGRAM=oracle)(HOST=rock)(USER=test ))(SERVER=dedicated)(INSTANCE_NAME=sale3)) * (ADDRESS=(PROTOCOL=tcp)(HOST=161.55.xxx.xx)(PORT=54327)) * establish * dbsale * 12520
15-SEP-2009 13:52:30 * (CONNECT_DATA=(SERVICE_NAME=dbsale)(CID=(PROGRAM=oracle)(HOST=rock)(USER=test ))) * (ADDRESS=(PROTOCOL=tcp)(HOST=161.55.xxx.xx)(PORT=54329)) * establish * dbsale* 0
15-SEP-2009 13:52:47 * (CONNECT_DATA=(SERVICE_NAME=dbsale)(CID=(PROGRAM=oracle)(HOST=rock)(USER=test ))) * (ADDRESS=(PROTOCOL=tcp)(HOST=161.55.xxx.xx)(PORT=54332)) * establish * dbsale * 0
15-SEP-2009 13:52:47 * (CONNECT_DATA=(SERVICE_NAME=dbsale)(CID=(PROGRAM=oracle)(HOST=rock)(USER=test ))(SERVER=dedicated)(INSTANCE_NAME=sale3)) * (ADDRESS=(PROTOCOL=tcp)(HOST=161.55.xxx.xx)(PORT=54333)) * establish dbsale 12520
15-SEP-2009 13:52:49 * (CONNECT_DATA=(SERVICE_NAME=dbsale)(CID=(PROGRAM=oracle)(HOST=rock)(USER=test ))) * (ADDRESS=(PROTOCOL=tcp)(HOST=161.55.xxx.xx)(PORT=54334)) * establish * dbsale * 0
Edited by: user589812 on Sep 16, 2009 7:21 AMHi Jim,
I think the best way on this case is create one service with one instance as primary and another 3 as available.
Or use the connect string with two vip addresses, cause the service has two instances and the tnsnames.ora entry has only one.
Cheers,
Rodrigo Mufalani
http://mufalani.blogspot.com -
Help on Reading and Reporting From A log File
Hi there
I need any assistance on developing a class that is able to read from a log file and then be filtered and put into a report. I need to be able to search on the log files per criteria.Chainsaw:
http://logging.apache.org/log4j/docs/chainsaw.html -
Reading Each String From a text File
Hello everyone...,
I've a doubt in File...cos am not aware of File.....Could anyone
plz tell me how do i read each String from a text file and store those Strings in each File...For example if a file contains "Java Tchnology forums, File handling in Java"...
The output should be like this... Each file should contains each String....i.e..., Java-File1,Technology-File2...and so on....Plz anyone help meThe Java� Tutorials > Essential Classes: Basic I/O
-
Read data from a log file to flex textarea while deploying
Hi,
I am new to flex. I am able to read data from a log file that placed in C drive and able to write that data into flex textarea, but I am unable to read the same file while it is deployed into weblogic sever.
Could anyone please tell me how to solve this problem.
Thanks,
Sri.Do you have it trying to read that same file on your C drive or is the file actually deployed somewhere on the server?
-
Display / setup user defined log file in Oracle AS 10.1.3 ascontrol.
Hello,
One of my requirement is to display user defined log file into asconsole (OAS 101.3 EM) from $OH/j2ee/home/log/<myapplication>.log into OAS EM.
Please suggest.
Thanks,
KamAs a sanity test, can you do the following: cd /home/oracle/product/10.1.3/OracleAS_1/j2ee/home
cd applications/xmjfcx/xmjfcx/WEB-INF/lib
jar tvf commons-validator.jar
jar xvf commons-validator.jar META-INF/MANIFEST.MFI use two "cd" just to make it more readable. Then use you editor to check the file MANIFEST.MF. Anything problem? -
Recover from currnet log file corruption in archive mode
Hi,
I am using oracle 10.2.0 on windows xp. my database is in archivelog mode. I am learning recovery. I take backup of database using
RMAN> backup database;
Starting backup at 03-SEP-09
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00004 name=D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\USERS01.DBF
input datafile fno=00001 name=D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF
input datafile fno=00003 name=D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSAUX01.DBF
input datafile fno=00002 name=D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\UNDOTBS01.DBF
channel ORA_DISK_1: starting piece 1 at 03-SEP-09which completed.
my current logfile and current sequence no is
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
FIRST_CHANGE# FIRST_TIM
1 1 88 52428800 1 NO CURRENT
4475270 01-SEP-09
2 1 86 52428800 1 YES INACTIVE
4426127 31-AUG-09
3 1 87 52428800 1 YES INACTIVEThen i delete my only one redolog file in my current group. my instance crashes i want to recover now first i try
SQL> startup
ORACLE instance started.
Total System Global Area 289406976 bytes
Fixed Size 1248576 bytes
Variable Size 92275392 bytes
Database Buffers 188743680 bytes
Redo Buffers 7139328 bytes
Database mounted.
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1:
'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO01.LOG'
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 2) The system cannot find the file specified.
SQL> select open_mode from v$database;
OPEN_MODE
MOUNTED
SQL> recover database until cancel;
ORA-00279: change 4500421 generated at 09/03/2009 10:49:48 needed for thread 1
ORA-00289: suggestion : D:\1\ARC00088_0693601900.001
ORA-00280: change 4500421 for thread 1 is in sequence #88
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
cancel
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF'
ORA-01112: media recovery not startedit doesn't work then i do
RMAN> restore database
2> ;
Starting restore at 03-SEP-09
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF
restoring datafile 00002 to D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\UNDOTBS01.DBF
restoring datafile 00003 to D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSAUX01.DBF
restoring datafile 00004 to D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\USERS01.DBF
channel ORA_DISK_1: reading from backup piece D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2009_09_03
KP
channel ORA_DISK_1: restored backup piece 1
piece handle=D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2009_09_03\O1_MF_NNNDF_TAG20090903T104947_5
channel ORA_DISK_1: restore complete, elapsed time: 00:02:16
Finished restore at 03-SEP-09
RMAN>
RMAN> recover database until sequence 87;
Starting recover at 03-SEP-09
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 09/03/2009 11:06:06
RMAN-06556: datafile 1 must be restored from backup older than scn 4444743It means i need an older backup but i have new backup how to restore or get my database up.
Thanks
umeshThanks for reply
i have this in my hand
RMAN> list backupset;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
1 Full 1.38G DISK 00:02:21 03-SEP-09
BP Key: 1 Status: AVAILABLE Compressed: NO Tag: TAG20090903T104947
Piece Name: D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2009_09_03\O1_MF_NNNDF_TAG20090903T104947_59YNHNSK_.BKP
List of Datafiles in backup set 1
File LV Type Ckp SCN Ckp Time Name
1 Full 4500421 03-SEP-09 D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF
2 Full 4500421 03-SEP-09 D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\UNDOTBS01.DBF
3 Full 4500421 03-SEP-09 D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSAUX01.DBF
4 Full 4500421 03-SEP-09 D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\USERS01.DBF
BS Key Type LV Size Device Type Elapsed Time Completion Time
2 Full 6.80M DISK 00:00:03 03-SEP-09
BP Key: 2 Status: AVAILABLE Compressed: NO Tag: TAG20090903T104947
Piece Name: D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2009_09_03\O1_MF_NCSNF_TAG20090903T104947_59YNN8J9_.BKP
Control File Included: Ckp SCN: 4500486 Ckp time: 03-SEP-09
SPFILE Included: Modification time: 03-SEP-09
RMAN> restore database preview;
Starting restore at 03-SEP-09
using channel ORA_DISK_1
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
1 Full 1.38G DISK 00:02:21 03-SEP-09
BP Key: 1 Status: AVAILABLE Compressed: NO Tag: TAG20090903T104947
Piece Name: D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2009_09_03\O1_MF_NNNDF_TAG20090903T104947_59YNHNSK_.BKP
List of Datafiles in backup set 1
File LV Type Ckp SCN Ckp Time Name
1 Full 4500421 03-SEP-09 D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF
2 Full 4500421 03-SEP-09 D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\UNDOTBS01.DBF
3 Full 4500421 03-SEP-09 D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSAUX01.DBF
4 Full 4500421 03-SEP-09 D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\USERS01.DBF
archive logs generated after SCN 4500421 not found in repository
Media recovery start SCN is 4500421
Recovery must be done beyond SCN 4500421 to clear data files fuzziness
Finished restore at 03-SEP-09
RMAN> backup archivelog all ;
Starting backup at 03-SEP-09
using channel ORA_DISK_1
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=60 recid=3 stamp=694522772
input archive log thread=1 sequence=61 recid=4 stamp=694543115
input archive log thread=1 sequence=62 recid=5 stamp=694693173
input archive log thread=1 sequence=63 recid=6 stamp=694707783
input archive log thread=1 sequence=64 recid=7 stamp=694785054
input archive log thread=1 sequence=65 recid=8 stamp=694787797
input archive log thread=1 sequence=66 recid=9 stamp=694794198
input archive log thread=1 sequence=67 recid=10 stamp=694799765
input archive log thread=1 sequence=68 recid=11 stamp=694806827
input archive log thread=1 sequence=69 recid=12 stamp=694809124
input archive log thread=1 sequence=70 recid=13 stamp=694868744
input archive log thread=1 sequence=71 recid=14 stamp=695132728
input archive log thread=1 sequence=72 recid=15 stamp=695210729
input archive log thread=1 sequence=73 recid=16 stamp=695330401
input archive log thread=1 sequence=74 recid=17 stamp=695399695
input archive log thread=1 sequence=75 recid=18 stamp=695412690
input archive log thread=1 sequence=76 recid=19 stamp=695511043
input archive log thread=1 sequence=77 recid=20 stamp=695557945
input archive log thread=1 sequence=78 recid=21 stamp=695597432
input archive log thread=1 sequence=79 recid=22 stamp=695728451
input archive log thread=1 sequence=80 recid=23 stamp=695729334
input archive log thread=1 sequence=81 recid=24 stamp=695729976
input archive log thread=1 sequence=82 recid=25 stamp=695835471
input archive log thread=1 sequence=83 recid=26 stamp=695988878
input archive log thread=1 sequence=84 recid=27 stamp=696160938
input archive log thread=1 sequence=85 recid=28 stamp=696333853
input archive log thread=1 sequence=86 recid=29 stamp=696360658
input archive log thread=1 sequence=87 recid=30 stamp=696454218
channel ORA_DISK_1: starting piece 1 at 03-SEP-09
channel ORA_DISK_1: finished piece 1 at 03-SEP-09
piece handle=D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2009_09_03\O1_MF_ANNNN_TAG20090903T115246_59YR5VRV_.BKP tag=TAG20090903T1
=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:08
Finished backup at 03-SEP-09
RMAN> restore database preview;
Starting restore at 03-SEP-09
using channel ORA_DISK_1
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
1 Full 1.38G DISK 00:02:21 03-SEP-09
BP Key: 1 Status: AVAILABLE Compressed: NO Tag: TAG20090903T104947
Piece Name: D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2009_09_03\O1_MF_NNNDF_TAG20090903T104947_59YNHNSK_.BKP
List of Datafiles in backup set 1
File LV Type Ckp SCN Ckp Time Name
1 Full 4500421 03-SEP-09 D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF
2 Full 4500421 03-SEP-09 D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\UNDOTBS01.DBF
3 Full 4500421 03-SEP-09 D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSAUX01.DBF
4 Full 4500421 03-SEP-09 D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\USERS01.DBF
archive logs generated after SCN 4500421 not found in repository
Media recovery start SCN is 4500421
Recovery must be done beyond SCN 4500421 to clear data files fuzziness
Finished restore at 03-SEP-09now i have two backup one is full database backup which will not work another is backup of all archivelog upto sequence 87 i think it should work.
but rman is choosing full database backup for restore.
so i need to force rman to choose archivelog backups for restore but don't know how to do it. please suggest.
Thanks
umesh -
Job number from alert log file to information
Hello!
I have a question about job numbers in alert log file. Today one of our Oracle 10g R2 [10.2.0.4] RAC nodes crashed. After examining alert log file for one of the nodes I saw a lot of messages like:
Tue Jul 26 11:52:43 2011
Errors in file /u01/app/oracle/admin/zeme/bdump/zeme2_j002_28952.trc:
ORA-12012: error on auto execute of job *20627358*
ORA-12705: Cannot access NLS data files or invalid environment specified
Tue Jul 26 11:52:43 2011
Errors in file /u01/app/oracle/admin/zeme/bdump/zeme2_j001_11018.trc:
ORA-12012: error on auto execute of job *20627357*
ORA-12705: Cannot access NLS data files or invalid environment specified
Tue Jul 26 11:52:43 2011
Errors in file /u01/app/oracle/admin/zeme/bdump/zeme2_j000_9684.trc:
ORA-12012: error on auto execute of job *20627342*
ORA-12705: Cannot access NLS data files or invalid environment specified
After examining trc files I have found no further information about error except session ids.
My question is: how to find what job caused these messages to appear in alert log file.
How do I map number in alert log file to some "real" information (owner, statement executed, schedule)?
Marx.Sorry for the delay
Try this to find the job :
select job, what from dba_jobs ;
How do I find NLS_LANG version?SQL> show parameter NLS_LANG
Do you mean ALTER SESSION inside a job?I meant anywhere, but your question is better.
ORA-12705 - Common Reasons and How to Resolve Them [ID 158654.1]
If OS is Windows lookout for NLS_LANG=NA in the registry
Is it possible you are doing this somewhere ?
ALTER SESSION SET NLS_DATE_FORMAT = 'RRRR-MM-DD\"T\"HH24:MI:SS';NLS database settings are superseded by NLS instance settings
SELECT * from NLS_SESSION_PARAMETERS;
These are the settings used for the current SQL session.
NLS_LANG could be set in a profile for example.
NLS_LANG=_AMERICA.WE8ISO8859P1 ( correct )
NLS_LANG=AMERICA.WE8ISO8859P1 ( Incorrect )
you need to set the "_" as separator.
Windows
set NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1
Unix
export NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1
mseberg
Edited by: mseberg on Jul 28, 2011 3:51 PM
Edited by: mseberg on Jul 29, 2011 4:05 AM -
Problems deleting a string from an external file.
hi!
I am working on a program but am having problems deleting a string of information from an external file. The code I have managed to do only seems to be deleting the surname. The rest of the string remains and the Surname from the string bellow the one that should have been deleted moves to where the surname that was just deleated was.
this is the code snippet that should be deleting the string:
System.out.print("Please enter the last name of the contact: ");
last_name = dataInput.next();
int z = 0;
for (int i=0; i < number_of_records; i++)
if ((last_name.compareTo(lastName)) < i && (last_name.compareTo(lastName[i]) > i))
z = i;
for (int i = z; i < number_of_records; i++)
lastName[i] = lastName[i+1];
Anyone got any ideas why its not deleting the whole string?
the extrenal file is set out like:
surname,,first name,,phone numberI don't think you have given enough information to answer this question completely; however, here is my guess:
The code that appears to be doing the "deleting"
for (int i = z; i < number_of_records; i++)
lastName[i] = lastName[i+1];
}is only acting upon the lastName array. -
SELECT top two longest running steps from a log file
Simplified example.
Our jobs write records to our own internal log file. I want to write a query that will pull log records for a specific job, between specific dates. This will help determine if the job is running slower than usual and to find the steps within the job that
are the longest running.
Jobs are identified by the Type field. Type=1 is a specific job name.
Each job writes a DESC=START record to the log at the beginning of the job. the Desc=START record will be updated at the end of the job with the ENDDT.
I want to pull the top two longest running steps (ENDDT-BEGINDT) for each job (Type) where the step startdr and enddt falls between the START startDT and end dt.
I also want to always pull key step names, like DESC=START and DESC=xya for each job.
LOG RECORDS
DESC,TYPE,BEGINDT,ENDDT
START,1,2014-10-22 07:56:56.000,2014-10-22 09:56:56.000
aaa,1,2014-10-22 07:57:56.000,2014-10-22 08:57:56.000
bbb,1,2014-10-22 08:57:56.000,2014-10-22 09:01:56.000
ccc,1,2014-10-22 09:01:56.000,2014-10-22 09:56:56.000
xya,1,2014-10-22 09:55:56.000,2014-10-22 09:56:56.000
START,1,2014-10-21 11:56:56.000,2014-10-22 02:56:56.000
aaa,1,2014-10-21 11:57:56.000,2014-10-22 01:57:56.000
bbb,1,2014-10-22 01:57:56.000,2014-10-22 02:56:56.000
ccc,1,2014-10-22 02:56:56.000,2014-10-22 02:56:56.000
xya,1,2014-10-22 09:55:56.000,2014-10-22 09:56:56.000
Desired result set.
If pulling job type 1 records for last 2 days, would end up with this result set. START and xya are always pulled and then the top 2 longest running steps for each of the START records.
DESC,TYPE,BEGINDT,ENDDT,Duration
START,1,2014-10-22 07:56:56.000,2014-10-22 09:56:56.000
aaa,1,2014-10-22 07:57:56.000,2014-10-22 08:57:56.000
ccc,1,2014-10-22 09:01:56.000,2014-10-22 09:56:56.000
xya,1,2014-10-22 09:01:56.000,2014-10-22 09:56:56.000
START,1,2014-10-21 11:56:56.000,2014-10-22 02:56:56.000
aaa,1,2014-10-21 11:57:56.000,2014-10-22 01:57:56.000
bbb,1,2014-10-22 01:57:56.000,2014-10-22 02:56:56.000
xya,1,2014-10-22 09:55:56.000,2014-10-22 09:56:56.000
I am asking for help in how to create this query. ThanksHi TheBrenda,
According to your description, I have written a sample query and tested it in my local environment.
The following sample query is for your reference:
--create table log_records
CREATE TABLE log_records ([DESC] varchar(10),[TYPE] int,BEGINDT datetime,ENDDT datetime)
--insert values to table log_records
INSERT INTO log_records VALUES
('START',1,'2014-10-22 07:56:56.000','2014-10-22 09:56:56.000'),
('aaa',1,'2014-10-22 07:57:56.000','2014-10-22 08:57:56.000'),
('bbb',1,'2014-10-22 08:57:56.000','2014-10-22 09:01:56.000'),
('ccc',1,'2014-10-22 09:01:56.000','2014-10-22 09:56:56.000'),
('xya',1,'2014-10-22 09:55:56.000','2014-10-22 09:56:56.000'),
('START',1,'2014-10-21 11:56:56.000','2014-10-22 02:56:56.000'),
('aaa',1,'2014-10-21 11:57:56.000','2014-10-22 01:57:56.000'),
('bbb',1,'2014-10-22 01:57:56.000','2014-10-22 02:56:56.000'),
('ccc',1,'2014-10-22 02:56:56.000','2014-10-22 02:56:56.000'),
('xya',1,'2014-10-22 02:56:56.000','2014-10-22 02:56:56.000')
--run the following main query to get top two longest running steps
WITH A AS
(SELECT BEGINDT,ENDDT FROM log_records WHERE [DESC]='START'),
B AS
SELECT LR.[DESC], LR.TYPE, LR.BEGINDT BEGINDT1, LR.ENDDT ENDDT1, A.BEGINDT BEGINDT2, A.ENDDT ENDDT2,DATEDIFF(SECOND,LR.BEGINDT,LR.ENDDT) AS timediff,ROW_NUMBER() OVER(PARTITION BY A.BEGINDT ORDER BY DATEDIFF(SECOND,LR.BEGINDT,LR.ENDDT) DESC ) AS rn FROM log_records LR JOIN A
ON LR.BEGINDT >= A.BEGINDT AND LR.ENDDT<=A.ENDDT
SELECT [DESC],[TYPE],BEGINDT1 BEGINDT,ENDDT1 ENDDT FROM B WHERE rn<4 or [DESC]='xya' ORDER BY BEGINDT2,rn
The result of the main query is:
DESC TYPE
BEGINDT
ENDDT
START 1 2014-10-21 11:56:56.000 2014-10-22 02:56:56.000
aaa 1 2014-10-21 11:57:56.000 2014-10-22
01:57:56.000
bbb 1 2014-10-22 01:57:56.000 2014-10-22 02:56:56.000
xya 1 2014-10-22 02:56:56.000 2014-10-22
02:56:56.000
START 1 2014-10-22 07:56:56.000 2014-10-22 09:56:56.000
aaa 1 2014-10-22 07:57:56.000 2014-10-22
08:57:56.000
ccc 1 2014-10-22 09:01:56.000 2014-10-22
09:56:56.000
xya 1 2014-10-22 09:55:56.000 2014-10-22
09:56:56.000
If you have any question, please feel free to let me know.
Regards,
Jerry Li -
Apply exakt steps from History log file to another image?
Alright. If you edit an image and the history log option is turned on, you can look at the exakt steps you've made with all the settings for the individual tools and effects used. Also steps you make can be recorded with the actions tool.
My question is, are there any way to "play" the steps listed in the history log file, as if it were an action?
I need to apply alot of steps to several images but I never recorded the steps I've made with the actions tool. However they are "recorded" in the history log file and I could go in and look and recreate all those steps manually, but that would take too much time...
Are there any plug-ins or are there any other way to do what I need to get done?
Cheers
Martin1. you can set your preferences to record the history to a txt file or the files metadata.
I assumed that is what the OP already did as indicated in
If you edit an image and the history log option is turned on,
wonder why there are no feature in Photoshop to replay all one have done, to any image?
As you know there is, it’s Actions (as with Scripting not all functionality records; Edit: and not all functionality is applicable to all files because of Color Mode and Bit Depth for example). But it is up to you to employ the necessary foresight to know what to record beforehand.
Also a non-destructive workflow can help make many effects/compositions/etc. easily transfer-/recreateable. -
Best way to extract lines from a log file in Linux
My query is that I have a log file which is around 7 GB and I want to extract lines between a certain time range which should total up to half of the size to 3.5 GB. The lines start with a time range like “2014-03-11 17:35:00”. I want to extract the lines between “2014-03-11 17:35:00” to “2014-03-11 18:05:00”. What should be the best way as there may be a grep command or a sed command to do it.
I hope, my question is clear.
Please revert with the reply to my query.
RegardsHow about the following:
awk '/2014-03-11 17:35:00/, /2014-03-11 18:05:00/' infile > outfile -
How to recover from deleting log file?
Hi,
In a case on Mondayitis I accidentally deleted C:\ORACLEXE\APP\ORACLE\FLASH_RECOVERY_AREA\XE\ONLINELOG\O1_MF_1_35N72N5G_.LOG'
and now can't start my database. (see error below)
Tue Jun 12 12:40:29 2007
Errors in file c:\oraclexe\app\oracle\admin\xe\bdump\xe_lgwr_3544.trc:
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: 'C:\ORACLEXE\APP\ORACLE\FLASH_RECOVERY_AREA\XE\ONLINELOG\O1_MF_1_35N72N5G_.LOG'
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 2) The system cannot find the file specified.
Tue Jun 12 12:40:30 2007
ORA-313 signalled during: ALTER DATABASE OPEN...
Can someone guide me on how I can create a new log file and get my database up and running.
Thanks
AnthonyAfter a bit more research I fixed the problem.
But just in case anyone else does the same stupid thing - here is how I fixed it.
connect / as sysdba
RECOVER DATABASE UNTIL CANCEL;
ALTER DATABASE OPEN RESETLOGS;
And database is up and running.
Regards
Anthony
Maybe you are looking for
-
Interactive pdf with InDesign CS4
I'm trying to create a 20 page interactive pdf but having a horrible time with rollover buttons. The look of the document is like a manila folder with about 8 tabs, which represents the chapters, peeking out from under a designed cover. I'd like the
-
How do I get iTunes to open in recently-installed Windows 8? Thanks
-
ITunes 11 upgrade degraded AirPlay quality
After upgrading to iTunes 11 the streaming quality of AirPlay has diminished considerably. I previously experience drop outs, but nothing like I am experiencing now. Further, I'm noticing that the AirPlay audio stream is out of sync with the audio
-
I'm creating a CD with FLV video files. How do I set the current playing time of the video so I can jump to various places in the file? I've always assumed that streaming only dealt with network connections and not playing an attached FLV from a loca
-
Forcing a JWindow to pack/validate and resize
Hi, I'm using a JWindow with some JComponents in it and I'm trying to set the font of this window and all of its components. After setFont() (which works) I want the JWindow to resize because the label sizes etc. changed with the new font. I tried JW