lasasdj.blogg.se

Tns file converter
Tns file converter








tns file converter
  1. TNS FILE CONVERTER HOW TO
  2. TNS FILE CONVERTER CODE
  3. TNS FILE CONVERTER DOWNLOAD

Just use the ‘-d’ option to set a different default domain, for a particular execution.

tns file converter

If you have different sets of Net Service Names, that you want to fall under different domains, you don’t need to recompile the source before each run. Simply edit this, to reflect your appropriate default domain, and recompile the program. #define DEFAULT_DOMAIN " dc=proquest,dc=com" Look for a line in tns2ldif.c that looks like this:

TNS FILE CONVERTER CODE

If you edit the C source code in your favorite text editor, towards the top there is a #define for DEFAULT_DOMAIN, that allows you to set the domain that you’d like it to use. Second, since there is no logic to handle domains, when it generates the LDIF output, it assumes a default domain. There is a version 2 of this utility in the works, which should be able to deal with this, but it’s not available yet.

tns file converter

So, I have “mydb1”, “mydb2”, “thisdb”, “thatdb”. So, all Net Service Names are unique, and do not specify a domain.

TNS FILE CONVERTER HOW TO

First, if any of your Net Service Names have a domain specified, it won’t know how to deal with that. i didn’t want to have to convert over 250 Net Service Name definitions to LDIF format by hand, and it gave me an opportunity to brush up on my C programming skills. Tns2ldif is a very simple utility that I wrote to “scratch an itch”. Any output that you see on the console would be an error message written to stderr. (In less than a second.) In the example run above, stdin and stdout are being redirected to files, so, you should not see any output to the console. Unless you have a truly enormous tnsnames.ora file or glacially slow I/O, the program should run very quickly. So, a sample execution, with an input file called tnsnames.ora and output file called tnsnames.ldif, would look like this: As such, the program reads from stdin and writes to stdout. This program is written as a filter, as many Unix/Linux utilities are. Once the program is compiled, executing is a fairly straightforward task, as well. You don’t need a makefile for this program, the default make rules should do the job without any issues.

TNS FILE CONVERTER DOWNLOAD

You should download tns2ldif.c, and then compile it.īut, before I continue, I’d like to take a brief moment to thank my management at ProQuest, especially Roger Valade, for allowing me to open source and publish this work.Ĭompilation can be achieved with the following command: I wrote a small C program (less than 100 lines), that’s a filter, that will convert your tnsnames.ora file to LDIF format. So, I wrote a small C program, that I called tns2ldif, for this task. In my case, I had approximately 250 Net Service Names, that I needed to load. We’ve reviewed the LDIF format for Net Service Names, but, unless you have a very small number of Net Service Names, converting them from tnsnames.ora format to LDIF format could prove to be a very tedious task, indeed. So, now you’ve come this far, you probably have a whole list of Net Service Names that you want to load into your LDAP server. You should now have a correctly installed and fully configured LDAP server, that’s up to the task of doing Net Service Name resolution. This is part 4 of a multi-part blog post on using OpenLDAP for Net Service Name Resolution.










Tns file converter