Hi,
After the DB migration is completed i am able to view the current documents which were sent after the Migration whereas the documents which are already available in the Database not able view or open. When try to open the old documents i am getting following error for which I have raised IBM PMR and even they have suggested the same but didnt suggest how to recreate the symbolic links.
Object >429FAAA< in Application Group >CBKSD< not found in cache, no other storage defined Srvr->servername.domain.net non-SSL<-
Request to kindly suggest on the issue.
Hello Rajesh,
have copied the documents from the old system to the new one?
What is the content of the ars.cache on the source system, and the one from the target system?
Thank you Alessandro,
Below is the ars.cache details.
/arscache/cache1
We have development server in which we have oracle(archived) & DB2 database(archive). we are pointing the OnDemand application from DB2 to oracle and some data is been migrated by DBA with help of Datastage tool. But when i do initial testing i can view the files which were sent after migration but not the old files which were migrated from DB2 to Oracle.
Kindly suggest.
Just to make things clear, using Oracle or DB2 has nothing to do with cache.
Nothing.
In the cache directory
/arscache/cache1
you should have something like a "retr" directory.
either in
/arscache/cache1/retr
or
/arscache/cache1/dbname/retr
in this directory, you will see the AGID_NAME of all the application group that are defined in your CMOD.
If you enter one of them, you will see 1 or 2 directory called DOC and maybe RES
If you enter one of them (for exemple DOC), you will see inside lots of files (for example 123FAAA, 123FAA1, etc...)
and if you look carefully, this is a link, meaning that you need to check that the links are pointing to the correct document. If not, then you need to recreate it with a "ln -s" command.
I've done in the past a small script to recreate links, it is something like that:
#!/bin/ksh
#
# PLEASE CHANGE THESE 2 VARIABLES TO BE IN SYNC WITH YOUR OWN ENVIRONMENT
#
ARSINI=/opt/ibm/ondemand/V9.5/config/ars.ini
INSTANCECMOD=ARCHIVE
if [[ ! -f ${ARSINI} ]]; then
print "ars.ini not found, please check that the variable ARSINI is correctly setup"
exit 1
fi
if ! grep -q "^\[@SRV@_${INSTANCECMOD}\]" ${ARSINI} ; then
print "CMOD Instance '${INSTANCECMOD}' not found in ars.ini file, please check the variable INSTANCECMOD"
exit 1
fi
CACHEFILE=$(awk -F'=' '/^\[@SRV@_'${INSTANCECMOD}'\]/ {FOUND=1} FOUND==1 && /^SRVR_SM_CFG=/ {print $2; exit}' $ARSINI)
DBINST=$(awk -F'=' '/^\[@SRV@_'${INSTANCECMOD}'\]/ {FOUND=1} FOUND==1 && /^SRVR_INSTANCE=/ {print $2; exit}' $ARSINI)
if [[ -z $CACHEFILE ]]; then
print "No cache file found... please check that the ARSINI and INSTANCECMOD are correctly set"
exit 1
fi
print "Found that the cache file is: ${CACHEFILE}"
if [[ -z $DBINST ]]; then
print "No DB Name found... please check that the ARSINI and INSTANCECMOD are correctly set"
exit 1
fi
print "Found that the DB Name is: ${DBINST}"
# Search for "retr" directory
MAINCACHEDIR=$(awk '/^[^#]/ && ! /^\s*$/ {print; exit}' $CACHEFILE)
if [[ -d ${MAINCACHEDIR}/retr ]]; then
RETRDIRECTORY=${MAINCACHEDIR}/retr
MIDDLEDIR=""
elif [[ -d ${MAINCACHEDIR}/${DBINST}/retr ]]; then
RETRDIRECTORY=${MAINCACHEDIR}/${DBINST}/retr
MIDDLEDIR="/${DBINST}"
else
print "ERROR Could not find the directory 'retr' in the cache directory $MAINCACHEDIR for the CMOD Instance $INSTANCECMOD and the cache file $MAINCACHEDIR"
exit 1
fi
print "Found the 'retr' directory in $RETRDIRECTORY"
print
# Recreating cache directory (forcing)
for mainDirectory in $( awk '/^[^#]/ && ! /^\s*$/ {print}' ${CACHEFILE} ) ; do
print "Processing directory $mainDirectory"
cd ${mainDirectory}${MIDDLEDIR}
for directory in [0-9]* ; do
cd $directory
for agDirs in * */* ; do
if [[ -d $agDirs ]]; then
mkdir -m 700 -p ${RETRDIRECTORY}/${agDirs}
fi
done
for agDirs in */* ; do
if [[ $agDirs != "*/*" ]]; then
cd $agDirs
for myFile in * ; do
ln -sf ${PWD}/${myFile} ${RETRDIRECTORY}/${agDirs}/${myFile}
done
cd ../..
fi
done
cd ..
done
done
I cannot assure that this will work 100% on your system, at least it works on mine... so here is one piece of advice first:
1) First, STOP CMOD
2) Please do a backup of the current "retr" directory in your cache directory (with the tar command for example).
3) Edit the script (first 2 variables) in order to reflect where is your ars.ini and what is the name of your CMOD Instance.
4) Run the script
5) check that the links in the directory are correctly setup
6) Start CMOD
In case something is really wrong... then please stop CMOD, delete the retr directory, and restore the backup you did in 2).
Of course, during this operation you should not load/archive documents in CMOD.
If something goes wrong with this script, I will not be held responsible.
You are using it with you own accord, and you are taking the risk of whatever it might happen.
I will not be help liable and responsible for any lost of data that you might encounter.
Thanks a lot Alessandro for your quick response.
I will try script which you have provided. But Initially i want to test on one application group is there any possibility to do so then can you help me in providing the script for re-creating the links.
Below is the exact path where i need to recreate the links.
/arsacache/cache1/retr/IZC/DOC/
Kindly do needful.
:-) Nice try :-)
My help stops here. I've much more than I should have.
The rest is in your hand.
And for the rest of you, forum readers, this is a nice exercise for you :-D if you're up to the challenge! 8)
Hi Alessandro,
Initially i tried to work on one file rather than working on retr folder. I removed the symbolic links for one file in /arscache/cache1/retr/DHC/DOC/7233FAA* and recreated the symbolic links again. But the result is negative i am still not able to open the file from OnDemand client.
kindly suggest.
try to run
arsmaint -v
and check in the "System Log" for errors.