Notice that the main calling script calls another script to run the login logout, this simply consists of the following $ cat dm.sh dmcli -user dmsys -pass dmsys -host stal-al-sun3:671 -dbname intermediate -dsn ora9 -cmd exit
There may be some errors if synonyms already exist but these can be ignored. sqlplus basedb/password SQL> set heading off SQL> set pages 0 SQL> set lines 132 SQL> spool grants.sql SQL> select 'grant select on '||table_name||' to <basedb>_user;' from cat where table_type = 'VIEW' and table_name like 'PCMS%'; SQL> spool off SQL> @grants SQL> spool synonyms.sql
3.Copy the tape into a tar file by typing cat /tape/device > vmsoft.tar ('/tape/device' means the actual device name of the tape drive, i.e., /dev/rmt0). This could take a couple minutes while it copies everything off the tape and puts it into a file in your current working directory.