All Forums Tools
marpaia 2 posts Joined 08/11
10 Aug 2011
ARCmain Scipting for Backups on SUSE LINUX

Hello folks,

I am reviewing some documentation and have done some research on the ability to protect my data using the Archive utility. My source of the documentaiton is here... http://www.info.teradata.com/edownload.cfm? itemid=101680007

For my situation, I need to have a few datasets (7 at most) to recover from. So given the following Archive script...

-----
LOGON DBCID/UID,PW;
ARCHIVE DATA TABLES (MYONLINEDATA) ALL,
RELEASE LOCK,
FILEDEF=(tddumps,/var/tddumps/dump.%UEN%.out);
LOGOFF;
-----

...I need to understand how the Utility Event Numbers will behave on file creation and how to use them in restore operartions?

1 - How large can these UENs get to before they are recycled?
2 - How can I use a specific UEN to perform a restore? - To note, the documentation is not 100% clear to me on how to do this when you need to select a specific file with a UEN tied to it. I knwo there are references to the VERBOSE commend that extracts a UEN for you, but it seems like by using defaults, you will always the UEN embedded in a dump file.

Sample Restrore Scripts...

-----
LOGON DBCID/UID,PW;
RESTORE DATA TABLES (MYONLINEDATA) ALL,
RELEASE LOCK,
FILEDEF=(tddumps,/var/tddumps/dump.%UEN%.out);
LOGOFF;
-----

or simpler than that...

-----
LOGON DBCID/UID,PW;
RESTORE DATA TABLES (MYONLINEDATA) ALL,
RELEASE LOCK,
FILE=(tddumps);
LOGOFF;
-----

Any help would be greatly appreciated.

marpaia 2 posts Joined 08/11
10 Aug 2011

Folks,

I was looking a bit to deep and to literally at this. I realize now that the FILEDEF can be setup as a default run-time parameter and the UEN is a Process ID. Therefore, assuming the FILEDEF run-time parameter is setup as follows...

---
FILEDEF=(tddumps,/var/tddumps/dump.%UEN%.out);
---

...and the script is executed as follows...

---
LOGON DBCID/UID,PW;
ARCHIVE DATA TABLES (MYONLINEDATA) ALL,
RELEASE LOCK,
FILE=(tddumps);
LOGOFF;
---

Then each time this is run, a file like "dump.123.out" is created under folder "/var/tddumps" assuming the UEN (Process ID) is 123 at the time the script is executed. That makes it clear on the first question I asked earlier.

PS... I am sure some of you are shaking your heads by now - but I have been exposed to this form a consultative side starting 13 hours ago.

===

Now for my second question based on the following assumption. Let's say the "/var/tddumps/" folder has the following 4 files...

- dump.123.out
- dump.456.out
- dump.789.out

When I run my Restore script below...

---
LOGON DBCID/UID,PW;
RESTORE DATA TABLES (MYONLINEDATA) ALL,
RELEASE LOCK,
FILE=(tddumps);
LOGOFF;
---

How can I specify which file to use assuming I don't want to use the last one that was created?

Please advise, as this is keeping me up real late here on the East Coast. Thanks in advance!

You must sign in to leave a comment.