Thursday, March 25, 2010

DB_USERS.bat

DB_USER.bat

@echo off

for /f "tokens=1,2,3,4 delims=/ " %%a in ('date /t') do set fdate=%%a_%%c_%%b_%%d

for /f "tokens=1,2,3,4,5,6 delims=: " %%i in ('time /t') do set HHMMSS=_%%i%%j%%k%%l%%m%%n

sqlplus "sys/****@dblive as sysdba" @D:\dblog_LIVE\audit_query_for_SYS_DB_usr.txt

zip.exe audit_log_users.zip audit_log_users.log
rename D:\dblog_LIVE\audit_log_users.zip audit_log_users_%fdate%_%HHMMSS%.zip
-------------------------------------------------------------------------

Check below post for Query returning the data from the database. http://rakeshocp.blogspot.com/2010/03/backupauditqueryforsysdbusers.html



No comments: