Skip to content

Commit b675b19

Browse files
committed
968: add system lvl oracle details; index.mdx
1 parent 270b167 commit b675b19

File tree

1 file changed

+51
-0
lines changed
  • docs/auto-discovery/database-discovery

1 file changed

+51
-0
lines changed

docs/auto-discovery/database-discovery/index.mdx

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,10 @@ Device42 database autodiscovery for Windows and \*nix targets supports discovery
268268

269269
### Minimum Permissions Requirements for Oracle Discovery
270270

271+
Oracle database discovery requires two sets of permissions: database-level permissions for querying Oracle system views and system-level permissions for executing shell commands on the target servers.
272+
273+
#### Database-Level Permissions
274+
271275
For discovery to return detailed info about your database instance, you will require read or view permissions for the following system views and tables:
272276

273277
<table><tbody><tr><td width="288"><ul><li>V$SESSION</li><li>V$DATABASE</li><li>V$CONTAINERS</li><li>DBA_SEGMENTS</li></ul></td><td width="288"><ul><li>DBA_OBJECTS</li><li>SYS.ALL_USERS</li><li>DATABASE_COMPATIBLE_LEVEL</li><li>SYS.PRODUCT_COMPONENT_VERSION</li></ul></td></tr></tbody></table>
@@ -284,6 +288,53 @@ To get information about pluggable databases (PDBs) within an Oracle container d
284288
CONTAINER = CURRENT;
285289
```
286290

291+
#### System-Level Permissions
292+
293+
You need system-level access to execute shell commands on the target servers. Device42 requires sudo access to run various commands related to Oracle configuration and status information, for example:
294+
295+
```bash
296+
/usr/bin/cat: /dbprog/oracle/product/19.3.0.0.26/network/admin/tnsnames.ora
297+
```
298+
299+
or
300+
301+
```bash
302+
oracle -c 'lsnrctl status'
303+
```
304+
305+
**Sample Sudoers Configuration:**
306+
307+
Add the following entries to your `/etc/sudoers` file or create a separate sudoers file for Device42 Oracle discovery:
308+
309+
<details>
310+
<summary>Click to expand the code block</summary>
311+
312+
```bash
313+
# Basic Oracle Discovery Commands
314+
Cmnd_Alias DEVICE42_ORACLE = \
315+
/usr/bin/ps -ef, \
316+
/usr/bin/pwdx *, \
317+
/usr/bin/su - oracle -c lsnrctl status, \
318+
/usr/bin/su - oracle -c echo "select * from product_component_version;" | sqlplus -L -S -M "HTML ON" / as sysdba, \
319+
/usr/bin/cat /etc/oratab, \
320+
/usr/bin/su - oracle -c /u01/app/19.1.0.0/grid/bin/lsnrctl status, \
321+
/usr/bin/su - oracle -c echo "select * from product_component_version;" | /u01/app/19.1.0.0/grid/bin/sqlplus -L -S -M "HTML ON" / as sysdba
322+
323+
# Oracle RAC Additional Commands
324+
Cmnd_Alias DEVICE42_ORACLE_RAC = \
325+
/usr/bin/su - oracle -c /u01/app/19.1.0.0/grid/bin/olsnodes -c, \
326+
/usr/bin/su - oracle -c /u01/app/19.1.0.0/grid/bin/olsnodes -n -i -s, \
327+
/usr/bin/su - oracle -c /u01/app/19.1.0.0/grid/bin/olsnodes -l -n -i -s, \
328+
/usr/bin/su - oracle -c /u01/app/19.1.0.0/grid/bin/srvctl config scan_listener, \
329+
/usr/bin/su - oracle -c /u01/app/19.1.0.0/grid/bin/srvctl config scan, \
330+
/usr/bin/su - oracle -c /u01/app/19.1.0.0/grid/bin/crsctl stat res -t | grep *, \
331+
/usr/bin/su - oracle -c srvctl config database -d *
332+
333+
# Grant these permissions to your Device42 discovery user:
334+
# username ALL=(ALL) NOPASSWD: DEVICE42_ORACLE, DEVICE42_ORACLE_RAC
335+
```
336+
</details>
337+
287338
### Set Up Your Oracle Discovery Job
288339

289340
To begin discovering your Oracle databases, navigate to **Discovery > HyperVisors /\*nix /Windows**. Create a new discovery job for Windows or \*nix (or both) targets, and be sure to check the **Collect database server information** checkbox.

0 commit comments

Comments
 (0)