Wednesday, May 8, 2013
How Do You Know When to Change Jobs?
There are obvious signs, but the two most important are if you're no long learning and if you're no longer having fun.
Saturday, March 16, 2013
Learning MongoDB
Create a /etc/yum.repos.d/10gen.repo file to hold information about your repository.
[10gen]
name=10gen repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64
gpgcheck=0
enabled=1
Issue the following command as root to install the latest stable version of MongoDB and the associated tools:
yum install mongo-10gen mongo-10gen-server
These packages configure MongoDB using the /etc/mongod.conf fiile.
This MongoDB instance will store its data files in the /var/lib/mongo and its log files in /var/log/mongo, and run using the mongod user account.
From a system prompt, start mongo by issuing the mongo command.
When you query a collection, MongoDB returns a "cursor" object that contains the results of the query.
The it operation allows you to iterate over the next 20 results in the shell.
You can manipulate a cursor object as if it were an array.
You can constrain the size of the result set to increase performance by limiting the amount of data your application must receive over the network. To specify the maximum number of documents in the result set, call the limit() method on a cursor.
[10gen]
name=10gen repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64
gpgcheck=0
enabled=1
Issue the following command as root to install the latest stable version of MongoDB and the associated tools:
yum install mongo-10gen mongo-10gen-server
These packages configure MongoDB using the /etc/mongod.conf fiile.
This MongoDB instance will store its data files in the /var/lib/mongo and its log files in /var/log/mongo, and run using the mongod user account.
From a system prompt, start mongo by issuing the mongo command.
When you query a collection, MongoDB returns a "cursor" object that contains the results of the query.
The it operation allows you to iterate over the next 20 results in the shell.
You can manipulate a cursor object as if it were an array.
You can constrain the size of the result set to increase performance by limiting the amount of data your application must receive over the network. To specify the maximum number of documents in the result set, call the limit() method on a cursor.
Thursday, February 14, 2013
Creating an 11.2.0.2 RAC Logical Standby Database
Yesterday I created an 11.2.0.2 RAC logical standby database for an 11.2.0.2 RAC primary database. Here are the steps.
You create a logical standby database by first creating a physical standby database and then transitioning it to a logical standby database. So first I created a physical standby database "belmont" for primary database "gilroy":
SQL> SELECT db_unique_name,name,open_mode,database_role FROM v$database;
DB_UNIQUE_NAME NAME OPEN_MODE DATABASE_ROLE
------------------------------ --------- -------------------- ----------------
belmont GILROY MOUNTED PHYSICAL STANDBY
Before converting it to a logical standby, you need to stop Redo Apply on the physical standby database:
SQL> alter database recover managed standby database cancel;
A LogMiner dictionary must be built into the redo data so that the LogMiner component of SQL Apply can properly interpret changes it sees in the redo. To build the LogMiner dictionary, issue the following statement on primary database:
SQL> EXECUTE DBMS_LOGSTDBY.BUILD;
All auxiliary instances have to be shut down and disable the cluster on the target standby if your standby is a RAC (in my case). Shut down all but the instance on which the MRP was running (your actual target instance). Once they are all done, then disable the cluster and bounce the standby:
SQL> alter system set cluster_database=false scope=spfile;
SQL> shutdown immediate;
SQL> startup mount exclusive;
Now you are ready to tell MRP that it needs to continue applying redo data to the physical standby database until it is ready to convert to a logical standby database:
SQL> alter database recover to logical standby fremont;
In above statement, you changed the actual database name of the standby to "fremont" so it can become a logical standby database. Data Guard will change the database name (DB_NAME) and set a new database identifier (DBID) for the logical standby.
At this point, you can re-enable the cluster database parameter, if you had a RAC, and then restart and open the new logical standby database:
At this point, you can re-enable the cluster database parameter, if you had a RAC, and then restart and open the new logical standby database:
SQL> alter system set cluster_database=true scope=spfile;
SQL> shutdown;
SQL> startup mount;
SQL> alter database open resetlogs;
Issue the following statement to start SQL Apply in real-time apply mode using the IMMEDIATE keyword:
SQL> alter database start logical standby apply immediate;
Tuesday, January 8, 2013
Subscribe to:
Posts (Atom)