Thursday, August 6, 2020

SOA webservices not working after 12c ERP db upgrade

After upgrading  database from oracle 11g to 12c in Oracle Apps R12.1.3,  got a strange issue where SOA webservices- SOAP, REST  stopped.

The following url showed 404

http://host.domain:8000/webservices/SOAProvider/?testquery

The issue was resolved after adding  following line in sqlnet.ora
SQLNET.ALLOWED_LOGON_VERSION=8

Had to bounce Apache, oafm after that.

utlrp hangs after upgrade to 12c ERP database

We were performing database upgrade from oracle 11g to oracle 12c with Oracle Apps 12.1.3. We faced an issue where database upgrade took < 30 mins. However, it made huge number of invalids ~170K. Compiling these invalid objects by utlrp took  several hours.  Finally was able to resolve this issue. Here is what was done-

  • Dropped non-working invalids. Database was compiling many invalids and using dblinks as there were some views/synonyms which were pointing to remote databases. Since, the dblinks were not working, so utlrp was getting struck there.
  • Increased Job queue processes- In oracle 12c,  job_queue_processes was 25 and it was taking 1 hour to compile invalids. Increased  it to 50 and invalids got compiled in half the time- 30 minutes.

Friday, July 31, 2020

Useful Mongo DB commands

Here are some very important , useful and commonly used mongodb commands in database

show dbs ->to show all the databases in mongo
use <db>                     ->to switch to the selected database
db                             ->to Show currently connected database
show collections         ->to Show all the collections(tables) in currently connected db
show users                 ->to Show all the users in currently connected db
help                         ->to show basic help
db.serverStatus()         ->to Show database info and stats
db.getProfilingStatus() ->to check Profiler status
db.shutdownServer() ->to Manually shutdown db
db.logout()                 ->to Log out from current user
db.Order.findOne() ->to find one random document in "Order" collection
db.Order.find().pretty() ->to find all documents in the "Order" collection using nice formatting.
db.Order.findOne({'firstName':'Aryan'}) ->to Find one document in "Order" collection where firstName is Aryan
db.Order.find().sort(empId:1)                          ->to find all documents in "Order" collection and Sort by key "empId"  in ascending (1) or descending (-1) order
db.Order.find().limit(5)                                 ->to find 5 documents in "Order" collection
db.Order.find().explain()                         ->to show execution plan for find query
db.Order.find().help()                                 ->to show help on collection methods
db.Order.->totalIndexSize() ->to find Index size
db.Order.getIndexes()                   ->to find Index details of a collection "Order"
db.Order.createIndex(keys, options) ->to Create an ascending Index on "Order" collection with the index field
db.Order.reIndex()                                         ->to Rebuild all indexes on a "Order" collection
db.Order.dropIndex( { "empId" : 1 } )         ->to Drop index on "order" collection  on "empId" field

rs.conf()                     ->to shows the replica set configuration 
rs.freeze()                     ->to Prevent the current member from seeking election as primary
rs.status()                     ->to show Current Status of Replica Set
rs.reconfig()                 ->to Reconfig the Replica set  using the new configuration
rs.stepDown()                 ->to change current primary member of replication set to secondary and forces an election.

db.auth('username','password') ->to validate credentials of user

db.system.profile.find().limit(12).sort( { ts : -1 } ).pretty()     ->to show 12 most recent queries from profiler
db.system.profile.find( { op: { $ne : 'command' } } ).pretty() ->to show queries except command
db.system.profile.find( { ns : 'test.documents' } ).pretty() ->to show queries against particular collection
db.system.profile.find( { millis : { $gt : 6 } } ).pretty()                 ->to show queries slower than 6 sec
db.currentop(   {     "active" : true,     "microsecs_running" : { "$gt" : 200000 }})     ->to show active queries running longer than 200ms


Hope you will find above mondb commands useful.