Archive

Posts Tagged ‘oracle’

Backup methods and tools for Oracle

January 20th, 2013 No comments

In order for one to get appealing results, they have higher chances of getting positive results in terms of using the best options that enable one to settle with affirmative and timely operational methods

There are different factors that promote backup frequency and they include

The rate of transaction rate

Availability of database

The value of the data company

ARCHIVELOG mode:

SQL> CONNECT sys AS SYSDBA

SQL> STARTUP MOUNT EXCLUSIVE;

SQL> ALTER DATABASE ARCHIVELOG;

SQL> ARCHIVE LOG START;

SQL> ALTER DATABASE OPEN;

 

databases in ARCHIVELOG mode:

log_archive_start         = TRUE

log_archive_dest_1        = ‘LOCATION=/arch_dir_name’

log_archive_dest_state_1  = ENABLE

log_archive_format        = %d_%t_%s.arc

 

difference between restoring and recovering?

SQL> connect SYS as SYSDBA

SQL> RECOVER DATABASE UNTIL TIME ‘2001-03-06:16:00:00’ USING BACKUP CONTROLFILE;

 

RMAN> run {

set until time to_date(’04-Aug-2004 00:00:00′, ‘DD-MON-YYYY HH24:MI:SS’);

  restore database;

  recover database;

online database backups?

ALTER TABLESPACE xyz BEGIN BACKUP;

! cp xyzFile1 /backupDir/

ALTER TABLESPACE xyz END BACKUP;

ALTER SYSTEM SWITCH LOGFILE;   — Force log switch to update control file headers

ALTER DATABASE BACKUP CONTROLFILE TO ‘/backupDir/control.dbf’;

RMAN can be operated from Oracle Enterprise Manager, or from command line. Here are the command line arguments:

 

Argument     Value          Description

—————————————————————————–

target       quoted-string  connect-string for target database

catalog      quoted-string  connect-string for recovery catalog

nocatalog    none           if specified, then no recovery catalog

cmdfile      quoted-string  name of input command file

log          quoted-string  name of output message log file

trace        quoted-string  name of output debugging message log file

append       none           if specified, log is opened in append mode

debug        optional-args  activate debugging

msgno        none           show RMAN-nnnn prefix for all messages

send         quoted-string  send a command to the media manager

pipe         string         building block for pipe names

timeout      integer        number of seconds to wait for pipe input

 

[oracle@localhost oracle]$ rman

Recovery Manager: Release 10.1.0.2.0 – Production

Copyright (c) 1995, 2004, Oracle.  All rights reserved.

 

RMAN> connect target;

 

connected to target database: ORCL (DBID=1058957020)

RMAN> backup database;

backup and restore a database using RMAN?

rman target sys/*** nocatalog

run {

  allocate channel t1 type disk;

  backup

    format ‘/app/oracle/backup/%d_t%t_s%s_p%p’

      (database);

   release channel t1;

}

 

Example RMAN restore:

 

rman target sys/*** nocatalog

run {

  allocate channel t1 type disk;

  # set until time ‘Aug 07 2000 :51’;

  restore tablespace users;  recover tablespace users;

  release channel t1;

Categories: oracle, tools Tags:

Top 10 Reasons why you should use Relational over NoSQL databases

December 31st, 2012 No comments

With the introduction of NOSQL database, many people find that it is easier to shift to these databases but this does not mean they will get all the solutions that they need. It is still important to settle with the relational databases due to a number of reasons and some of the developers find that it is easy to stick to the system.

  1. With the relational database, one is investing in a low-volume and less complex applications, which makes it easier for them to handle and this means they can start to develop this application in a matter of time
  2. With the chance to do normalization with relational database, you find that it is effect to have the duplicated volumes of data in the system that you want
  3. Switching to another database is not an easy process since you have already invested in this program, bought the services. This means that you have to let go, learn a new system, and in most cases, you find that it does not solve all the matters, that you want and this means you have to go back to the SQL method. You need to learn and find what other developers have to say before you switch to a new system
  4. Just because a system is popularized by the search engine and has good marketing methods done online, does not mean that you have the chance to trust it. This is the reason why one needs to go through the reviews and find the reasons why they need to stick to the system and if they have to switch to NOSQL< the benefits they get over the relational methods
  5. Before investing in a new system, many people find that it will not meet their needs, and gets trickier to start learning another language and develop it. This is why one needs to stick to the database they have since all have faults but one has managed to stay with them due to the effectiveness and ability to control them regardless of their issues
  6. Relational databases are known to have the best declarative syntax and strong mathematical basis compared to other systems in the market.
  7. Relational databases have a well-known language known as structured query language in short, SQL
  8. Relational databases have a good existing ecosystem introduced into the channel and this means the documentation, third party vendors, binding to other programming languages, and loads of tools.
  9. Relational databases have the ability to host different bonuses like geographical databases and mechanism
  10. The relational database offers different indexing solutions, trustworthy transactional details, and extensive security installations.

Before one settles with any new system, they need to find more about the qualities and start the comparison process. Many people want to stick with relational methods due to the programming language, the effectiveness in the security methods, easy procedures and the chance to have the developing structures in place and center the programming language to the method that developer wants, making it hard for other people to crack the codes installed.

Sources

http://programmers.stackexchange.com/questions/109192/why-nosql-over-sql

http://stackoverflow.com/questions/3713313/when-should-i-use-a-nosql-database-instead-of-a-relational-database-is-it-okay

http://stackoverflow.com/questions/4160732/nosql-vs-relational-database

http://readwrite.com/2011/06/09/when-you-should-still-use-a-re

Categories: General, mysql, NoSQL Tags: , , ,