-
Notifications
You must be signed in to change notification settings - Fork 63
/
dump_env.sql
37 lines (35 loc) · 1.22 KB
/
dump_env.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
REM Filename : dump_env.sql
REM Author : Craig Richards
REM Created : 09-April-2008
REM Version : 1.0
REM Modifications :
REM
REM Description : Creates a procedure to gather some environment information, both OS and database
CREATE OR REPLACE PROCEDURE DUMP_ENV
AUTHID CURRENT_USER
IS
buffer VARCHAR2(260);
BEGIN
DBMS_OUTPUT.PUT_LINE(CHR(10));
DBMS_OUTPUT.PUT_LINE('Your Environment :');
DBMS_OUTPUT.PUT_LINE('==================');
DBMS_OUTPUT.PUT_LINE(CHR(10));
SYS.DBMS_SYSTEM.GET_ENV('ORACLE_HOME',BUFFER);
DBMS_OUTPUT.PUT_LINE('ORACLE_HOME: ' || BUFFER);
SYS.DBMS_SYSTEM.GET_ENV('ORACLE_SID',BUFFER);
DBMS_OUTPUT.PUT_LINE('ORACLE_SID: ' || BUFFER);
SYS.DBMS_SYSTEM.GET_ENV('LD_LIBRARY_PATH',BUFFER);
DBMS_OUTPUT.PUT_LINE('LD_LIBRARY_PATH: ' || BUFFER);
SYS.DBMS_SYSTEM.GET_ENV('SHELL',BUFFER);
DBMS_OUTPUT.PUT_LINE('SHELL: ' || BUFFER);
SYS.DBMS_SYSTEM.GET_ENV('EDITOR',BUFFER);
DBMS_OUTPUT.PUT_LINE('EDITOR: ' || BUFFER);
select host_name into BUFFER from v$instance;
DBMS_OUTPUT.PUT_LINE('HOSTNAME: ' || BUFFER);
select version into BUFFER from v$instance;
DBMS_OUTPUT.PUT_LINE('VERSION: ' || BUFFER);
SYS.DBMS_SYSTEM.GET_ENV('ALERT',BUFFER);
DBMS_OUTPUT.PUT_LINE('ALERT: ' || BUFFER);
END DUMP_ENV;
/
REM End of Script