How does this connectString be written?

I want to connect Oracle whit occi.
Because I do not have files that "sqlnet.ora" and "tnsnames.ora", I must write the connectString properly.
login Service
User Id: root
Password : 123456
login Oracle DB
User Id : oracle
Password: 654321
SID: mydb
IP and Port
192.168.0.1:1521
My first connectString :
env->createConnection ("oracle", "654321", "root/[email protected]:1521/mydb");
But,I get the error:
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
the file "listener.log" :
16-MAY-2008 17:19:19 * (CONNECT_DATA=(SERVICE_NAME=[email protected]) (INSTANCE_NAME=mydb)(SERVER=1521)(CID=(PROGRAM=connectoracle)(HOST=ubuntu)(USER=gxl))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.148)(PORT=46185)) * establish * [email protected] * 12514
TNS-12514: TNS:listener could not resolve SERVICE_NAME given in connect descriptor

Hello,
I am getting following error -
terminate called after throwing an instance of 'oracle::occi::SQLException'
what(): ORA-01017: invalid username/password; logon denied
Aborted
This is code -
#include<occi.h>
using namespace oracle::occi;
int main()
Environment* env = Environment::createEnvironment();
Connection* conn = env->createConnection("oracle", "oracle","orcl");
env->terminateConnection(conn);
Environment::terminateEnvironment(env);
I have sqlnet.ora and tnsnames.ora in $ORACLE_HOME/network/admin
Also; I am able to connect to "orcl" as
sqlplus oracle as sysdba
Can someone help how to connect to database from OCCI application? What are prerequisite configurations (I read documentation but could not find any help from it :-( )

Similar Messages

  • Under search in maps, names come up that aren't in my contacts. How does this happen?

    Under search history in the Maps app,...along with all the other places I
    did search for, some addresses comes up that I'm not familiar with, and they stay
    there. In some cases I didn't search for them at all. Some I may have. A name also
    appears, under the address, like "from John Doe". It’s a name that
    I'm familiar with my email, but is not in my contacts. Why and how does
    this happen?
    For example, a person I receive emails from for work, came up as the
    "from", and the address, after I searched for it (not on my phone).....I found out
    it was the address of his company, I place I've never searched for, nor is
    there a hyper-link to it any emails/websites that I could have clicked on
    accidentally.
    In another example, the beginning of an address “5165” which I may have searched
    for and starting typing in came up in the history with several locations that
    start with those numbers. Most of them say “from current location”, but one says from
    a name, whom again I’m familiar with by email, but is not in my contacts and
    have no idea of why the name would be somehow connected to the address.

    Thank you for the reply. I really appreciate it. Do you know why the names are attached, as "from"?
    I attached a screen shot image. "Harry" and "Angela" are not contacts in my phone. Who would their names get there?

  • My iPhone was stolen and I have contacted the police who are using the meid number to locate.  How does this work and what are my chances of getting the phone back?

    My iPhone was stolen.  I used Find My iPhone app to lock it and display a message.  The phone has not connected to the internet to locate it.  I contacted the police and they have taken my meid number.  How does this work and what are my chances of getting the phone back?  Are there other ways the theif can use it.  I was told once they put in a new sim card and use it, whatever software the police have, it will show up.

    Honestly? In the US (I can't speak to other countries, though I doubt it works much differently in a lot of the world) The police took your report and filed it either in their computers or, on paper. They will now not think of this again. The only time it will cross anyones mind is if, in the course of entering information into evidence about items recovered or seized at a crime scene, the serial number of an iPhone that was found/seized happens to match yours, in which case you will be contacted.
    The police in the US can and will do nothing to 'blok' the phone and it's not worth their time to try and locate it unless you know for a fact that it was stolen by a big time drug lord, master criminal, or some other such prime target and they can get a court order to track the location of the phone in order to locate this individual for your own purposes.  If they do that, they'll probably keep him under surveilance for a year or so before they act.
    Basically, the police don't care about your phone. If they find it, they will give it back to you. They are not, however, going to go looking for it. They have better things to do.
    I'm sorry, but that's the way it is.

  • Was told a USB device would create a PDF automatically from the data contained within when plugged into my USB port. Doesn't seem to work. How does this work and how can I fix the device I received?

    Acrobat is not on the USB device - only Adobe Reader needed on the PC. How does this work? How can I fix this device if at all?

    You need to ask the people who sold it to you. Doesn't sound like it has anything to do with Reader.
    However, you should be wary of devices that automatically try to open files when plugged in. They can also infect your computers with all kinds of viruses or malware.

  • HT2357 So how does this work on Mountain Lion? I cannot seem to ignore the iTunes 11 updates, which now seem to appear every 5 minutes!!

    So how does this work on Mountain Lion? I cannot seem to ignore the iTunes 11 updates, which now seem to appear every 5 minutes!!

    Fantastic!  Didn't work at first so restarted App store and tried again.  This time it asked 'ignore update'.  All gone!

  • How does this work with multiple systems backing up with time machine

    I was wondering as Apple states that this will do multiple time machine backups as in multiple computers, how does this do this? I am assumng that it will require me to partition the srive in the unit as multiple partitions. 1 for each time computer with time machine running.

    I'm sorry, I'm not quite sure how to interpret your answer so I'll ask for clarification.
    Do you mean that the backup belonging to each user will be protected by filesystem perms? In other words Alice's backup will be owned by Alice and only readable by her, ditto for the hyperthetical Bill?
    I guess in other words, does Time Machine preserve file ownership perms?

  • TS1425 My co worker has given me his iPod to take home and transfer his music to my laptop, however, I am unable to access his music to download it to my computer.  How does this work?

    My co-worker has given me his iPod to take home and transfer his music to my laptop, however, I am unable to access his music to download it to my computer.  How does this work?

    You need to transfer the iTunes Library from the most recent backup you made before the hard drive was replaced.
    You can't transfer the full iTunes Library from the iPad back to iTunes.
    There are third-party Windows applications that will transfer data from an iOS device, but they don't re-create the iTunes Library exactly as it was before.

  • I was using my notes earlier today and now for some reason they are all gone. How does this happen and is there anything I can do to get them back, the new ones also that haven't been synced.

    I was using my notes earlier today and now for some reason they are all gone. How does this happen and is there anything I can do to get them back, the new ones also that haven't been synced.

    See Recover your iTunes library from your iPod or iOS device.
    tt2

  • How does this IMPORT statement works

    can any one tell me how does this statement will work..
    I am wokring on Solution manager system , where in there is a function module SSF_FIELD_LIST
    to which system passes form name.
      import fields to fieldlist
             from database stxfcontr(sf) id l_fullname.
    stxfcontr is a table which contains value of in  a diff
    Regards,
    mayank

    It will import data object stored in memory under named fields to your custom data object fieldlist .
    The table which it is stored is name stxfcontr under RELID (memory area) SF .
    Cluster key (key of the entry) in that table is behind var l_fullname
    Anyhow I think [this link|http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3bf8358411d1829f0000e829fbfe/frameset.htm] is more that any explanation. Once you study it, you will understand the above.
    Regards
    Marcin

  • How does this happen: The picture of recent apps you get when double clicking the home button showed in Settings-Wifi that I had been connected to a network I have not been near for two months. Its not a recent "image" of Settings-Wifi. Can anyone explain

    How does this happen: The picture of recent apps you get when double clicking the home button showed in Settings-Wifi that I had been connected to a network I have not been near for two months. Its not a recent "image" of Settings-Wifi. Can anyone explain?

    Greetings,
    I've never seen this issue, and I handle many iPads, of all versions. WiFi issues are generally local to the WiFi router - they are not all of the same quality, range, immunity to interference, etc. You have distance, building construction, and the biggie - interference.
    At home, I use Apple routers, and have no issues with any of my WiFi enabled devices, computers, mobile devices, etc - even the lowly PeeCees. I have locations where I have Juniper Networks, as well as Aruba, and a few Netgears - all of them work as they should.
    The cheaper routers, Linksys, D-Link, Seimens home units, and many other no name devices have caused issues of various kinds, and even connectivity.
    I have no idea what Starbucks uses, but I always have a good connection, and I go there nearly every morning and get some work done, as well as play.
    You could try changing channels, 2.4 to 5 Gigs, changing locations of the router. I have had to do all of these at one time or another over the many years that I have been a Network Engineer.
    Good Luck - Cheers,
    M.

  • In Mac Mail on OS 10.5.8 I am receiving bogus emails which claim to be sent by people in my address book, but actually are not.  How does this happen and how can I correct this problem

    n Mac Mail on OS 10.5.8 I am receiving bogus emails which claim to be sent by people in my address book, but actually are not.  How does this happen and how can I correct this problem

    You said:
    I am receiving bogus emails which claim to be sent by people in my address book, but actually are not.
    ...and:
    Are you saying that my address book has not been hacked into?  That others are getting these email addresses from another source?
    This confuses me.  Are you saying that you are receiving bogus e-mails from some of your contacts, or are you saying that they are receiving bogus e-mails from you?
    If the latter, there are a number of reasons that people might be getting e-mail from you.  Malware, though technically possible, is extremely unlikely.  See Someone is sending messages from my e-mail address!
    If the former, that's rather unusual.  The only decent explanation I can think of is that a bunch of your Windows-using contacts got infected with something and their machines are being used to spam everyone in their contact lists, which would include you.

  • How does this make any sense??

    My husband gets the three bureao FICO subscription....this is on his credit report under "negative factors" HOW does this make ANY sense?!? It has "too many credit accounts with balances" as a negative factor...he has one credit card.... You have too many credit accounts with balances.EquifaxThe FICO® Score considers the number of accounts on a credit report showing a balance.Generally speaking, carrying fewer accounts with balances is considered less risky.For credit cards , your credit report may still show a balance on those cards - even if they are paid off in full each month. The total balance on the last statement is generally the amount that is shown on a credit report. NUMBER OF YOUR ACCOUNTS CARRYING A BALANCE Equifax1 accountFICO High Achievers have an average of 3 credit accounts carrying a balance.

    I think they're trying to say that he doesn't have enough accounts and with only one reporting (with a balance of course), that's their common answer.

  • HT3702 I reported a problem and I got a confirmation saying that my money was refund, I have't received anything yet. How does this work?

    I  reported a problem and I got a confirmation saying that my money was refund, I have't received anything yet. How does this work?

    It should be added either to your iTunes account, or possibly to your credit card if the purchase was made on with it.
    How long ago did you get the email ? It may take 48 hours for it to appear - if it's been longer than that and you can't see it on your iTunes balance (and you've tried logging out and back into the account to see if the balance updates) nor on your credit card then try contacting Support again, and include your case number if you have one.

  • Now what do I do with this?  How does this solve my problem?

    Now what do I do with this?  How does this solve my problem with Adobe Photoshop Elements 10

    And exactly what? You need to be a lot more specific.
    Mylenium

  • My number has been showing up as calling people while in my possession and sometimes off.  How does this happen?  How do I stop it?

    My number has been showing up as calling people while in my possession and sometimes off.  How does this happen?  How do I stop it?
    I've tried to contact facebook support and been trying to get on live chat for hours to no avail.  Please help me stop annoying people.

    A month ago I received a spoofed call at 6A - obviously I was not happy. Came from 000-0000000 as I recall.
    Tonight I had two irate people call me minutes apart saying I called them - I was eating dinner with my wife with my phone turned off in our eye-sight.
    I cannot believe that we allow spoofing software and spoof cards these days, with only a crime if someone asks for money or does some similar fraudulent activity.

Maybe you are looking for

  • Can't get Photos to display!?

    I had 24 pictures synchronized onto my 2gb ipod nano on the first day I bought it. They worked fine and the slideshow was well. They we're later deleted to put new photos on. I have not touched any folders/settings on my ipod. The Photo Library does

  • Manual deployment

              is there any way to manually deployed an EAR or EJB JAR file           without using the Admin Console?           i've got large JAR files and would like to have them copied           to staging directories on each managed servers prior to

  • After upgrade to 10.6.8 Internet is much slower

    Hello, after upgrading to Mac OS X 10.6.8, my Internet works much slower, with all my browsers (Safari, Firefox, Chrome). I downloaded and installed the combo, and I switched IPv6 to off; both didn't work. (I have a DNS server in my list. There is en

  • Update random rows in sql table

    Do not ask me why but I have to do it and I would greatly appreciate any help. Let us say that I want to update column foo_column of a table foo. The selection criteria is foo_selection_criteria. So my sql to update would be something like: update fo

  • Scriptaculous Menu's won't work properly in Safari 2.0

    http://ghost.kitpistol.com However, they do work in Firefox, and Safari 3.0. Anybody know what's going on? They're just using a simple toggle effect. Thanks - josh Message was edited by: vaultingat