Wednesday, May 8, 2019

Ansible for TNS management

TNS Management involves the following modules developed:

TNS entry addition
TNS entry deletion

If we make the first 2,then eventually the TNS update should be possible.

TNS addition:
1) Create a directory under $OH as follows
$OH/network/admin/TNS_Ansible

2) Whenever we add a TNS entry create a temp file tnsadmin.ora with the TNS entry under the above directory

3) Set TNS_ADMIN directory to the new ansible directory created and test weather the tnsping works fine.

4) If it does work, append this entry directly from this temporary TNS file to the original file and test weather the tnsping still works.

5) Archive the temporary tnsadmin.ora under the TNS_Asnible directory with a date directory, so it can be used for troubleshooting purpose later.

TNS deletion:
1) Backup tnsnames.ora to TNS_Ansible with time stamp

2) find out the starting and ending line # of the TNS entry to be deleted, then perform the deletion

3) Try tnsping to ensure the tnsping fails

4) Also perform a diff to verify that the backed up TNS and the actual TNS files differ only by the entry we deleted.

TNS update:

Merge of the above 2 actions...
1) Perform deletion
2) Perform new entry addition.

This is the outline of the action, as soon as the code is available, will publish.

Thanks




No comments:

Post a Comment

Flashback data archive steps

 Objective: Ways to track DML changes in a table Detailed objective: We should be able to track the changes in the table at any point in tim...