[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

script perl for generate oracle tnsnames.ora in csv file

Posted on 2012-04-03
9
Medium Priority
?
1,303 Views
Last Modified: 2012-08-14
Hello,

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

Thanks

Regards
0
Comment
Question by:bibi92
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 7

Expert Comment

by:ZShaver
ID: 37803593
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 tnsnames.org from a CSV file?
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 37804112
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.
0
 
LVL 23

Expert Comment

by:David
ID: 37804230
Also agree.  If the tnsnames syntax is throwing you, check out http://www.orafaq.com/wiki/Tnsnames.ora -- one of many sources, and simpler than some.
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 

Author Comment

by:bibi92
ID: 37804865
Hello,

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

Thanks

bibi
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 37805694
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.
0
 

Author Comment

by:bibi92
ID: 37806284
Hello,
Are you wanting to take a CSV file and create a tnsnames.ora file using Perl --> yes.

Thanks a lot

Regards

bibi
0
 
LVL 77

Expert Comment

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

Please provide sample input.
0
 

Author Comment

by:bibi92
ID: 37810246
alias = (ADDRESS = (PROTOCOL = TCP)(HOST = server)(PORT = 101)) ---> tnsnames.ora

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

Thanks

bibi
0
 
LVL 77

Accepted Solution

by:
slightwv (䄆 Netminder) earned 2000 total points
ID: 37810836
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:
http://perl.about.com/od/filesystem/a/perl_parse_tabs.htm

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

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

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question