diff --git a/migration-tools/tts-backup-python/tts-backup.py b/migration-tools/tts-backup-python/tts-backup.py index 6f0d0e6..08ca942 100755 --- a/migration-tools/tts-backup-python/tts-backup.py +++ b/migration-tools/tts-backup-python/tts-backup.py @@ -1,5 +1,3 @@ -#!/usr/bin/python3 -# import os import sys import json @@ -21,6 +19,7 @@ import getpass import functools from datetime import datetime +import re print = functools.partial(print, flush=True) @@ -105,6 +104,14 @@ def split_into_lines(items, to_upper=True, chunk_size=10): item_list = ",\n".join(chunks) return item_list +# Escape '$' in table names for shell safety (TABLE$1 --> TABLE\$1) +def escape_dollar(raw): + tables = [] + for tbl in raw.split(','): + tbl = re.sub(r'(? for transport not supported, add section size clause # 12c/19c : # if src_platform = 13 : no need of for transport, add section size clause @@ -2110,7 +2135,7 @@ def main(args): exit(1) log_end_time(start_time) - _env.platform_id = int(_env.DB_PROPS_ARRAY[4]) + _env.platform_id = int(_env.DB_PROPS_ARRAY[3]) _env.version_full = _env.DB_PROPS_ARRAY[9] _env.bigfile_tablespaces = _env.DB_PROPS_ARRAY[15].replace(';', ',') _env.smallfile_tablespaces = _env.DB_PROPS_ARRAY[16].replace(';', ',') diff --git a/migration-tools/tts-backup-python/ttsTemplate.txt b/migration-tools/tts-backup-python/ttsTemplate.txt index 11e0aee..252f7be 100755 --- a/migration-tools/tts-backup-python/ttsTemplate.txt +++ b/migration-tools/tts-backup-python/ttsTemplate.txt @@ -274,6 +274,18 @@ get_local_schemas: owners_in_tablespaces: select distinct owner from dba_tables where tablespace_name in (${ts_list}); +owners_and_grantee_in_tablespaces: + select distinct username from ( + select owner as username from dba_tables where tablespace_name in (${ts_list}) + union + select grantee as username from dba_tab_privs + where owner in ( + select owner from dba_tables where tablespace_name in (${ts_list}) + ) and grantee in ( + select username from dba_users where ${l_user_list_clause} + ) + ); + object_validation: -- SEGMENTS : Physical Segments (tables, indexes, lobs, partitions etc.) SELECT 'SEGMENT,' || owner || '.' || segment_name diff --git a/migration-tools/tts-backup-python/version.txt b/migration-tools/tts-backup-python/version.txt index f725c00..2ba38d5 100755 --- a/migration-tools/tts-backup-python/version.txt +++ b/migration-tools/tts-backup-python/version.txt @@ -1,4 +1,10 @@ -26.2.1.2 - 05 February 2005 +26.2.3.2 - 20 February 2026 + + Escape '$' in table names (EXCLUDE_TABLES) e.g. TABLE$1 --> TABLE\$1 + + Add users to schema list those have obj grants on tbs list if schema list not provided + - remove tde keys file check to avoid platform dependency issues + + Improve error messages incase of invalid user input for DATABASE_NAME + +26.2.1.2 - 05 February 2026 + Added support to query the TTS Backup Utility version + Updated RMAN and Data Pump job names to include the project name + Added validation to ensure the tablespace list remains unaltered across backups