Skip to content

Commit

Permalink
ver 1.1
Browse files Browse the repository at this point in the history
Some errors are corrected
Spool name is not static now. Spool name : DBNAME_yymmdd_Security_checks.html
  • Loading branch information
yusufanilakduygu authored Feb 13, 2018
1 parent 3ee7303 commit 4501105
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 24 deletions.
20 changes: 13 additions & 7 deletions Oracle11g-Checks.sql
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
/*

Run this script sqlplus system/password @Oracle11g-Checks.sql
Output filename is : out.html
Run this script sqlplus system/password@ServerName:Port/ServiceName @Oracle11g-Checks.sql
Output filename is : DBName_yymmdd_Security_Checks.html


*/



set pagesize 2000
set pagesize 10000
SET TERMOUT OFF
SET RECSEP WRAPPED

Expand Down Expand Up @@ -56,20 +58,22 @@ BODY 'TEXT="#00000"' -
TABLE 'WIDTH="60%" BORDER="1"'


spool out.html
column filename new_val filename
select name||'_'||to_char(sysdate, 'yyyymmdd' )||'_Security_Checks.html' filename from dual , v$database;
spool &filename

set define off

SET MARKUP HTML OFF
Prompt <h2> Oracle 11g Security Check SQLs </h2>
Prompt <p>Open Source code from https://github.com/yusufanilakduygu/Oracle-DB-Security-Checks </p>
Prompt <p>This Report was developed by Y. Anil Akduygu ver 1.0 2017 </p>
Prompt <p>This Report was developed by Y. Anil Akduygu ver 1.1 2018 </p>

Prompt <h3> Server and Database Information </h3>
SET MARKUP HTML ON

SELECT to_char(SYSDATE,'dd-mm-yyyy hh24:mi') REPORT_DATE,
SUBSTR (host_name, 1, 10) HOST_NAME,
SUBSTR (host_name, 1, 20) HOST_NAME,
name,
database_role,
SUBSTR (open_mode, 1, 10) OPEN_MODE,
Expand Down Expand Up @@ -1845,7 +1849,9 @@ SELECT
FROM
DBA_NETWORK_ACL_PRIVILEGES;



Prompt
Prompt ***** END OF SECURITY CHECKS REPORT ******

spool off
exit
18 changes: 10 additions & 8 deletions Oracle12c-Checks.sql
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*

Run this script sqlplus system/password @Oracle12c-Checks.sql
Output filename is : out.html
Run this script sqlplus system/password@ServerName:Port/ServiceName @Oracle12c-Checks.sql
Output filename is : DBName_yymmdd_Security_Checks.html

*/

set pagesize 2000
set pagesize 10000
SET TERMOUT OFF
SET RECSEP WRAPPED

Expand Down Expand Up @@ -61,20 +61,22 @@ BODY 'TEXT="#00000"' -
TABLE 'WIDTH="60%" BORDER="1"'


spool out.html
column filename new_val filename
select name||'_'||to_char(sysdate, 'yyyymmdd' )||'_Security_Checks.html' filename from dual , v$database;
spool &filename

set define off

SET MARKUP HTML OFF
Prompt <h2> Oracle 12c Security Check SQLs </h2>
Prompt <p>Open Source code from https://github.com/yusufanilakduygu/Oracle-DB-Security-Checks </p>
Prompt <p>This Report was developed by Y. Anil Akduygu ver 1.0 2017 </p>
Prompt <p>This Report was developed by Y. Anil Akduygu ver 1.1 2018 </p>

Prompt <h3> Server and Database Information </h3>
SET MARKUP HTML ON

SELECT to_char(SYSDATE,'dd-mm-yyyy hh24:mi') REPORT_DATE,
SUBSTR (host_name, 1, 10) HOST_NAME,
SUBSTR (host_name, 1, 20) HOST_NAME,
name,
database_role,
SUBSTR (open_mode, 1, 10) OPEN_MODE,
Expand Down Expand Up @@ -1497,8 +1499,8 @@ SELECT
FROM
DBA_HOST_ACES;


Prompt
Prompt ***** END OF SECURITY CHECKS REPORT ******

spool off
exit
22 changes: 13 additions & 9 deletions Oracle12c-Multitenant-Checks.sql
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/*

Run this script sqlplus system/password @Oracle12c-Multitenant-Checks.sql
Output filename is : out.html
Run this script sqlplus system/password@ServerName:Port/ServiceName @Oracle12c-Multitenant-Checks.sql
Output filename is : DBName_yymmdd_Security_Checks.html


*/

set pagesize 2000
set pagesize 10000
SET TERMOUT OFF
SET RECSEP WRAPPED

Expand Down Expand Up @@ -42,6 +42,7 @@ column PRINCIPAL format A15
column PRINCIPAL_TYPE format A25



SET MARKUP HTML ON SPOOL ON PREFORMAT OFF ENTMAP ON -
HEAD '<TITLE> </TITLE> -
<STYLE type="text/css"> -
Expand All @@ -60,22 +61,24 @@ BODY 'TEXT="#00000"' -
TABLE 'WIDTH="60%" BORDER="1"'


spool out.html
column filename new_val filename
select name||'_'||to_char(sysdate, 'yyyymmdd' )||'_Security_Checks.html' filename from dual , v$database;
spool &filename

set define off

SET MARKUP HTML OFF
Prompt <h2> Oracle 12c Multitenant Database Security Check SQLs </h2>
Prompt <p>Open Source code from https://github.com/yusufanilakduygu/Oracle-DB-Security-Checks </p>
Prompt <p>This Report was developed by Y. Anil Akduygu ver 1.0 2017 </p>
Prompt <p>This Report was developed by Y. Anil Akduygu ver 1.1 2018 </p>

Prompt <h3> Server and Database Information </h3>
SET MARKUP HTML ON

ALTER SESSION SET container = cdb$root;

SELECT to_char(SYSDATE,'dd-mm-yyyy hh24:mi') REPORT_DATE,
SUBSTR (host_name, 1, 10) HOST_NAME,
SUBSTR (host_name, 1, 20) HOST_NAME,
name,
database_role,
SUBSTR (open_mode, 1, 10) OPEN_MODE,
Expand Down Expand Up @@ -739,7 +742,7 @@ SET MARKUP HTML ON



SSELECT
SELECT
A.GRANTEE,
A.PRIVILEGE,
B.COMMON,
Expand Down Expand Up @@ -899,7 +902,7 @@ WHERE
'DBMS_IJOB',
'DBMS_FILE_TRANSFER'
)
AND A.CON_ID = B.CON_ID;
AND A.CON_ID = B.CON_ID
ORDER BY
NAME;

Expand Down Expand Up @@ -1823,7 +1826,8 @@ FROM
CDB_HOST_ACES;



Prompt
Prompt ***** END OF SECURITY CHECKS REPORT ******

spool off
exit

0 comments on commit 4501105

Please sign in to comment.