BookmarkSubscribeRSS Feed
Amitkmr1979
Fluorite | Level 6

Dear Friends,

 

I am trying to find which user accessed which dataset in past or create a trace for coming days where I can have a script which gathers this information. 

 

I cam across a topic where it says to add the logger and appender xml. 

 

I added the 'logger' and 'appender' to capture it in a SAS Dataset and restarted the dev server.

 

And ran the below SAS code in DEV Server, but the log dataset I created is empty. 

 

Also, when I try to test logical stored process server connection it fails with below message:

 

Amitkmr1979_0-1678096572009.png

 

 

   <!-- Caution: Do NOT edit or change this appender configuration    (DB Appender changes delete this and logger if issues)    -->
   <appender name="dblog" class="DBAppender">
    <param name="ConnectionString" value="DRIVER=base;CATALOG=base;
       schema=(name=mywork;primarypath='C:\temp');" /> 
    <param name="MaxBufferedEvents" value="300" /> 
    <param name="TableName" value="LOG" /> 
    <!-- The column parameters must be specified in exactly the same order that the columns occur in the table. -->
     <param name="column" value="sn" /> 
     <param name="column" value="d" /> 
     <param name="column" value="c" /> 
	 <param name="column" value="u" /> 
     <param name="column" value="m" /> 
   </appender>

Logger
   <logger name="Audit.Data.DB" additivity="false">
     <appender-ref ref="dblog"/>
	 <level value="Info"/>
   </logger>

 

4 REPLIES 4
JosvanderVelden
SAS Super FREQ
Before using DBAppender, you must first create the table to which the log events are to be written. The Column parameters must be specified in exactly the same order that the corresponding columns occur in the table. Details in the documentation: https://documentation.sas.com/doc/en/pgmsascdc/v_036/logug/p0w1cv36n6ududn1gnzzkh6h8fr7.htm
Amitkmr1979
Fluorite | Level 6
I did in the same sequence for column parameters, when I spoke to SAS Support they advised stored process is bunch of concurrent processes and assigning a single dataset for all sessions won't help. Awaiting resolution.
Amitkmr1979
Fluorite | Level 6
DDL is as below
libname test "C:\temp";

libname x 'c:\temp';
data x.LOG;
length seqno $10;
length date $24;
length logger $100;
length user $30;
length msg $500;
run;


Amitkmr1979
Fluorite | Level 6
Kindly ignore test libref allocation.

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

Get Started with SAS Information Catalog in SAS Viya

SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 861 views
  • 0 likes
  • 2 in conversation