I want to export my Lawson prod DB 2-3 times per week then copy and import the file into a Disaster Recovery productline server at a different site. I'm told Lawson LID doesn't support this type of automation.
I'm using the command: expsysdb -s ProdlineName to-filename.bak
When I tried the command from DOS prompt I get a security error. I am a Domain administrator so that our network shouldn't be the issue. Has anyone been able to run these?
Thanks John
I'm new to much of this. Can you direct me to some skeleton batch files tha do what I need.
I have experimented with the tools Lawson provides for export, import, product line copies, and you are better off using your database native tools. They are much more efficient. What DB are you running? Below is a simple unix export script using Oracle datapump for Oracle 10g. I have another script that cleans up exports and keeps only three in the rotation. If you are looking for a backup strategy, use RMAN, it's great. I have scripts for RMAN as well if you are running Oracle. #!/bin/ksh # ****************************************************************** # ****************************************************************** # Lawson Production Oracle Environment Variables ORACLE_HOME=/oracle/product/10.1.0; export ORACLE_HOME ORACLE_SID=prod; export ORACLE_SID # Lawson Developement Oracle Environment Variables #ORACLE_HOME=/oracle/product/10.1.0; export ORACLE_HOME #ORACLE_SID=prod; export ORACLE_SID LIBPATH=$ORACLE_HOME/lib; export LIBPATH PATH=$PATH:$ORACLE_HOME/bin:/usr/bin:/usr/sbin; export PATH #======================================================== # Nightly Export of PROD, LAWGEN, LAWLOGAN # # Frequency : Daily #======================================================== expdp system/ DIRECTORY=DPUMP_DIR1 SCHEMAS=LAWGEN,LAWLOGAN,LAWPROD DUMPF ILE=EXPORT.dmp LOGFILE=DPUMP_DIR1:EXPORT.log VERSION=COMPATIBLE PARALLEL=5 ESTIM ATE=BLOCKS CONTENT=ALL
If you insist on using a lawson utility, I prefer the dbdump command. It's faster than the expsysdb command, and a bit more flexible. You will need to create a script with a dbdump command to export each your lawson files individually
dbdump -d prod GLUNITS > GLUNITS.dmp dbdump -d prod GLUNITSX > GLUNITSX.dmp dbdump -d prod GLTRANS > GLTRANS.dmp dbdump -d prod GLTRANSREL > GLTRANSREL.dmp
Here is a script that will create the dbdump and dbload commands in a file for you. If you are running Windows just change the output file name from .sh to .bat.
Take a look at http://www.schronce.net/lawson/ for more scripts.
count -d mssql prod > prod.count awk '{print $2}' prod.count > prod.tables awk '{print "dbdump -d prod",$1,">",$1".dmp"}' prod.tables > proddump.sh awk '{print "dbload -f prod",$1,$1".dmp"}' prod.tables > prodload.sh