We're here to help!

Dbvisit Replicate: Back to Basics Part II

Follow

Dbvisit-Replicate_Back-to-Basics.jpg

In Part I of this series we talked about the initial set up and some of the components of dbvrep, Dbvisit Replicate’s setup wizard. We walked through the few questions necessary before asking you about your databases. Now we will look at setting up the replication of your databases.

Step 1: Describe databases                                                                                                    ========================================                                                                                                                                              The first step is to describe the databases to use in the replication. There are usually two of them (the source and target). The questions you will come across when starting the dbvrep setup wizard are the following:
================================
Store SYSDBA and DBA passwords? Passwords only required during setup and
initialization? (yes/no) [yes]
Let's configure the database, describing its type, connectivity, user names etc.
What type of database is this?(Oracle/MySQL/Google Cloud SQL/SQL Server/Tibero/PostgreSQL/
Oracle AWS RDS/CSV/Hadoop):[Oracle]
Please enter database TNS alias: [] SDB11
Please enter SYSDBA user name: [SYS]
Please enter password for this user: [change_on_install] ********
Please enter user with DBA role: [SYSTEM]
Please enter password for this user: [manager] ********
Connecting to database SDB11 as SYSTEM to query list of tablespaces and to detect
ASM (by looking whether any redo logs or archived logs are stored in ASM).
Enter the Dbvisit Replicate owner (this user will be created by this script):
[dbvrep] dbvrepdemo
Please enter password for this user: [dbvpasswd]
Permanent tablespaces detected on the database: DATA, USERS.
Please enter default permanent tablespace for this user: [DATA]
Temporary tablespaces detected on the database: TEMP.
Please enter default temporary tablespace for this user: [TEMP]
Following databases are now configured:
1: Oracle SDB11, SYS/***, SYSTEM/***, dbvrepdemo/***, DATA/TEMP, dbvrepdemo/,
ASM:NO, TZ: +00:00
Enter the number of the database to modify it, or "add", or "done": [add]

The first question is asking if you want to store the SYSDBA and DBA users’ passwords. These passwords are only required during the initial setup. Many users prefer to have the setup wizard keep the passwords and then delete the scripts after they have successfully run.

Next we ask, what kind of database are we dealing with? We are talking about Oracle now so we type in our default, Oracle. What is your TNS alias? comes next. This is a very important question and one that should be verified. Remember in Dbvisit Replicate: Back to Basics Part I where I mentioned to verify that you are entering the proper full path of the TNSNAMES.ORA file? Now is a good time to check that file and make sure that you enter the proper TNS alias. You may also want to log into a SQL*PLUS session to double check.

Next up, we want to know about the users. The first question is about entering a SYSDBA user and password. This user and password are only needed for the initial setup scripts to run. The second user is a DBA user. It doesn’t have to be SYSTEM but it does have to be a full DBA user.

At this point the wizard will connect to the database and run a few queries. The first thing it checks is to see is if the database has the redo and/or archive logs stored in ASM. It will then query to get a list of tablespaces.

Up next is a question regarding the Dbvisit Replicate owner. Dbvrep is the default name but you can choose any name you want, this user is to be created later. This schema will own the Dbvisit Replicate meta data tables. You then get to choose the tablespace for those meta data objects as well as the temporary tablespace. Of course, these tablespaces were detected from the query that the DBA user ran above.

The last few questions that are asked are: do you want to edit the details of the database you just entered? Add another database? Lastly, have you done the whole process? Because you have only entered one database, you can click "add" to enter the second one and then you will come across the following code:

Let's configure the database, describing its type, connectivity, user names etc.
What type of database is this? (Oracle/MySQL/Google Cloud SQL/SQL Server/Tibero/Postgres/
Oracle AWS RDS/CSV/Hadoop):[Oracle]
Please enter database TNS alias: [] TDB11
Please enter SYSDBA user name: [SYS]
Please enter password for this user: [change_on_install] ********
Please enter user with DBA role: [SYSTEM]
Please enter password for this user: [manager] ********
Connecting to database TDB11 as SYSTEM to query list of tablespaces and to detect 
ASM (by looking whether any redo logs or archived logs are stored in ASM).
Enter the Dbvisit Replicate owner (this user will be created by this script): [dbvrep] dbvrepdemo
Please enter password for this user: [dbvpasswd]
Permanent tablespaces detected on the database: DATA, USERS.
Please enter default permanent tablespace for this user: [DATA]
Temporary tablespaces detected on the database: TEMP.
Please enter default temporary tablespace for this user: [TEMP]
The following databases are now configured:
1: Oracle SDB11, SYS/***, SYSTEM/***, dbvrepdemo/***, DATA/TEMP, dbvrepdemo/, ASM:NO, TZ: +00:00
2: Oracle TDB11, SYS/***, SYSTEM/***, dbvrepdemo/***, DATA/TEMP, dbvrepdemo/, ASM:NO, TZ: +00:00
Enter the number of the database to modify it, or "add", or "done": [done]

The questions for the target database are exactly the same as the ones that you previously answered for the source database. You will answer all of these questions again for every database that you add. Typically, people enter the source database first and the target database second but it does not have to be this way. For this demonstration, we are assuming that it is done in that order.

One important note, if you are doing this installation on the source database machine there is one thing you need to check. I know I have mentioned it twice already. However, after you checked that the TNSNAMES.ORA path is correct and that the TNS alias for the source database (SDB11 in my example) was set up in the TNSNAMES.ORA, now make sure that you have a TNS alias in our TNSNAMES.ORA for the target database (TDB11 in my example). Once again, make sure you have a TNS alias for the source database and target database setup on the source TNSNAMES.ORA.

As an example, let me show you the TNSNAMES.ORA on my source machine:

SDB11 =
  (DESCRIPTION =
  (ADDRESS = (PROTOCOL = TCP)(HOST = dbvlintest71.dbvisit.com)(PORT = 1573))
  (CONNECT_DATA =
  (SERVER = DEDICATED)
  (SERVICE_NAME = SDB11)
  )
  )
  TDB11 =
  (DESCRIPTION =
  (ADDRESS = (PROTOCOL = TCP)(HOST = dbvlintest72.dbvisit.com)(PORT = 1572))
  (CONNECT_DATA =
  (SERVER = DEDICATED)
  (SERVICE_NAME = TDB11)
  )
  )

This part needed to be emphasized as I have seen many people struggle with this when setting up Dbvisit Replicate for the first time.
You will notice that the very last question prompt has changed from "add" to "done". Click done and you will move to Step 2 of the setup wizard, which will be covered in the next blog in this series. Thanks for reading!

In the meantime, please have a look at our User Guides.

Have more questions? Submit a request

Comments