Home » Developer & Programmer » Precompilers, OCI & OCCI » the C struct { } LogFile (Any)
the C struct { } LogFile [message #479193] Fri, 15 October 2010 02:03 Go to next message
thpx
Messages: 6
Registered: October 2010
Location: CostaRIca
Junior Member
Hi Experts, well I'am here looking for some directions, I was asked to find the C struct that Oracle uses to create a logFile, or at least the C struct of a reg in that file, I know it's hard because I've been searching a lot...whithout any answer...

Can Any tell me something helpful? please,
Can it be find? or something....
I've read a lot of material from many "know-at-all" who don't know anything..and I am sick of it...

So It's a good topic to talk about too...


Re: the C struct { } LogFile [message #479199 is a reply to message #479193] Fri, 15 October 2010 02:23 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Which log file are you talking about?
What is a "reg"? Post complete words (and complete sentences and complete questions).

Quote:
I've read a lot of material from many "know-at-all" who don't know anything..and I am sick of it...

Post links.

Regards
Michel
Re: the C struct { } LogFile [message #479306 is a reply to message #479199] Fri, 15 October 2010 17:16 Go to previous messageGo to next message
thpx
Messages: 6
Registered: October 2010
Location: CostaRIca
Junior Member
Hi:
Yeah, sorry about that, I was a little mad, please excuse me and thanks for answer. Well, I was talking about the redo log files, I need to know (if it's posible) what is the information the redo log files contain; as you know, programs like the lgwr.exe were writing in C language, so it should use a struct{} to collect the information and later write it in a redo log file. I'm looking for the C intructions that creates that struct in order to know the information and the format in a redo log file.

Thank you very much Michel, I hope you can help me.

P.D.:
English is not my first language, please excuse me if there is any spelling or logical mistake, I'll do my best.
ohh, "reg" means "register" or "record" in the log file, sorry.
Re: the C struct { } LogFile [message #479331 is a reply to message #479306] Sat, 16 October 2010 00:33 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
These are internal information that are not published.
If you want to know how they are you have to reverse engineer the stuff (good luck) as does Sybase for its "replication server".

Just for your information, there is not one structure but many ones (and more at each release).
Why do you want/need this?

Regards
Michel
Re: the C struct { } LogFile [message #479398 is a reply to message #479331] Sat, 16 October 2010 12:13 Go to previous messageGo to next message
thpx
Messages: 6
Registered: October 2010
Location: CostaRIca
Junior Member
:-\, I was starting to realize that and thinking about reverse engineer to the lgwr.exe. Well, honestly, I already knew that that information was not officialy published, but I thought that maybe someone have the info through some previous research.
Why a want this? Well, actually it is a task(a tricky one by the way) that an Oracle and DB guru in my country assigned to me. We were talking about audit, statistics and investigations in data bases, we talked about the how develop these controls have a high price in DB performance and disk space, so he told me that many of the info needed for these controls are included in the redo logfiles. There is a security factor implic in all this that drive us to ethic and moral discussions, but it is out of this topic.

What do you think about reveal this info? can it bring benefits or could be a trouble?
I heard that Postgress reveal that info as it is an open-source.

Thanks Michel, Regards
Wilson
Re: the C struct { } LogFile [message #479405 is a reply to message #479398] Sat, 16 October 2010 13:30 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
There is already a free tool to do this, included in Oracle delivery: LogMiner.

Regards
Michel

[Updated on: Sat, 16 October 2010 13:30]

Report message to a moderator

Re: the C struct { } LogFile [message #479423 is a reply to message #479405] Sat, 16 October 2010 17:04 Go to previous messageGo to next message
thpx
Messages: 6
Registered: October 2010
Location: CostaRIca
Junior Member
Thanks Michel, my teacher(who asked me the research) told me about it, it's useful and complete, but he always wants to know more, so he belives that the log files contains more info than the one found when using LogMiner, Well thanks again, this site will be one of my favorites.

God Bless you
Wilson
Re: the C struct { } LogFile [message #479437 is a reply to message #479423] Sun, 17 October 2010 01:04 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
that the log files contains more info than the one found when using LogMiner

This is quite right but these (structural) information are totally useless for us. The only interesting ones are those exposed in LogMiner views.
What do you want more than those ones (from the latest version):
SQL> desc v$LOGMNR_CONTENT
Name                
--------------------
SCN                      
START_SCN                
COMMIT_SCN               
TIMESTAMP                
START_TIMESTAMP          
COMMIT_TIMESTAMP         
XIDUSN                   
XIDSLT                   
XIDSQN                   
XID                      
PXIDUSN                  
PXIDSLT                  
PXIDSQN                  
PXID                     
TX_NAME                  
OPERATION                
OPERATION_CODE           
ROLLBACK                 
SEG_OWNER                
SEG_NAME                 
TABLE_NAME               
SEG_TYPE                 
SEG_TYPE_NAME            
TABLE_SPACE              
ROW_ID                   
USERNAME                 
OS_USERNAME              
MACHINE_NAME             
AUDIT_SESSIONID          
SESSION#                 
SERIAL#                  
SESSION_INFO             
THREAD#                  
SEQUENCE#                
RBASQN                   
RBABLK                   
RBABYTE                  
UBAFIL                   
UBABLK                   
UBAREC                   
UBASQN                   
ABS_FILE#                
REL_FILE#                
DATA_BLK#                
DATA_OBJ#                
DATA_OBJV#               
DATA_OBJD#               
SQL_REDO                 
SQL_UNDO                 
RS_ID                    
SSN                      
CSF                      
INFO                     
STATUS                   
REDO_VALUE               
UNDO_VALUE               
SAFE_RESUME_SCN          
CSCN                     
OBJECT_ID                
EDITION_NAME             
CLIENT_ID                

I failed to imagine something else.

Regards
Michel

[Updated on: Mon, 18 October 2010 01:38]

Report message to a moderator

Re: the C struct { } LogFile [message #479480 is a reply to message #479437] Sun, 17 October 2010 19:43 Go to previous messageGo to next message
thpx
Messages: 6
Registered: October 2010
Location: CostaRIca
Junior Member
yeah, you are right, it's hard to think in something else, and probably other info is useless for us, I'll ask him what else he wants.
Comes to my mind the idea of reading info from de logfile directly, using a program in C or anything else, for what? well, I don't know, maybe it sounds stupid, but things are stupid until someone finds something good to do with them.
I know it's dangerous open that posibility, the backup policy and many other serious things are based in handling redo log files, so nobody wants make a mess with the log files.
mmm, maybe we can create our own version of the write and read process the DB, rebuilding programas like de lgwr, but I don't know, it's just a crazy idea (it sounds like open-source.. right ?).
Re: the C struct { } LogFile [message #479481 is a reply to message #479480] Sun, 17 October 2010 19:45 Go to previous message
thpx
Messages: 6
Registered: October 2010
Location: CostaRIca
Junior Member
Sorry, I forgot to thank for your time, THANKS A LOT!!!
Wilson
Previous Topic: PRO*C compiler version versus database version
Next Topic: Convert compile 'o' files to C code
Goto Forum:
  


Current Time: Thu Mar 28 21:21:32 CDT 2024