Tagged: Database Toggle Comment Threads | Keyboard Shortcuts

  • Mustafa 3:41 am on September 25, 2016 Permalink | Reply
    Tags: 12.1.0.2.160719, , Database, , , , , ,   

    Howto: Apply July PSU 12c Grid and DB to an Oracle 12c 2 Node RAC cluster 

    Following my previous post, here we will be applying the July 2016 PSU (Patch:23054246) 12.1.0.2.160719 on top of an existing April 2016 PSU (Patch: 22646084) 12.1.0.2.160419.

    Steps are the same, only difference is we will be apply an PSU on top of another PSU. I will assume you will go through all the prechecks listed in the previous blog.

     

    After its complete, validate that the patches went through else manually run datapatch, check how to here

    Check datapatch updated the registry

    Thats all, follow the same procedure on the other nodes in the cluster.

    Watch the video below!

     
  • Mustafa 10:13 pm on November 30, 2014 Permalink | Reply
    Tags: Data, Database, Huge, Insert, Large, , Performance Tuning, Practice, ,   

    Random SQL Data for Performance Tuning 

    I was faced with the issue of having a huge dataset at hand to observe what impact does it have on the database data structures for performance tuning. Such data is usually not available and I had to come up with a method to generate a set of insert statements with varied data. Eventhough, this might not be close to the real world environment but it does help for practice purposes.

    I went ahead and wrote a small python program that generates random  insert statements or data into a csv file. You can download the file here insertCSV.

    Execution of insertCSV

    Execution of insertCSV

     

    I won’t explain the whole program but it will suffice to that you can change the paths in the program to your needs and I used a 11 GB text file to generate it! I had split the files into 100 MB pieces using split. Make sure you have a 64 bit machine and python a 64 bit version to run it else your program will fail as 32 bit won’t be able to address the amount of memory required. Lastly, I had 16 GB of RAM available which did help, though it did not eliminate swapping.

    Once you have generated the csv file using the insertCSV file above, use bulkInsert to insert into your oracle database. You need to create a TNS_ADMIN environment variable for this to work and cx_Oracle library.

    Execution of bulkInsert

    Insertion of CSV to an Oracle Database

     

     

     

     

     

     

    A word of caution, this takes a lot a time to run. I am also assuming you can figure out where and how I got the huge data. I could upload it but its 11 GB with compression.

    I was working on a solution to port it on my GPU using CUDA. That post might come in the future.

     
  • Mustafa 6:38 pm on November 23, 2010 Permalink | Reply
    Tags: Controlfile, Database, , , , Recreate   

    Recreating Controlfile the RAC way! 

    Recreating the controlfile isn’t much of a hassle when the need arises. You might never want to recreate one until you have lost all of them. It is always a good move to backup your controlfile to trace file to save time, else you can always type it up. 🙂 Moving forward recreating the controlfile in a Real Application Cluster environment is a bit different than single node databases. And if you happen to come across articles and documents on metalink oracle the same, you might hold your head and say WHAT IS THIS. Well the procedure which I will show it isnt much of a pain.

    Follow the simple steps mentioned below and in no time your database would be up. I had to do it because recovery of the database was being comprised by missing archivelog files, so had to perform

    1. alter database backup controlfile to trace;
    2. create pfile=’/home/oracle/initsid.ora’ from spfile;
    3. Shutdown database, nodeapps, …
    4. Modify initsid.ora file and remove

    *.cluster_database_instances=2

    And change the parameter

    *.cluster_database=true

    To FALSE

    1. startup nomount pfile=’/home/oracle/initsid.ora’
    2. recreate the controlfile from the text generated in step 1 and follow the same procedure to resetlogs in the trace file.

    Just a word or caution, might seem naive to some but surely will save alot of time. While recreating the controlfile and performing a resetlogs if you forget to register the archivelogs mentioned in the trace file remember to perform cancel based recovery else your database wont open and you’ll have to restore files again.

    Have some more articles coming up so stay tuned!!

     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
shift + esc
cancel