Oracle10g: Manual standby database (initial approach)

An Oracle database in Standby is an exact copy of an operational database on a remote server, used as a backup, and copy for reference, disaster recovery, etc..

A database in the Standby mode is more than a normal backup because it can be put into production disaster in less time than if we had to restore a copy (either from a simple rman or export).Restore a copy from file takes time, and during this period the system is unavailable. With an additional database in standby mode there is nothing (or almost nothing to restore) in case of disaster. Within minutes, allowing the change is continuity of service. It offers the performance advantages of a cluster or safety of the mirror but the ratio of costs versus benefits and leave time seems right to me.

From a global perspective:

"We have a copy of the database remotely, we can count as a second set of copies. "Unlike a simple backup, the copy is kept alive and the data is updated more frequently. "In a disaster we can use in minutes, without waiting to restore a full backup, either logical (export) or physical (RMAN). -Serves as a more realistic test environment to test patches and estimated time. The volume of data is identical. "I understand that a standby database can use up to 10 days a year without license fee (though you look at where Microsoft leaves 30 days ...)

From a technical standpoint:

"Changes in the primary database are captured in the redo log files. Redo-files are not permanent, are overwritten by rotation (in this state is not yet copied to the second server). "It makes a copy of redo log. The permanent copy log file is called. "The archive logs (copies of redo log) is transferred to the standby server. In systems such as Linux can do this by rsync. -Apply the archive logs are transferred to the standby database will be updated.

Globally the steps to mount the kiosk can be:

1. Set the primary database to run in archivelog mode.

2. Prepare a script to make a hot copy (using rman).

3. Create a standby control file (control file) in the main database.

4. Copy everything (configuration file, and copy control rman) on the second server (where we mount the database in standby).

5. Reconfiguring routes (DB_FILE_NAME_CONVERT in init.ora or using small hand).

6. Starting the second database mount standby database mode.

7. Restore Data (recover database).

8. Synchronize periodically (cron) transporting (rsync?) And applying the archive logs.

 

In another post I will try to go into more detail with an example ...and utilities that you can give.

 

 
Google
 
     

Similar entries

  • It may happen that after you install or configure a new Oracle database we realize that the character set chosen during installation is not correct. What we may happen in cases like this is to delete the database and reconfigure it or worse ...But you do not. We can change the character set stopping the database, looking up strictly by changing the settings and restart the database. Howto:
     

    - First we connect to the database 

    $ sqlplus sys/pwd@prod as sysdba
     

    - We stop the database 

    SQL>SHUTDOWN IMMEDIATE;

     

    - We raise strictly * 

    SQL>STARTUP MOUNT;
    SQL>ALTER SYSTEM ENABLE RESTRICTED SESSION;
    SQL>ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
    SQL>ALTER DATABASE OPEN;

    - Change the character map 

    SQL>ALTER DATABASE CHARACTER SET <new characters map>;

    - Restart the database and yata 

  • "Without knowing how easy the item may seem difficult"

    Creating a database link to point to an oracle database to another in principle is easier, if you read the post dataprix Remote access through Oracle dblink . The pity is that in this post do not say anything about the global_names of each database and rename the dblink as if global_names are active.

    Example.

    1. We created the dblink to a dummy database hr (after having configured tnsnames ...):
      create database link connect to rrhh dblinkrrhh recursoshumanos IDENTIFIED BY USING 'HR';
    2. Consult your name and surprise is not called if DBLINKRRHH.REGRESS.RDBMS.DEV.US.ORACLE.COM dblinkrrhh. We can see with the following query:
      select * from dba_db_links;

      Now what?

  • The easiest way to access from an Oracle database to objects of another Oracle database is using a DBLink (this does not mean that it is always the most desirable, abuse of DBLinks can generate both performance as security problems).

    First, you need a user who holds the create database link privilege. Then, you can create DBLink in source database (A) through this simple sentence:

    • create database link lnk_from_A_a_B connect to user identified by password using 'B';

    - 'lnk_from_A_a_B ' is the link name,

    - 'user' and 'password' are the user identifiers who will use the link to connect.

    - 'B' is the SID of the target database.

    Through this DBLink you can connect with objects in the remote database with privileges owned by the user of the creation sentence.

    To reference an object of the remote database should indicate object name concatenated with '@' and the DBLink name.

    Example: select * from mytable@lnk_from_A_a_B

  •  

    MySQL has some special features when making a connection from a remote client that if we do not know can complicate access to a MySQL database from a different machine that hosts the database.

    With other databases such as Oracle or SQL Server, once that no firewall or anything like that prevents us from the client machine access to the server, using normally data acces from a database user we can 'enter'.

    With MySQL, although access to the port, usually 3306, is open, the database can be configured to shut out external connections, and the result is the same as if the port was closed by a firewall:

     

    telnet mysql.dataprix.es 3306
    Trying 188.166.233.199...
    telnet: connect to address 188.166.233.199: Connection refused
    telnet: Unable to connect to remote host

     

    If you get this result should consult the file /etc/my.cnf, and checking for bind-address variable or skip-networking.

    If skip-networking is and is not discussed, edit the file and delete it, or make a comment to have no effect and allow external connections:

     

  • If you have the system user who installed the database you can enter SQL Plus as DBA user, without entering a password as follows:

    1. Enters the system with this user. 
    2. From the command line, go into SQLPlus typing:

    > sqlplus "/as sysdba"
    

    If you need to enter using this way because you forgot the password of a user, you can easily change it: 

    SQL> alter user user_name identified by new_password;
    

    It can be more than one Database installed on the server, so you have to validate that the environment variables of the Oracle's user are pointing to your database.

    For verifying that you has login into the correct database you can execute this statement: 

    SQL> select name from v$database;