Inserting entry in .db file from Linux shell

  • Create a text file containing necessary entries, e.g
[root@rac1 ~]# cat test.txt
ora.test.db
\92\c4\9dhard(global:uniform:ora.DATA.dg) pullup(global:ora.DATA.dg) weak(type:ora.listener.type, global:type:ora.scan_listener.type, uniform:ora.ons, global:ora.gns)\c4\c5hard(fg.DATA.DisksReady, global:uniform:ora.DATA.dg) pullup(fg.DATA.DisksReady, global:ora.DATA.dg) weak(type:ora.listener.type, global:type:ora.scan_listener.type, uniform:ora.ons, global:ora.gns)

Please note, this is a sample entry that was necessary in my case. You better know what should be there for your case.

  • Create output.db file from test.txt
[root@rac1 ~]# db_load -T -t btree -f test.txt output.db
  • Read data from output.db file to make sure that the entry is there using db_dump
[root@rac1 ~]# db_dump -p output.db
VERSION=3
format=print
type=btree
db_pagesize=4096
HEADER=END
 ora.test.db
 \92\c4\9dhard(global:uniform:ora.DATA.dg) pullup(global:ora.DATA.dg) weak(type:ora.listener.type, global:type:ora.scan_listener.type, uniform:ora.ons, global:ora.gns)\c4\c5hard(fg.DATA.DisksReady, global:uniform:ora.DATA.dg) pullup(fg.DATA.DisksReady, global:ora.DATA.dg) weak(type:ora.listener.type, global:type:ora.scan_listener.type, uniform:ora.ons, global:ora.gns)
DATA=END
Advertisement