feat(clienti): add Oracle XE PDB recreare scripts and audit cleanup
- Complete PDB export/import workflow (16 scripts in clienti/oracle-xe-21c/import/) - Recreare PDB script with step-by-step guide (recreare_pdb.sql) - Universal audit cleanup script for Oracle XE 11g-21c (cleanup_audit.sql) - Troubleshooting guide with all lessons learned (depanare-ora-12954-spatiu.md) - Fixed: DIRECTORY grant syntax, DBMS_LOCK grant, remap_tablespace USERS:ROA, impdp quoted AS SYSDBA for Windows, AWR retention 8 days, datafile full path - Updated roa-windows-setup docs with XE prevention steps and gotchas table Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
42
clienti/oracle-xe-21c/import/11_import_master.sql
Normal file
42
clienti/oracle-xe-21c/import/11_import_master.sql
Normal file
@@ -0,0 +1,42 @@
|
||||
-- ============================================================
|
||||
-- IMPORT MASTER - Recreare PDB Oracle XE 21c
|
||||
-- Rulat ca SYS AS SYSDBA conectat la PDB-ul NOU
|
||||
-- ============================================================
|
||||
-- PREREQUISITE: PDB creat si deschis, fisierele .dmp in DMPDIR
|
||||
-- ============================================================
|
||||
|
||||
SPOOL C:\DMPDIR\import_master.log
|
||||
|
||||
-- ============================================================
|
||||
-- FAZA 1: Infrastructura (inainte de Data Pump)
|
||||
-- ============================================================
|
||||
PROMPT [1/13] Creating tablespaces...
|
||||
@01_tablespaces.sql
|
||||
|
||||
PROMPT [2/13] Creating users...
|
||||
@02_useri.sql
|
||||
|
||||
PROMPT [3/13] Creating directories...
|
||||
@03_directories.sql
|
||||
|
||||
PROMPT [4/13] Creating SYS custom tables...
|
||||
@04_sys_tables.sql
|
||||
|
||||
PROMPT [5/13] Creating context...
|
||||
@08_context.sql
|
||||
|
||||
-- ============================================================
|
||||
-- FAZA 2: Data Pump (din CMD, nu din SQLPlus!)
|
||||
-- ============================================================
|
||||
PROMPT
|
||||
PROMPT ==============================================
|
||||
PROMPT STOP! Ruleaza Data Pump din CMD:
|
||||
PROMPT ==============================================
|
||||
PROMPT impdp \"sys/PAROLA_SYS@XEPDB1 AS SYSDBA\" directory=DMPDIR dumpfile=schemas_export.dmp logfile=schemas_import.log remap_tablespace=USERS:ROA
|
||||
PROMPT impdp \"sys/PAROLA_SYS@XEPDB1 AS SYSDBA\" directory=DMPDIR dumpfile=sys_tables.dmp logfile=sys_tables_import.log table_exists_action=APPEND
|
||||
PROMPT ==============================================
|
||||
PROMPT Dupa Data Pump, continua cu:
|
||||
PROMPT @11_import_master_faza2.sql
|
||||
PROMPT ==============================================
|
||||
|
||||
SPOOL OFF
|
||||
Reference in New Issue
Block a user