Pro*C and not logged in error

Hi,
i tried rewriting the sample1.pc code so i could test it on a
client machine connecting to a DB host.
this is what CONNECT looks like:
EXEC SQL CONNECT :username IDENTIFIED BY :password
AT :hostname USING :dbsid;
then when i run:
[oracle@xonos proc]$ ./sample1
Connected to ORACLE as user: SCOTT
Enter employee number (0 to quit): 7900
ORACLE error--
ORA-01012: not logged on
i can run:
sqlplus scott/tiger@obiwan (obiwan is my DB server name)
it works fine.
any info would be most helpful.
thanks ahead of time,
-- adam
null

well, i find an Pro*C book and i saw what i was doing wrong.
the "using" is the host name, but i still do not know what "at"
is for, but i got more program working....
Adam (guest) wrote:
: Hi,
: i tried rewriting the sample1.pc code so i could test it on a
: client machine connecting to a DB host.
: this is what CONNECT looks like:
: EXEC SQL CONNECT :username IDENTIFIED BY :password
: AT :hostname USING :dbsid;
: then when i run:
: [oracle@xonos proc]$ ./sample1
: Connected to ORACLE as user: SCOTT
: Enter employee number (0 to quit): 7900
: ORACLE error--
: ORA-01012: not logged on
: i can run:
: sqlplus scott/tiger@obiwan (obiwan is my DB server name)
: it works fine.
: any info would be most helpful.
: thanks ahead of time,
: -- adam
null

Similar Messages

  • THE DATABASE CONNECTION IS LOST :;; WIERD  ORA-01012 NOT LOGGED ON ERROR

    ERROR: ORA-01012 NOT LOGGED ON ERROR
    I AM USING A JAVA SWING INTERFACE (JDK 1.1.8), WHICH USES JNI TO CALL C PROGRAMS WHICH IN TURN CONNECTS TO THE DATABASE, ORACLE 8.1.6.
    A DATABASE CONNECTION IS ESTABLISED IN THE MAIN CLASS BY CALLING A FUNCTION FROM THE CONSTRUCTOR.
    FOR ALL OTHER FUNCTION CALLS WHICH ARE MADE FROM WITHIN THIS CONSTRUCTOR, THE CONNECTION STAYS.
    BUT AFTER THE CONTRUCTOR CALL IS COMPLETE, DATABASE CONNECTION IS STRANGELY LOST. THUS ALL OTHER FUNCTION CALLS FAIL BECAUSE OF CONNECTION ISSUES GIVING ORA-01012. THOUGH IF I CHECK UP IN THE DATABASE, THE CONNECTION DOES FIND AN ENTRY.
    SO IT APPEARS THAT SOMEHOW THE JAVA INTERFACE LOOSES TRACK OF CONNECTION. BUT STRANGELY ALL THE FUNCTIONS WORK IF CALLED FROM THE CONSTRUCTOR......... BUT THATS NOT THE IDEA.
    PLEASE HELP, THIS PROBLEM IS BUGGING ME FOR WEEKS NOW.
    THANKS
    AMIT

    apologise for the caps lock.
    i am working on a previous system with java swing front end which alread uses jni, and connects to database using pro *c.
    My problem is that the connection is lost as soon as the constructor of the main class is run, giving an
    ORA-1012 NOT LOGGED ON ERROR.
    But if i place the same calls in the contructor all the database call work.
    It somehow appears that the java interface looses the connection context. Though the session does find entry in the oracle dynamic tables as long as i dont close the front end main window, thereby meaning that its the jave interface which looses the context.
    part of the code of the main class eiquser.
    //constructor
    public EiqUser() {
         super();
         initMRI();
    private void initMRI() {
         try {
              /* initialize geoManager environment */
              int rccc = new EiqCfuncs().eiqInitEnv();
    //eiqinitenv is a c function which connects to database using pro *C
              EiqCfuncs cfuncs = new EiqCfuncs();
              //EiqCfuncs has the prototypes of c functions used bye the java interface
              this.ivjFileMenu.setText(cfuncs.eiqGetText(resNum.getTEXT_FILE_MENU())); // sets the menu name
    and so on.........
    public void eiqUser_WindowClosed(java.awt.event.WindowEvent windowEvent) {
         new EiqCfuncs().eiqTermEnv(); // gives ora-1012 error
    //eiqtermenv is supposed to disconnect from data base, but returns an ora-1012 not logged on erro
         return;
    //eiqtermenv closes the connection with the data base. But fails in this case. if i place the same call ( eiqtermenv) in the initMRI function or the contructor it succeeds.
    Plus if i dont use the java interace and use a c stub for executing the same sequence of functions, then i dont face any problems.
    the proc calls exectuted ultimately by...
    :::eiqinitenv
    exec sql connect using :sqlid identified by sqlpw; // succeeds giving sqlerr.sqlcode=0;
    ::::eiqterm env
    exec sql commit work; //fails giving 0ra-1012 error
    exec sql rollback work;
    Why is the java interface loosing track of the connection once done with the constructor of the main class?? The session still finds an entry in the oracle dynamic tables.
    Please help
    Thx
    Amit

  • Time Machine couldn't complete the backup to "Time Capsule. The backup disk image /Volumes/Data/MacBook Pro.sparsebundle could not be created (error 60)"

    We are Mountain Lion using Time Machine to backup to Time Capsule. When the backup tries to run, an error appears after a couple of minutes saying "The disk you inserted was not readable by this computer." Then an error shows up saying "Time Machine couldn't complete the backup to "Time Capsule.The backup disk image /Volumes/Data/MacBook Pro.sparsebundle could not be created (error 60)"
    I low level reformatted the Time Capsule and that didn't fix it. I then tried using Time Machine on another computer to back up to that same Time Capsule and it worked- so I'm doubting it's the Time Capsule.
    I've noticed that when Time Machine runs, that a  folder called Data  at /Volumes/ appears while Time Machine is trying to back up. I think it's making the sparsebundle to transfer to the Time Capsule.
    However, after a couple of minutes- it comes back saying that the disk is unreadable.
    I think it's something wrong with either creating the sparsebundle or opening the disk image that seems to be a part of the Time Machine backup process on the local drive. 
    I am able to create a disk image with Disk Utilitiy without any problem on that system. I've repaired the disk and disk permissions with Disk Utility and replaced the directory with Disk Warrior. I've trashed what preference files I could find and restarted. I've completely removed the backup destination from the computer and added it back again.
    Help!
    Thanks,
    Neil

    neillhowell wrote:
    I've noticed that when Time Machine runs, that a  folder called Data  at /Volumes/ appears while Time Machine is trying to back up. I think it's making the sparsebundle to transfer to the Time Capsule.
    Yes, exactly.  It makes one sparse bundle per Mac.
    It's possible the TC's disk is too full for a new sparse bundle, or there may be some other problem.
    Via the Finder, locate the existing sparse bundle (see the pink box in Time Machine - Frequently Asked Question #17 if you're not sure how to do that).  See how large it is (plus how large anything else that may be there).  If the total is very near the size of the TC, that may be the problem.
    If not, a clue may be lurking in your logs.  Use the widget in #A1 of Time Machine - Troubleshooting to display the backup messages from your logs.  Locate the backup in question (probably the first one displayed), then copy and post all the messages here.

  • MacBook Pro.sparsebundle" could not be created (error 22).

    The full error message says:
    The backup disk image “/Volumes/Charles Pelham's Time Caps/Charles Pelham’s MacBook Pro.sparsebundle” could not be created (error 22).
    I downloaded the widget and can highlight the full log, but can't copy it.

    The following procedure may or may not help, but it's worth a try.
    Open Macintosh HD > Applications > Utilities > Disk Utility
    Click on the name of your hard drive that has the exact same name as the drive on your desktop. If you have not changed the name, it will be Macintosh HD.
    Click Verify Disk Permissions and wait for the message. If you need to Repair Disk Permissions, go ahead and do this. Depending on how much data you have on your drive, it may take 30-45 minutes or more for this to complete.
    Then try to setup the backup again.

  • HT201250 I keep receiving the following backup disk image /Volumes/Data/Niki's Mac Book Pro spamyrsebundle could not be accessed (error -1).  How do I fix this?

    I keep receiving the following backup disk image "/Volumes/Data/my MacBook Pro sparsebundle could not be accessed (error -1).  How do I fix this?  I had just updated some software and am afraid something hurt the time machine.

    See #C17 in Time Machine - Troubleshooting.

  • Purchased a new Macbook Pro 13". I used migration assistant to transfer. I can't backup to time capsule.  I am getting on error The backup disk image "/Volumes/Herb's Time Capsul/Herb MacBook Pro.sparsebundle" could not be created (error 17).  Help

    Purchased a new Macbook Pro 13". I used migration assistant to transfer. I can't backup to time capsule.  I am getting on error "The backup disk image “/Volumes/Herb's Time Capsul/Herb MacBook Pro.sparsebundle” could not be created (error 17).  Help!

    Launch the Keychain Access application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Keychain Access in the page that opens.
    Select the System keychain in the list of keychains in the sidebar of the window. If you don't see the list, click the down-arrow icon below the sidebar.
    Then select Passwords in the Category list at lower left. Click the Kind heading in the list of keychain items to arrange it by Kind.
    Locate the AirPort Disk Password with the name of your Time Capsule. Double-click the item and check the box marked Show Password in the inspector window that opens. You'll be prompted for the administrator login password. Make a note of the AirPort password, then close the inspector window and delete the item.
    Also delete any other AirPort DIsk Password items for that same Time Capsule, which may have had a different name in the past.
    Quit Keychain Access and try again to back up.

  • HT3275 TIME MACHINE ERROR: The backup disk image "/Volumes/Data/Sean McGuire's MacBook Pro.sparsebundle" could not be created (error 1).

    I can select a disk (Time Capsule) and initiate the backup.  It only "waits to back up" then "making backup disk available" and remains frozen there.  I tried to update the software a while back and was unsuccessful, I think that may be the issue.
    Any insight would be greatly appreciated.  This is the error message I receive.
    TIME MACHINE ERROR: The backup disk image “/Volumes/Data/Sean McGuire’s MacBook Pro.sparsebundle” could not be created (error 1).
    Thanks

    See #C17 in Pondini's excellent support document Time Machine - Troubleshooting
    http://pondini.org/TM/Troubleshooting.html

  • HT3546 MacBook Pro.sparsebundle"  could not be accessed (error -1).

    When i try to backup my Time Capsul I get the error (MacBook Pro.sparsebundle”  could not be accessed (error -1).)
    please help my how I solv this problame?
    Mrityunjoy Biswas

    I had this problem, and found that changing the name of my Time Capsule's hard drive fixed it.
    You'll need to use Airport Utility to connect to your Time Capsule.  My Time Capsule drive was named "Time Capsule HD." I renamed it to "Data," and that fixed the problem.

  • Pro.sparsebundle" could not be accessed (error -1)

    Has anyone see this specific error message and solved for it?  Help
    Pro.sparsebundle” could not be accessed (error -1)

    See # C17 in Pondini's excellent support document......Time Machine -- Troubleshooting for all the procedures to fix this issue.
    http://pondini.org/TM/Troubleshooting.html

  • I changed my name on MacBook pro, I could not log in after that though the password is unchanged but tHe name appeared on the login window is the original name?..how I can log in?

    I changed my name on MacBook pro, I could not log in after that though the password is unchanged but tHe name appeared on the login window is the original name?..how I can log in?

    Hmmm.  Maybe try this?
    OS X: Changing or resetting an account password

  • I have a Macbook Pro. I just purchased Acrobat Pro DC and keep getting an error message when I try to download, saying I need to contact support.

    I have a Macbook Pro. I just purchased Acrobat Pro DC and keep getting an error message when I try to download, saying I need to contact support. I've eliminated previous versions of the application because they were US-based versions and I'm now living in Australia. I checked Flash and it seems to be installed correctly. what am I doing wrong?

    Hi Laura ,
    Could you please elaborate about the issue and also about the error message?
    What does it say except contacting the support?
    Is it something to do with Licensing and Activation of Acrobat DC?
    Also please update us from where are you trying to download Acrobat DC?
    I would recommend you to follow these links download Acrobat DC and see if you still face any challenges .
    If you want to opt for perpetual ,follow this link .
    Download Acrobat products | Standard, Pro | DC, XI, X
    And if you wish to subscribe for Acrobat DC .Kindly refer this link .
    Download Acrobat DC (Continuous) | Enterprise or VIP
    Regards
    Sukrit Dhingra

  • FaceTime and Messages log in error on Mac

    FaceTime and Messages log in error on my iMac and Mac Mini.  (OS X 10.8.2)
    Getting a 'registration cannot be completed at this time message', but both worked fine before (when the iMac was in my office). 
    Both FaceTime and iMessage work on the iPad.
    Running the home network through a near-new, still functioning Time Capsule.
    Have logged out, tried logging in with a new Apple ID, and get the same result.
    Help, please.

    Sorry, I'm at a loss...
    Try Apple's Express Lane...
    https://expresslane.apple.com/

  • Hey! so i was do a AHT on my macbook pro retina and their was a error 4SNS/1/40000001:1DOR-0.000 need help thanks!

    hey! so i was do a AHT on my macbook pro retina and their was a error 4SNS/1/40000001:1DOR-0.000 need help thanks!

    Welcome to Apple Support Communities
    It looks like you ran Apple Hardware Test without plugging the MacBook to the charger. It's normal to see an error if you run Apple Hardware Test without your Mac plugged.
    Plug the MacBook Pro to its charger and run Apple Hardware Test again

  • I get an error mess when trying to complete backup "The backup disk image "/Volumes Time Capsul MacBook Pro.sparsebundle" could not be accessed (error -1).

    When trying to use my time machine got an error message "Time Machine could not complete the backup. 
    The backup disk image “/Volumes/ Time Capsul/ MacBook Pro.sparsebundle” could not be accessed (error -1).
    Any ideas?

    I have not found a long-term solution (fix), but in my case the volume where the Time Machine backup should occur usually is mounted on the desktop but not as a shared volume (incidated as a drive with the people holding hands superimposed over the drive icon). If I drag the drive to the trash (unmount it), the next time Time Machine is scheduled to run, it completes successfully.

  • Why is the Nvidia GTX 680 CUDA card supported by Premiere Pro CC, and NOT After Effects CC?

    Why is the Nvidia GTX 680 CUDA card supported by Premiere Pro CC, and NOT After Effects CC?

    Thanks Todd for all the info.  It is much appreciated and very helpful.  On a different note, could you possibly direct me to the correct forum to fix this bug?  I am suddenly recieving a warning on my System SSD referencing Adobe Exchange.  Here is a screen grab to best explain:

Maybe you are looking for

  • I am having Safari crashes on my MacBook Air ever since installing the Lion Operating system.

    Error report is below: rocess:         Safari [1331] Path:            /Applications/Safari.app/Contents/MacOS/Safari Identifier:      com.apple.Safari Version:         5.1.6 (7534.56.5) Build Info:      WebBrowser-7534056005000000~6 Code Type:      

  • Finder Folder Size Calculations

    When I'm archiving, I have to do a lot of Get Info to calculate the folder sizes for DVD burning. Problem I'm having is the file size calculations start taking forever after working for a few minutes, or they don't calculate at all. Usually works fin

  • Preloaders, loading order and -levels

    Hi, everyone I am using Flash 8 and AS2 for my project. My website is now working just about as I like, as long as the whole movie has loaded. I have a main time line and several movie clips on the time line. Only problem is, that the movie seems to

  • 5s won't update iOS 8

    Have a 5s with 7.1.2. Made over 6GB of space for download.  for past 4 days been trying to download the software.  Error every time sometimes after waiting several hours.  Sometimes it won't connect to server, sometimes it just says error in download

  • Calling Custom Java Class from WCC?

    How do I call a custom Java class from WCC when a certain metadata field is set to 'On' and at the time of check-in? Thank you, Randy