script perl for generate oracle tnsnames.ora in csv file


I search a script perl for generate oracle tnsnames.ora in csv file.


Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

The grammar and poor word placements in this question makes it impossible to determine what you are trying to do, sorry.

From my understanding, and it took me several minutes to piece this together, you want to search a perl script to determine how it generates oracle's from a CSV file?
slightwv (䄆 Netminder) Commented:
I agree.  Can you explain what you are wanting?

A perl script, tnsnames.ora file and a CSV file really have nothing to do with one another.
DavidSenior Oracle Database AdministratorCommented:
Also agree.  If the tnsnames syntax is throwing you, check out -- one of many sources, and simpler than some.
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

bibi92Author Commented:

I search to format tnsnames.ora in a csv file with a perl script.


slightwv (䄆 Netminder) Commented:
That explaination does not help.

Are you wanting to parse the tnsnames.ora file and create some CSV using Perl?
Are you wanting to take a CSV file and create a tnsnames.ora file using Perl?

Are you wanting to do something completely different?

Maybe some sample data and expected results would help us understand what you want to do.
bibi92Author Commented:
Are you wanting to take a CSV file and create a tnsnames.ora file using Perl --> yes.

Thanks a lot


slightwv (䄆 Netminder) Commented:
>>Are you wanting to take a CSV file and create a tnsnames.ora file using Perl --> yes.

Please provide sample input.
bibi92Author Commented:
alias = (ADDRESS = (PROTOCOL = TCP)(HOST = server)(PORT = 101)) ---> tnsnames.ora

alias;server;port ----> csv file


slightwv (䄆 Netminder) Commented:
There are a TON of scripts out there on parsing a CSV file using Perl (even though your file is semi-colon delimited not comma).

The example below uses SPLIT:

I don't have Perl to test it but it should go something like:

 open (FILE, 'myfile.csv');
 while (<FILE>) {
 ($alias, $server, $port) = split("\t");
 print "$alias = (ADDRESS = (PROTOCOL = TCP)(HOST = $server)(PORT = $port))
 close (FILE);

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.