How to resolve error "SQL0104N" when running "db2 prune logfile prior to" command?
-2
votes
1
answer
2310
views
I wrote an script to delete transaction log files in db2. I need to delete all the files prior to the active log file.I wrote this code as .sh file
db2 connect to DWHDB
db2 get db cfg | grep '/tlogdir/DWHDB/NODE0000/LOGSTREAM0000'
db2 get db cfg | grep "First active log file">sample.txt
x= awk '{print substr($0,60,12)}' sample.txt
db2 prune logfile prior to $x
When I execute above code following error came
SQL0104N An unexpected token "END-OF-STATEMENT" was found following "TO".
Expected tokens may include: "". SQLSTATE=42601
How to fix this issue?
Asked by user203085
(1 rep)
Mar 11, 2020, 08:08 AM
Last activity: Mar 17, 2020, 10:32 AM
Last activity: Mar 17, 2020, 10:32 AM