Presentation is loading. Please wait.

Presentation is loading. Please wait.

IBM GLOBAL SERVICES Informix Forum John F. Miller III The Ins and Outs of Table Level Restore ® © IBM Corporation 2005.

Similar presentations


Presentation on theme: "IBM GLOBAL SERVICES Informix Forum John F. Miller III The Ins and Outs of Table Level Restore ® © IBM Corporation 2005."— Presentation transcript:

1 IBM GLOBAL SERVICES Informix Forum John F. Miller III The Ins and Outs of Table Level Restore ® © IBM Corporation 2005

2 Agenda What is Table Level Point in Time Restore (TLPITR) Syntax and Semantics Content Release Phases TLPITR Testing

3 TLPITR

4 Provide the customer with the ability to easily extract a set of tables, a table or a portion of a table from a level 0 archive to a user specified point in time. The extracted data can be placed in an external table or on a table on the server of the user’s choice regardless of server version or machine type as long as the database server is listed in the sqlhost file.

5 Benefits Extract a table or set of tables Filter the retrieved data Retrieve just a subset of columns Repartition the data Data may be placed in the same version database or on a different database version with a different machine architecture

6 Agenda What is Table Level Point in Time Restore (TLPITR) Syntax and Semantics Content Release Phases TLPITR Testing

7 System Diagram Schema Command File Schema Command File Table Level Point In Time Archecker Config File Archecker Command Line Ixbar File Ixbar File

8 Schema Command File Database Insert into … Select Create table Set Restore SQL comments

9 Database Statement Set the current database statement All table names referenced following the database statement are associated with the current database unless fully qualified DATABASE [LOG MODE ANSI]

10 Create Table Statement The full create table syntax is supported This statement is used to specify both target and source tables Source Table –A table that is on the archive backup Target Table –The destination table, where the data should be placed

11 Source Table A table that is on the archive backup For each source table you must specify the storage options. –The dbspace names in the fragmentation clause used to find the table’s data –The exact fragmentation schema is not required Exact column layout is required –Column types and locations must be exact –Not able to be completely verify column layout

12 Target Table If the target table exists then data is appended If the target does not exist then the table is created –All attributes specified in the schema file will be utilized

13 External Table Used to specify a pipe or OS file as the location of the physical portion of the restore CREATE EXTERNAL TABLE …. USING (‘ ’, ‘ ’); Format –INFORMIX or (ASCII) DELIMITED Logical restore does not happen

14 Insert into Select From Statement Only a subset of the insert/select syntax is supported One table retrieved per statement Each statement requires a separate connection to the database A source table may only be extracted once per restore – no multi-siting –A table name may only exist once as a source table

15 Insert into Select From Statement FeatureSupportedUnsupported Insert table 1. fully qualified table name 1. views 2. synonyms Insert columns 1. column names 1. column aliases 2. constants Select columns 1. column name 2. projection list 3. all columns ‘*’ 1. subscripting 2. column aliases 3. constants 4. aggregate 5. expressions 6. stored procedures From Clause 1. single table 1. views 2. multiple tables 3. synonyms

16 Insert into Select From (cont’ed) FeatureSupportedUnSupported Where Clause 1. Equal, Not Equal ( =, ==, <> ) 2. Less than, Less than equal to 3. Greater than, Greater than equal to 4. Match, Not Match, Like, Not Like 5. IS NULL, NOT NULL 6. AND 7. OR 8. TODAY/CURRENT Joins Subqueries Functions Procedures Math Expr. Having Clause All Parts Group ByAll Parts Into TempAll Parts Order byAll Parts UnionAll Parts

17 Set Statement COMMIT TO –Sets the number of records to insert before committing –SET COMMIT TO –Default to 1000 WORKSPACE TO –Directs temporary tables and indexes to the dbspaces listed

18 Restore Command Defines point in time to restore data to Defines if logical recovery should occur Default is RESTORE TO CURRENT RESTORE [ TO | CURRENT] [ WITH NO LOG ] Drops and Truncate Tables stops recovery

19 Archecker Config File Set the existing environment variable AC_CONFIG to the relative or full path name of the configuration file If ONCONFIG is set correctly, those values will be used as defaults. AC_MSGPATH/tmp/ac.log# Archecker message log AC_STORAGE/tmp# Directory used for temp storage AC_VERBOSE1# 1 verbose 0 terse messages AC_IXBAR/tmp/ixbar# Path to ixbar file AC_TAPEBLOCK32# Blocksize in KB AC_SCHEMA schcmd.txt# Schema command file

20 Archecker Command Line Start archecker in TLPITR mode w/ schema file archecker –bsv –f {schema cmd file} Start archecker in TLR mode archecker –bvsX tUse ontape interface bUse onbar interface sPrint information to the screen vVerbose fSchema command file, implies X XTable Level unloads

21 Example Screen Output Program Name: archecker CSDK: IBM Informix CSDK Version 2.90 Compiled: 11/05/04 13:15 on SunOS 5.8 Generic_117350-08 AC_STORAGE /tmp AC_MSGPATH /tmp/ac_msg.log AC_VERBOSE on Extracting table d1:cust into d1:cust_new Table checks PASSED Table extraction commands 1 Tables found on archive 1 LOADED: d1:cust_new produced 56 rows. Creating log control tables Logically recovered d1:cust_new Inserted 112 Deleted 68 Updated 33

22 Recovery of Lost Table Extracts a table called test1:tlr from the most recent backup of dbspace1 and places the data in table test1:tlr database test1; create table tlr ( a_serial serial, b_integer integer, c_char char(20), d_decimal decimal, ) in dbspace1; insert into tlr select * from tlr;

23 Restoring from a Previous Backup Extracts a table called test1:tlr from the level 0 backup of dbspace1 just prior “2003-01-01 01:01:01” and places the data in table test1:tlr database test1; create table tlr ( a_serial serial, b_integer integer, c_char char(20), d_decimal decimal, ) in dbspace1; insert into tlr select * from tlr; restore to ‘2003-01-01 01:01:01’;

24 Extracting a Subset of Columns Extracts a table called test1:source_tab from the most recent backup of dbspace1 and places the data in column c_char into column X_char, d_decimal into Y_decimal in table test1:target_tab database test1; create table source_tab ( a_serial serial, c_char char(20), d_decimal decimal ) in dbspace1; create table target_tab ( X_char char(20), Y_decimal decimal, Z_name char(40) ) in dbspace2; insert into target_tab ( X_char, Y_decimal ) select c_char,d_decimal from source_tab;

25 Using Data Filtering Extracts the physical records only from a table called test1:tlr from the most recent backup of dbspace1 and places the data in table test1:tlr only where the where conditions are true. database test1; create table tlr ( a_serial serial, b_integer integer, c_char char(20), d_decimal decimal, ) in dbspace1; insert into tlr select * from tlr where c_char matches ‘j*’ and d_decimal is NOT NULL and b_integer > 100; RESTORE WITH NO LOG

26 Using External Tables Extracts a table called dl:source_tab from the most recent backup of dbspace1 and sends the data in ASCII format with fields delimited to the file named /TMP/PIPE. database d1; create table source_tab (cola int) in dbspace1; create external table target_tab (cola int) USING (‘/TMP/PIPE’, ‘DELIMITED’); insert into target_tab select * from source_tab;

27 Two Table Example Extracts a table called test1:tlr_1 and test:tlr_2 from the most recent backup of dbspace1 and places the data in table test1:tlr_1_dest and test1:tlr_2_dest using only one scan of the tape. database test1; create table tlr_1 ( columns ) in dbspace1; create table tlr_1_dest ( columns ); create table tlr_2 ( columns ) in dbspace1; create table tlr_2_dest ( columns ); insert into tlr_1_dest select * from tlr_1; insert into tlr_2_dest select * from tlr_2;

28 Distributed Restore Extracts a table called test:source_tab from the most recent backup of dbspace1 and places the data on the database server rem_srv in the table target_dbs:tlr_1 database target_dbs; create table target_tab ( columns ); database test; create table source_tab ( columns ) in dbspace1; insert into target_dbs@rem_srv.target_tab select * from source_tab;

29 Agenda What is Table Level Point in Time Restore (TLPITR) Syntax and Semantics Content Release Phases TLPITR Testing

30 Who Can Use What When XPS –8.50 (Sept 2004) = Currently Released IDS –10.00.UC1 = Currently Released All built-in data types, boolean, and LVARCHAR are supported Partition blobs (text, byte) supported Blobspace blobs not supported Clob and Blob are not supported –10.00.UC3 Currently Released Clob and Blob supported for for level 0, no logical recovery – Clob and Blob supported for logical restore Extended data type support

31 Agenda What is Table Level Point in Time Restore (TLPITR) Syntax and Semantics Content Release Phases TLPITR Testing

32 Testing Environment 1 2 Onbar worker threads 1 2 Test instance XPS 8.40FC2X2 6 CPU’s 3 Gig RAM 60 Gig Disk coserver 2 coserver 1 Backup Server “Legato” 9480 Network Test Table 17 Gig 45M Rows

33 Test Cases 123...123... FullFilterSerialIndex Serial Stream - Full Table Restore Serial Stream - Partial Table Restore (Filter) Serial Stream - Table with a serial column Serial Stream - Table with index Parallel Streams - Full Table Restore

34 Serial Stream - Full Table Restore XPS dbspaces (dbslice) Variations on the Theme Partial Table ( where clause ) Table with Index Table with Serial Column Legato Archecker XBSA

35 Parallel Streams - Full Table Restore XBSA Legato Archecker XPS dbspaces (dbslice) Archecker 1 archecker for each dbspace

36 Performance

37 Serial Stream - “External Enhancement” Legato XBSA Named Pipe Archecker XPS PLOAD (dbaccess/external tables)

38 Serial Stream - “DevNull” Archecker Legato XBSA /dev/null

39 Performance

40 Questions


Download ppt "IBM GLOBAL SERVICES Informix Forum John F. Miller III The Ins and Outs of Table Level Restore ® © IBM Corporation 2005."

Similar presentations


Ads by Google