I am using a batch file my.bat as given below:
@echo off
setlocal enabledelayedexpansion
for /F "tokens=*" %%A in (user.txt) do (
sqlplus -s -l %%A @fetch.sql
) >> output.txt
where user.txt (list of all user details for which I need expiry date. this list may have around 40-50 rows) is:
dbuser/password@database1
readuser/p@ssw0rd@database1
adminuser/Pa$$word@database2
.......
.......
.......
and fetch.sql is:
set pagesize 200
set linesize 200
select username, expiry_date from user_users;
exit;
The problem I am facing is, script my.bat captures here all the required details in output.txt along with SQL ERRORS (ORA-01017: invalid username/password; logon denied ,ORA-12154: TNS:could not resolve the connect identifier specified, ORA-28000: the account is locked ) but its getting hanged at the point whenever it encounteres below error message :
ERROR:
ORA-28001: the password has expired
Changing password for readuser
Please can you let me know how I can ignore this ERROR message too and keep my script running further ?