This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
-- EXPORT | |
-- | |
-- Checkfolders to export : | |
select OWNER, DIRECTORY_NAME,DIRECTORY_PATH from DBA_DIRECTORIES order by OWNER, DIRECTORY_NAME; | |
-- If need new one : | |
CREATE DIRECTORY DP_DIR as '/backup/folder' ; | |
-- Create it also on OS then : |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE PROCEDURE DROP_ALL_TABLES | |
AS | |
CURSOR cTables IS SELECT TABLE_NAME FROM USER_TABLES; | |
vTableName USER_TABLES.TABLE_NAME%TYPE; | |
CURSOR cSequences IS SELECT SEQUENCE_NAME from USER_SEQUENCES; | |
vSequenceName USER_SEQUENCES.SEQUENCE_NAME%TYPE; | |
begin | |
--drop tables | |
open cTables; | |
loop |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define user_name = &1 | |
define user_pwd = &2 | |
-- Customize the default tablespace and temporary tablespace if necessary | |
define ts_default = users | |
define ts_temp = temp | |
set verify off | |
CREATE USER &&user_name |