Home » RDBMS Server » Server Administration » sys to see alert log....
sys to see alert log.... [message #527568] Tue, 18 October 2011 22:17 Go to next message
hanner
Messages: 90
Registered: August 2011
Location: at HOME
Member
one can only see the alert log, trc ...with sys log in?

Re: sys to see alert log.... [message #527569 is a reply to message #527568] Tue, 18 October 2011 22:34 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>one can only see the alert log, trc ...with sys log in?
HUH?
It would be helpful if you followed Posting Guidelines - http://www.orafaq.com/forum/t/88153/0/
Re: sys to see alert log.... [message #527577 is a reply to message #527568] Wed, 19 October 2011 00:58 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
This is not understandable.
You know you are not limited in the number of words and sentences to post and explain your question.
So take profit of this privileges and expand your post.

Regards
Michel
Re: sys to see alert log.... [message #527638 is a reply to message #527568] Wed, 19 October 2011 08:27 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Alert log and trace files are created in OS.
The SYS account is inside the Oracle database.
If you are in 11g, there is a fixed table X$DBGALERTEXT owned by SYS that is mapped to the alert log file.

I hope this is what you were looking for Smile.
Re: sys to see alert log.... [message #527640 is a reply to message #527638] Wed, 19 October 2011 08:42 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You can map an external table onto the alert.log file.

Regards
Michel
Re: sys to see alert log.... [message #527747 is a reply to message #527638] Thu, 20 October 2011 01:30 Go to previous messageGo to next message
andy huang
Messages: 498
Registered: July 2011
Senior Member
Mahesh Rajendran wrote on Wed, 19 October 2011 08:27
Alert log and trace files are created in OS.
The SYS account is inside the Oracle database.
If you are in 11g, there is a fixed table X$DBGALERTEXT owned by SYS that is mapped to the alert log file.

I hope this is what you were looking for Smile.


hi,
You can get the last 100 rows in alert.log using the flowing sql:
Select Message_Text
  From (Select Rownum Rn, Count(1) Over() Total_Rn, a.* From X$dbgalertext a) Aa
 Where Rn + 100 >= Total_Rn
Re: sys to see alert log.... [message #527756 is a reply to message #527747] Thu, 20 October 2011 01:58 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Count(1) Over() 

More and more silly.

In addition, it does not work for me:
SQL> Select Message_Text
  2    From (Select Rownum Rn, Count(1) Over() Total_Rn, a.* From X$dbgalertext a) Aa
  3   Where Rn + 100 >= Total_Rn
  4  /
  From (Select Rownum Rn, Count(1) Over() Total_Rn, a.* From X$dbgalertext a) Aa
                                                             *
ERROR at line 2:
ORA-00942: table or view does not exist


Regards
Michel
Re: sys to see alert log.... [message #527784 is a reply to message #527756] Thu, 20 October 2011 03:14 Go to previous messageGo to next message
andy huang
Messages: 498
Registered: July 2011
Senior Member
hi,

SQL> select * from v$version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
PL/SQL Release 11.2.0.1.0 - Production
CORE    11.2.0.1.0      Production
TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production

Re: sys to see alert log.... [message #527785 is a reply to message #527756] Thu, 20 October 2011 03:16 Go to previous messageGo to next message
andy huang
Messages: 498
Registered: July 2011
Senior Member
Michel Cadot wrote on Thu, 20 October 2011 01:58
Count(1) Over() 

More and more silly.


hi,
How to improve it? i want to get the total rows in that table.
Re: sys to see alert log.... [message #527786 is a reply to message #527785] Thu, 20 October 2011 03:20 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
count(*) count(*) count(*) count(*) count(*) count(*) count(*) count(*) count(*)
How many will we have to repeat it?

Regards
Michel
Re: sys to see alert log.... [message #527787 is a reply to message #527786] Thu, 20 October 2011 03:22 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production

I know the restrictions and it has already been mentioned.
But do not claim "You can get the last 100 rows in alert.log using the flowing sql" when it is not true we and OP can get it.
It is NOT a question of how to get the last 100 rows of a table.
It is a question how to get lines of alert.log in SQL or PL/SQL.

Regards
Michel
Re: sys to see alert log.... [message #527793 is a reply to message #527786] Thu, 20 October 2011 03:59 Go to previous messageGo to next message
andy huang
Messages: 498
Registered: July 2011
Senior Member
Michel Cadot wrote on Thu, 20 October 2011 03:20
count(*) count(*) count(*) count(*) count(*) count(*) count(*) count(*) count(*)
How many will we have to repeat it?

Regards
Michel


hi,
Can you get a right way to get the last 100 rows of a table?
Re: sys to see alert log.... [message #527794 is a reply to message #527793] Thu, 20 October 2011 04:02 Go to previous message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
There is a way - you should only know the rule which sorts these rows. For example, it might be a sequence, a timestamp or something similar. If there's no way to distinguish the sort order, then "the last 100 rows" is meaningless.
Previous Topic: ORA-01101 while creating DB
Next Topic: err01033:oracle initialization or shutdown in progress
Goto Forum:
  


Current Time: Fri Apr 19 16:58:07 CDT 2024