From edae2bedff84fe2cf2638f52576d37e70b5df739 Mon Sep 17 00:00:00 2001 From: Nadia <98525884+Nadia-JSch@users.noreply.github.com> Date: Wed, 20 Dec 2023 14:18:43 +0200 Subject: [PATCH 1/3] DOCS-194 add info on Oracle matching logic --- docs/auto-discovery/database-discovery/index.mdx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/auto-discovery/database-discovery/index.mdx b/docs/auto-discovery/database-discovery/index.mdx index 0e374233..100f6652 100644 --- a/docs/auto-discovery/database-discovery/index.mdx +++ b/docs/auto-discovery/database-discovery/index.mdx @@ -188,6 +188,16 @@ On the Application Components screen, click **Show** to view the database Depend ![](/assets/images/Oracle-Discovery-3a-4.png) +### Oracle CDB/PDB Matching Process and Regular Processing Procedures + +We attempt to match any root database instance (CDB) with the same endpoint as our incoming resource (CDB or PDB). If we find a root database instance (CDB), we try to locate all related child databases (PDBs) for it and iterate through all of the child records. If any child database name matches the name of the incoming resource, we identify this database instance as the same as the incoming one and update the existing record with the new incoming resource data. + +If we can't find any child database instance resources, we match the resource to the root resource. If there's no match to the root resource, we proceed with regular processing. + +We don't aim to match orphaned PDBs to the CDB if a fresh CDB is incoming. + +If a candidate database instance is detected to be a child of a CDB we skip the matching process + ## Postgres SQL DB Discovery (on \*nix targets) Postgres SQL database discovery (introduced in v17.11.00) is for \*nix discovery targets, and requires a separate set of credentials to authenticate to the database instance itself. Ensure these credentials have appropriate permissions to view the databases you are interested in discovering. From 2f7cbea08b29bec60f499d0c2af9fc92ef540261 Mon Sep 17 00:00:00 2001 From: Nadia <98525884+Nadia-JSch@users.noreply.github.com> Date: Wed, 20 Dec 2023 14:24:15 +0200 Subject: [PATCH 2/3] Grammarly edit --- .../database-discovery/index.mdx | 55 ++++++++++++------- 1 file changed, 34 insertions(+), 21 deletions(-) diff --git a/docs/auto-discovery/database-discovery/index.mdx b/docs/auto-discovery/database-discovery/index.mdx index 100f6652..d97f2b9a 100644 --- a/docs/auto-discovery/database-discovery/index.mdx +++ b/docs/auto-discovery/database-discovery/index.mdx @@ -1,3 +1,4 @@ + --- title: "Database Discovery" --- @@ -19,7 +20,7 @@ You can also use [Database Connections Discovery](#database-connections-discove ## MS SQL Server DB Discovery (on Windows targets) -Microsoft SQL Server (MSSQL) discovery is supported on discovery targets running Microsoft Windows, and requires a separate set of credentials to authenticate to the database instance itself. Ensure these credentials have appropriate permissions to view the databases you are interested in discovering. +Microsoft SQL Server (MSSQL) discovery is supported on discovery targets running Microsoft Windows and requires a separate set of credentials to authenticate to the database instance itself. Ensure these credentials have appropriate permissions to view the databases you are interested in discovering. Device42 supports autodiscovery on Windows and \*nix platforms for the following MSSQL versions. @@ -33,7 +34,7 @@ Device42 supports autodiscovery on Windows and \*nix platforms for the following ### Minimum Permissions Requirements for MSSQL Discovery -In order to query the below tables, please ensure you have **View Server State** permissions. For discovery to return detailed info about your database instance, you will require read permissions to the following system views: +To query the below tables, please ensure you have **View Server State** permissions. For discovery to return detailed info about your database instance, you will require read permissions to the following system views:
  • sys.dm_exec_connections
  • sys.dm_exec_sessions
  • sys.databases
  • sys.master_files
  • sys.tables
  • sys.dm_os_sys_info
  • sys.dm_os_sys_memory
  • sys.all_objects
@@ -44,7 +45,7 @@ The snippet shown below is necessary to get data from some of the preceding view 3 grant VIEW any DEFINITION TO \[discovery\_user\] 4 GO -**Note**: The discovery user must belong to the administrators user group to discover databases successfully. +**Note**: The discovery user must belong to the administrator’s user group to discover databases successfully. ### Setting up your MSSQL discovery job @@ -62,25 +63,31 @@ You can enter an ordered list of preferred _Discovery Target(s) Credential(s)_ ![Example job status](/assets/images/discovery-job-status-trimmed.png) -2) Kick off your new discovery job to test it (select "Run now" on the Job Screen). As MSSQL databases are detected, discovery will import a list of all instances, databases, and connection details. You can see the status of the discovery job on the job's setup page, as well - Scroll down to the "Job Status" section and look for the bar graphs. +2) Kick off your discovery job to test it (select "Run now" on the Job Screen). As MSSQL databases are detected, discovery will import a list of all instances, databases, and connection details. You can see the status of the discovery job on the job's setup page, as well - Scroll down to the "Job Status" section and look for the bar graphs. ### Viewing MSSQL discovery job results 3) Once the job finishes, you can view the results of your database discovery. -There are a couple different ways to see the database details; the most direct is via the discovered MSSQL Application components themselves. Head to the Device42 main menu, Apps menu -> Application Components. If you don't see your SQL Server instances right at the top of the list, you can search for "SQL" to narrow the list down. +There are a couple of different ways to see the database details; the most direct is via the discovered MSSQL Application components themselves. Head to the Device42 main menu, Apps menu -> Application Components. If you don't see your SQL Server instances right at the top of the list, you can search for "SQL" to narrow the list down. + +You can see the newly discovered SQL Server instances in the example below -- Click any one of the Application Component Names for more details: + +![MSSQL Application Components](/assets/images/Apps-Application-Components-menu-annotated.png) -You can see the newly discovered SQL Server instances in the example below -- Click any one of the Application Component Names for more details: ![MSSQL Application Components](/assets/images/Apps-Application-Components-menu-annotated.png) +Scroll to the bottom, and click the database instance name to view database details: -Scroll to the bottom, and click the database instance name to view database details: ![](/assets/images/click-to-view-SQL-details.png) +![](/assets/images/click-to-view-SQL-details.png) For a rundown of the database details discovery provides, jump to the ["Available SQL database instance information"](#available-sql-database-instance-information) section. ### Another way to view SQL Database details -Results are also available by browsing to the discovered Windows server instance's CI; either search for the device from the dashboard, via "Devices -> All Devices", or view your discovery job's results / score page and jump to the servers from there: ![](/assets/images/click-success-for-discovery-scores.png) +Results are also available by browsing to the discovered Windows server instance's CI; either search for the device from the dashboard, via "Devices -> All Devices", or view your discovery job's results/score page and jump to the servers from there: + +![](/assets/images/click-success-for-discovery-scores.png) -Click any of the "device names" (right hand side) to jump to each discovered machine's details view. From the details view, you can simply click the "Services" tab to view a list of services, and can then click on the Microsoft SQL Server instance in that list. ![](/assets/images/discovery-score-to-view-1.png) +Click any of the "device names" (right-hand side) to jump to each discovered machine's details view. From the details view, you can simply click the "Services" tab to view a list of services, and can then click on the Microsoft SQL Server instance in that list. ![](/assets/images/discovery-score-to-view-1.png) ### Available SQL database instance information @@ -99,11 +106,15 @@ If your environment includes SQL cluster databases, discovery returns the follow - Does Passive Node use Log Ship - Does Passive Node use DB Mirroring -A snippet from each section of the page can be seen below: ![](/assets/images/database-list.png) ![](/assets/images/DB-Connection-Details.png) ![](/assets/images/database-size-details.png) ![](/assets/images/extra-DB-details.png) +A snippet from each section of the page can be seen below: + +![](/assets/images/database-list.png) ![](/assets/images/DB-Connection-Details.png) + +![](/assets/images/database-size-details.png) ![](/assets/images/extra-DB-details.png) ## Oracle DB Discovery (on Windows and \*nix targets) -Oracle database discovery (introduced in v16.04.00) is supported for Windows an \*nix discovery targets, and requires a separate set of credentials to authenticate to the database instance itself. Ensure these credentials have appropriate permissions to view the databases you are interested in discovering. +Oracle database discovery (introduced in v16.04.00) is supported for Windows and \*nix discovery targets and requires a separate set of credentials to authenticate to the database instance itself. Ensure these credentials have appropriate permissions to view the databases you are interested in discovering. As of v16.14.01, Device42 now supports autodiscovery on Windows and \*nix platforms for the following Oracle database versions. @@ -154,7 +165,7 @@ To get information about Pluggable Databases (PDBs) within a Container Database Be sure to fill out both sets of credentials – the first set (_Database Username / Password_) to authenticate to the Oracle database itself and the second (_Discovery Targets Credentials_) to authenticate to the Windows or \*nix server itself. -You can enter and ordered list of preferred _Discovery Target(s) Credential(s)_ when you create a database discovery job. When the job runs, it will use the credentials in the order in which you enter them, stopping at the first successful authentication. Subsequent job runs use the last successful credential and then the remaining credentials in the ordered list. +You can enter an ordered list of preferred _Discovery Target(s) Credential(s)_ when you create a database discovery job. When the job runs, it will use the credentials in the order in which you enter them, stopping at the first successful authentication. Subsequent job runs use the last successful credential and then the remaining credentials in the ordered list. ![](/assets/images/D42-21939_Oracle-db-discovery.png) @@ -164,7 +175,7 @@ You can enter and ordered list of preferred _Discovery Target(s) Credential(s)_ ### Viewing Oracle DB discovery job results -3) Once the job finishes, you can view the results of your database discovery. There are a couple different ways to see the database details; the most direct is via the discovered Oracle Application components themselves. On the the Device42 main menu, select **Apps -> Application Components**. If you don't see your Oracle DB instances right at the top of the list, you can search for _Oracle_ to narrow down the list. +3) Once the job finishes, you can view the results of your database discovery. There are a couple of different ways to see the database details; the most direct is via the discovered Oracle Application components themselves. On the Device42 main menu, select **Apps -> Application Components**. If you don't see your Oracle DB instances right at the top of the list, you can search for _Oracle_ to narrow down the list. ![](/assets/images/Oracle-Discovery-2a-4.png) @@ -200,11 +211,11 @@ If a candidate database instance is detected to be a child of a CDB we skip the ## Postgres SQL DB Discovery (on \*nix targets) -Postgres SQL database discovery (introduced in v17.11.00) is for \*nix discovery targets, and requires a separate set of credentials to authenticate to the database instance itself. Ensure these credentials have appropriate permissions to view the databases you are interested in discovering. +Postgres SQL database discovery (introduced in v17.11.00) is for \*nix discovery targets and requires a separate set of credentials to authenticate to the database instance itself. Ensure these credentials have appropriate permissions to view the databases you are interested in discovering. ### Minimum Permissions Requirements for Postgres SQL Discovery -For discovery to return detailed info about your database instance, you will need access to tables: +For discovery to return detailed info about your database instance, you will need access to the tables: * pg_database * pg_tablespace @@ -217,7 +228,7 @@ For discovery to return detailed info about your database instance, you will nee Be sure to fill out both sets of credentials – the first set (_Database Username / Password_) to authenticate to the Postgres database itself and the second (_Discovery Targets Credentials_) to authenticate to the \*nix server itself. -You can enter and ordered list of preferred _Discovery Target(s) Credential(s)_ when you create a database discovery job. When the job runs, it will use the credentials in the order in which you enter them, stopping at the first successful authentication. Subsequent job runs use the last successful credential and then the remaining credentials in the ordered list. +You can enter an ordered list of preferred _Discovery Target(s) Credential(s)_ when you create a database discovery job. When the job runs, it will use the credentials in the order in which you enter them, stopping at the first successful authentication. Subsequent job runs use the last successful credential and then the remaining credentials in the ordered list. ![](/assets/images/D42-23580_Postgres-ad-job-edit-page.png) @@ -225,7 +236,7 @@ You can enter and ordered list of preferred _Discovery Target(s) Credential(s)_ ### Viewing Postgres SQL DB discovery job results -3) Once the job finishes, you can view the results of your database discovery. There are a couple different ways to see the database details; the most direct is via the discovered Postgres application components themselves. On the the Device42 main menu, select **Applications -> Application Components**. If you don’t see your Postgres DB instances right at the top of the list, you can search for _Postgres_ to narrow down the list, or filter the list **By Category > Database**. +3) Once the job finishes, you can view the results of your database discovery. There are a couple of different ways to see the database details; the most direct is via the discovered Postgres application components themselves. On the Device42 main menu, select **Applications -> Application Components**. If you don’t see your Postgres DB instances right at the top of the list, you can search for _Postgres_ to narrow down the list, or filter the list **By Category > Database**. ![](/assets/images/postgresSQL.jpg) @@ -235,7 +246,7 @@ You can also select **Resources > Databases > On-Prem Databases** to display a ## DB2 Discovery (on \*nix targets) -DB2 database discovery (introduced in v18.02.00) is for \*nix discovery targets, and requires a separate set of credentials to authenticate to the database instance itself. Ensure these credentials have appropriate permissions to view the databases you are interested in discovering. +DB2 database discovery (introduced in v18.02.00) is for \*nix discovery targets and requires a separate set of credentials to authenticate to the database instance itself. Ensure these credentials have appropriate permissions to view the databases you are interested in discovering. ### Setting up your DB2 discovery job @@ -243,13 +254,13 @@ DB2 database discovery (introduced in v18.02.00) is for \*nix discovery targets, Be sure to fill out both sets of credentials – the first set (_Database Username / Password_) to authenticate to the DB2 database itself and the second (_Discovery Targets Credentials_) to authenticate to the \*nix server itself. -You can enter and ordered list of preferred _Discovery Target(s) Credential(s)_ when you create a database discovery job. When the job runs, it will use the credentials in the order in which you enter them, stopping at the first successful authentication. Subsequent job runs use the last successful credential and then the remaining credentials in the ordered list. +You can enter an ordered list of preferred _Discovery Target(s) Credential(s)_ when you create a database discovery job. When the job runs, it will use the credentials in the order in which you enter them, stopping at the first successful authentication. Subsequent job runs use the last successful credential and then the remaining credentials in the ordered list. ![](/assets/images/D42-25010_nix-AD-job-with-db.png) ### Viewing DB2 discovery job results -3) Once the job finishes, you can view the results of your database discovery. Discovered DB2 databases are added to the On-Prem Databases list page. On the the Device42 main menu, select **Resources -> Databases > On-Prem Databases** to display the page. If you don’t see your DB2 instances, you can search for _DB2_ to narrow down the list. +3) Once the job finishes, you can view the results of your database discovery. Discovered DB2 databases are added to the On-Prem Databases list page. On the Device42 main menu, select **Resources -> Databases > On-Prem Databases** to display the page. If you don’t see your DB2 instances, you can search for _DB2_ to narrow down the list. Click on your DB2 instance name under the _Resource Name_ column to see more information about that database. @@ -259,7 +270,9 @@ Click on your DB2 instance name under the _Resource Name_ column to see more i Device42 v18.01.00 adds a new Database discovery job type that you can use to discover information about databases in your environment. Database discovery is based on database connection information – including application components and DB server details – you supply for the job. Returned database information is added to the On-Prem Databases list page. -**Note**: If you have already discovered cloud databases using cloud autodiscovery jobs, and you then perform a Database Connections discovery using FQDN, Device42 will not duplicate the databases (which was the previous behavior). +:::note + If you have already discovered cloud databases using cloud autodiscovery jobs, and you then perform a Database Connections discovery using FQDN, Device42 will not duplicate the databases (which was the previous behavior). +::: - Select **Discovery > Database** from the main menu to display the Database discovery list page. From ef199fd0390848244be8d5165bb7fb3fe7509929 Mon Sep 17 00:00:00 2001 From: Nadia <98525884+Nadia-JSch@users.noreply.github.com> Date: Wed, 20 Dec 2023 14:32:08 +0200 Subject: [PATCH 3/3] DOCS-169 add oracle permission --- docs/auto-discovery/database-discovery/index.mdx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/auto-discovery/database-discovery/index.mdx b/docs/auto-discovery/database-discovery/index.mdx index d97f2b9a..694a3565 100644 --- a/docs/auto-discovery/database-discovery/index.mdx +++ b/docs/auto-discovery/database-discovery/index.mdx @@ -151,12 +151,14 @@ As of v16.17.00, Device42 database autodiscovery for Windows and \*nix targets s For discovery to return detailed info about your database instance, you will require read/view permissions for the following system views/tables: -
  • V$SESSION
  • V$DATABASE
  • DBA_SEGMENTS
  • DBA_OBJECTS
  • SYS.ALL_USERS
  • DATABASE_COMPATIBLE_LEVEL
  • SYS.PRODUCT_COMPONENT_VERSION
+ +
+
  • V$SESSION
  • V$DATABASE
  • V$CONTAINERS
  • DBA_SEGMENTS
  • DBA_OBJECTS
  • SYS.ALL_USERS
  • DATABASE_COMPATIBLE_LEVEL
  • SYS.PRODUCT_COMPONENT_VERSION
To get information about Pluggable Databases (PDBs) within a Container Database (CDB) in Oracle for non-DBA users, two key permission configurations are required: -- SELECT permission on the V_$CONTAINERS view. +- SELECT permission on the V$CONTAINERS view. - Set `container_data=all container=current` for context configuration. ### Setting up your Oracle discovery job