How to start to connect a database to my program?

Dear People,
I have been studying Collection classes in Java and now would like to learn how to permanently store data in a database. Up until now I have been writing programs where the data disappears after I turn my computer off.
I downloaded mySQL and the mySQL driver.
What do I do now ?
ps try to avoid telling me to go to a tutorial please. A few sequenced
steps telling me what to learn would be appreciated.
Thank you in advance
Stan_Steve

...search these forums...answered dozens of timeswith informative answers like this who needs to ask
for specific information ? specific links ? ?
Stan_SteveUmmm... Those who can't (or won't) search???
Or maybe those who have searched for hours, but exhausted, with their last tiny bit of energy, enter a question on the forums...

Similar Messages

  • How to start service & connect with database in network

    Dear friends,
    I have created a Database and tried to connect it from remote computer. I have configured Database name and host name in the remote client computer. But when i net start oracleservice(db name) its not connected. showing Tns error. I started the database in the server side but unable to connect it through network in the client side. What shall I do??. Is the DBservice on server side from manual to Automatic change will have impact of connecting host from client side. Please explain. I am somewhere made mistake. Since, Initially i got connected and worked but the same now shows error. please explain.

    Dear friends,
    I did configured tns names and listener configuration in the server side and also tnsnames.ora in the client side. I use oracle 9i version 1 for server side and oracle 8i for client side. Is there any conflict in recognizing the system. The common error i get is ora-12203 but I started listner service and db service from the server side. and i can able to connect as client from the same host machine as client but could not able through network from remote computer. please tell the problems may involve.

  • How to start or shut down database using sql developer in windows

    Dear Sir/Madam,
    how we start or shut down database using sql developer in windows
    we are using oracle 11g release2, unix, java & oracle oracle weblogic administration
    Thanks & Regards
    Manish Kumar
    Datbase Team
    TCS Ltd.

    HI, Welcome to OTN form,
    SHUTDOWN is not a SQL statement but a SQL*Plus command . You cannot use SHUTDOWN in PL/SQL.
    Check following link:
    http://docs.oracle.com/cd/E11882_01/server.112/e16604/ch_twelve042.htm#i2699551
    More Information please check OTN discussion: https://forums.oracle.com/thread/2349159
    Thank you

  • How to start agent on the database host which is being Monitored

    Hello All,
    I have installed OEM 11.2.1.0. I have stopped getting alerts after the Node1 server is rebooted. I am monitoring RAC database.
    When I checked the agent status on host I get the following output
    [oracle@rs1pre91dvdba01 bin]$ pwd
    /u01/app/oracle/agent11g/bin
    [oracle@rs1pre91dvdba01 bin]$ emctl agent status
    Environment variable ORACLE_UNQNAME not defined. Please set ORACLE_UNQNAME to database unique name.
    [oracle@rs1pre91dvdba01 bin]$ export ORACLE_UNQNAME=MDM11
    [oracle@rs1pre91dvdba01 bin]$ emctl agent status
    EM Configuration issue. /u01/app/oracle/product/11.2.0/dbhome_1/rs1pre91dvdba01_MDM11 not found.
    [oracle@rs1pre91dvdba01 bin]$
    And same on Node 2
    [oracle@rs1pre91dvdba02 bin]$ pwd
    /u01/app/oracle/agent11g/bin
    [oracle@rs1pre91dvdba02 bin]$ export ORACLE_UNQNAME=MDM12
    [oracle@rs1pre91dvdba02 bin]$ emctl agent status
    EM Configuration issue. /u01/app/oracle/product/11.2.0/dbhome_1/rs1pre91dvdba02_MDM12 not found.
    Please can I know how to start the agent on the nodes and also how auto the process of starting the agent on the Server reboot
    Thanks.

    [oracle@rs1pre91dvdba01 bin]$ env | sort
    ASM_SID=+ASM1
    _=/bin/env
    COBBLER_SERVER=ccoshs02xvsat01.ccosvc.com
    DB_HOME_BIN=/u01/app/oracle/product/11.2.0/dbhome_1/bin
    DB_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
    DISPLAY=localhost:10.0
    DWH_SID=DWH11
    G_BROKEN_FILENAMES=1
    GI_HOME_BIN=/u01/app/11.2.0/grid/bin
    GI_HOME=/u01/app/11.2.0/grid
    GRID_HOME=/u01/app/11.2.0/grid
    HISTSIZE=1000
    HOME=/home/oracle/
    HOSTNAME=rs1pre91dvdba01.pre.ccosvc.com
    INPUTRC=/etc/inputrc
    LANG=en_GB
    LD_LIBRARY_PATH=/u01/app/oracle/product/11.2.0/dbhome_1/lib
    LESSOPEN=|/usr/bin/lesspipe.sh %s
    LOGNAME=oracle
    LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
    MAIL=/var/spool/mail/oracle
    MDM_SID=MDM11
    NLS_DATE_FORMAT=dd-mm-yyyy hh24:mi:ss
    NLS_LANG=ENGLISH_UNITED KINGDOM.AL32UTF8
    OLDPWD=/home/oracle
    ORACLE_BASE=/u01/app/oracle
    ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
    ORACLE_SID=MDM11
    ORACLE_UNQNAME=MDM11
    PATH=/u01/app/oracle/product/11.2.0/dbhome_1/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/sbin:/home/oracle//bin
    PWD=/u01/app/oracle/agent11g/bin
    SHELL=/bin/bash
    SHLVL=1
    SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
    SSH_CLIENT=172.30.0.43 54890 22
    SSH_CONNECTION=172.30.0.43 54890 172.30.2.201 22
    SSH_TTY=/dev/pts/0
    SVN_EDITOR=vi
    TERM=xterm
    TNS_ADMIN=/u01/app/11.2.0/grid/network/admin
    USER=oracle
    Please can you tell me which variables needs to change

  • How to start/stop  oracle 9i databases in aix

    please provide me details steps of start/stop oracle 9i database in aix . we have four nodes .So i would like to know the steps of shutting down database including all nodes & also starting up and any prerequisite?
    Edited by: apusumit on Jun 10, 2011 5:32 AM
    Edited by: apusumit on Jun 10, 2011 5:35 AM
    Edited by: apusumit on Jun 18, 2011 7:01 AM

    apusumit wrote:
    please provide me details steps of start/stop oracle 9i database . we have four nodes .So i would like to know the steps of shutting down database including all nodes & also starting up and any prerequisite?
    Edited by: apusumit on Jun 10, 2011 5:32 AMrefer the link:-
    http://www.puschitz.com/InstallingOracle9iRAC.shtml#StartingAndStoppingOracle9iClusterManager
    also,
    please post the question in
    Forum Home » Grid Computing » Real Application Clusters
    Good Luck.

  • How to control tcp connection with java tcp socket programing ??

    Hi,
    I am connecting a server as using java socket programming.
    When server close the connection (socket object) as using close() method ,
    I can not detect this and My program continue sending data as if there is a connection with server.
    How to catch the closing connection ( socket ) with java socket programming.
    My Client program is as following :
    import java.io.PrintWriter;
    import java.net.Socket;
    public class client
      public client()
       * @param args
      public static void main(String[] args)
        Socket socket=null;
        PrintWriter pw=null;
        try
                          socket = new Socket("localhost",5555);
                          pw = new PrintWriter(socket.getOutputStream(),true);
                          int i=0;
                          while (true)
                            i++;
                            pw.println(i+". message is being send.");
                            Thread.sleep(5000);
        } catch (Exception ex)
                          ex.printStackTrace();
        } finally
                          try
                            if(pw!=null)pw.close();
                            if(socket!=null)socket.close();
                          } catch (Exception ex)
                            ex.printStackTrace();
                          } finally
    }

    I changed the code as following. But I couldn't catch the EOFException when I read from the socket. How can I catch this exception ?
    import java.io.BufferedReader;
    import java.io.EOFException;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.PrintWriter;
    import java.net.Socket;
    import java.net.UnknownHostException;
    public class client
      public client()
       * @param args
      public static void main(String[] args)
        Socket socket=null;
        PrintWriter pw=null;
        BufferedReader bufIn=null;
        InputStreamReader inRead=null;
        InputStream in=null;
        try
                          socket = new Socket("localhost",5555);
                          in = socket.getInputStream();
                          inRead = new InputStreamReader(in);
                          bufIn = new BufferedReader(inRead);
                          pw = new PrintWriter(socket.getOutputStream(),true);
                          int i=0;
                          while (true)
                            i++;
                            try
                              bufIn.readLine();
                              pw.println(i+". message is being send.");
                              System.out.println(i+". message has been send");
                            } catch (Exception ex2)
                              System.out.println(ex2.toString());
                              System.out.println(i+". message could not be send");
                            } finally
                            Thread.sleep(5000);
        } catch (EOFException ex)
                          ex.printStackTrace();
        } catch (InterruptedException ex)
                          ex.printStackTrace();
        } catch (IOException ex)
                          ex.printStackTrace();
        } finally
                          try
                            if(pw!=null)pw.close();
                            if(socket!=null)socket.close();
                          } catch (Exception ex)
                            ex.printStackTrace();
                          } finally
    }

  • How to start Oracle 10g RAC database and clusterware?

    I have steps to stop the 10g RAC Database and clusterware but not sure about starting it.
    I have heard executing
    $crsctl stop crs --as root
    on each node
    will start the database,asm,nodeapps .Is that true?
    or we have to do that step by step like we do in stopping the clusterware and database below
    1.Stop the agent:
    cd to $AGENT_HOME/corpng04.amhc.amhealthways.net/bin, then run: ./emctl stop agent
    2.Stop the full database
    $ oracle_home/bin/srvctl stop database -d db_name
    3.Stop the ASM Instances on node1,node2
    $ oracle_home/bin/srvctl stop asm -n node -- I guess you can't give multiple nodes in one command with comma,you need to give this multiple times with diff node name
    4.Stop the NodeApps :vip,listener,oms and gsd
    $ oracle_home/bin/srvctl stop nodeapps -n node -- I guess you can't give multiple nodes in one command with comma,you need to give this multiple times with diff node name
    5.Stop the CRS cluster processes :those bloody 3 evmd,ocssd,crsd
    $su - root
    $CRS_home/bin/crsctl stop crs

    Paul R @ NL wrote:
    before is shutting down crs i tend to stop the instances and services via srvctl then stop crs via crsctl
    just the way i do it. not saying it's the right way but it is the one i am comfortable with.Good -) If we stop CRS, but forgot shutdown oracle instances ... we'll see shutdown abort in alert log file(that mean instances are shutdowned abort).
    We should shutdown instance before stop CRS anyway.

  • Helps!:How to start multi process in a single java program?

    I wanna to test the querying performance of a Database
    connection poll,and here,not only multi threads,but also multi process I need to start in the same java program cause i have only one PC available.....
    Does that possible?

    In pure java this is not possible.
    A java program with all its thread run in a single
    jvm,
    which is just one process.However, you can have multiple instances of the jvm, I've done it w/ I needed to test some row locking in my database app. If you are in windows and want 3 copies of you program just make a bat file that looks likejavaw.exe -classpath "classesGoHere" MainClass
    javaw.exe -classpath "classesGoHere" MainClass
    javaw.exe -classpath "classesGoHere" MainClassThat will create 3 instances of the jvm and thus three instances of your application. I'm sure the same can be done on multiple platforms.
    Peter

  • How do you query Oracle RDF database using Java program?

    Does anyone know how to get data out of the oracle RDF database using Java?
    I'm running the following java code and it returns basically null values. My guess is that the get_triple() function returns a dataset other than resultset. I've tried searching the Oracle web site. Am I supposed to be using CLOB object? Any help would be appreciated. Thanks
    sql = "SELECT a.triple.GET_TRIPLE() AS triple FROM family_rdf_data a";
    ResultSet rs = stmt.executeQuery( sql ) ;
    while ( rs.next() )
    System.out.println( rs.getString(1) ) ;
    rs.close() ;

    get_triple() returns an object, and the code would be different from the code of retrieving a string. Some sample code for retrieving objects is at http://www.oracle.com/technology/sample_code/tech/java/sqlj_jdbc/files/advanced/advanced.html
    get_subject(), get_property() return strings so the code below should work. get_object() returns a CLOB so different handling would be required and there is some sample code at the link above.
    Melli

  • How to start a browser from within a java program?

    I want to make a help file for my java program and want to run the browser from the menu of my program.
    How can I start my browser from my program?
    A small code will be helpful.
    Thanks.
    Niteen

    This should work on Windows without having to know where the browser is located. See http://www.javaworld.com/javaworld/javatips/jw-javatip66.html for more details
      public static void viewHtml(URL url, boolean fixHtmlExtension){
          String cmd = "rundll32 url.dll,FileProtocolHandler " + url.toExternalForm();
          if (fixHtmlExtension){
            //There is a bug in rundll32. For http requests, it doesn't like .html or .htm extensions,
            //but replacing the 'm' with '%6D' works. 
            //This fix is not needed for file requests.
            if (cmd.endsWith(".htm")){
              cmd = cmd.substring(0,cmd.length()-1) + "%6D";
            else if (cmd.endsWith(".html")){
              cmd = cmd.substring(0,cmd.length()-2) + "%6Dl";
          Process process = Runtime.getRuntime().exec(cmd);
          try{
            process.waitFor();
          catch(InterruptedException e){

  • How to connect HSQLDB database in jar

    Hi people, How can i to connect hsqldb database in jar file without getResource() method ?
    thanks

    Devel application in JBOoss application server.
    JBoss is configured with HSQLDB by default.

  • Not able to start the Connection Digital Networking Replication Agent Service

    Hi All,
         I am getting the following alert through RTMT, when i tried to start the service in Unity Connection Serviceability, it doesn't start.   Unity Connection 8.5.1.  It is still in the stopped status, Although service is not important, however it is pushing a lot of rtmt alert.   Could you please help me how to start this Connection Digital Networking Replication Agent Service. 
    Service operational status is DOWN. Connection Digital Networking Replication Agent.
    Thanks
    Barry

    Thanks for Nadeem and Aokanlawon, for the quick reply.
    1.  You are right  i got only one cluster i understand its not working,  However howcome this service was started in pub UC and was working. I will disable anyway now as i got only one cluster. It all started when I started to fix the following alerts which was pushed by sub Unity Connections(Branchsite)
    Failed to retrieve DbSpace usage information when running the "Monitor the Unity Connection databases" SysAgent task.
    This alert started coming after there was a network connection drop between HQ cucm and the branch sub UC, after the drop, all ports disconnected between these two servers, services deactivated in Sub UC, after the network connection back again, ports connected back and the most of the services activated.  However the following services were not in the running state in Sub UC.   I found these information from the sysagent trace log.  I thought to fix this error  is to start the Connection Database Proxy in Sub UC.  However this has stopped the following service 'Connection' Database Proxy' and 'Connection Digital Network Replication Agent' in Pub UC.  I managed to start Connection Database Proxy in Pub UC, however Connection Digital Network Replication agent is now in deactivated status.
    Critical Services
    connection exchange notification web service
    connection mailbox sync
    connection message transfer agent
    connection notifier
    Optional services
    Connection Database Proxy
    Connection Digital Networking Replication Agent
    Connection Speechview processor
    2. How do I stop the alert from sub UC
    Failed to retrieve DbSpace usage information when running the "Monitor the Unity Connection databases" SysAgent task.
    Thanks

  • Connect a database to jdeveloper webcenter suite

    Hi, i got some problems, maybe because i'm a beginer.
    I am creating with jdeveloper webcenter suite, a web portal. I learn that i need to connect my web in to a database to can run and try to use my web portal. Now, i'm trying to create a database in my computer, i do it with databse oracle 10g express edition, that is correct? i have to create something? any body knows any tutorial to help me how to create and connect a database to my project? it is easy?
    thanyou very much
    Valenti, from Barcelona
    Edited by: user11933068 on 06-oct-2009 0:48

    Hi,
    wrong forum, try
    WebCenter Portal
    Frank

  • How to start java applet with netbeans 6.1

    hey,
    I want to learn how to start java applet (with database) with netbeans.. I'm new to java...can you show me how can i start..if you have any doc about it can you send it to me..thank you..:)

    You really should be asking this NetBeans question at the NB site - these forums are for Java language topics, not NB support.
    [http://www.netbeans.org/kb/61/web/applets.html]
    Almost any NB question you have can be answered by either the NB web documentation or the NB program's Help.

  • Connect in database default  wiht SQL PLUS

    Hi
    How can I to connect in database default , using SQL PLUS ?
    And after I may change conexion with ACCEPT and change PROMPT ?

    What is database default? If you mean you do not wish to specify a connection string such as user/pass@connection, just set ORACLE_SID in the environment before going into sqlplus.

Maybe you are looking for

  • How to find a String in a Vector???

    Hi!! Thanks in advance for read this post. I have a little problem... please help me. I need to find if a String exists or not in a Vector. The vector is a list of results from a database. Here goes my code: <html> ... html code ... <% int IdClass =

  • HELP!  My sound is distorted when I export from Final Cut Pro 10.3

    How do I use Compressor 4.1 with Final Cut Pro 10.3?  My sound is all distorted when I download!  HELP!!!

  • Continuous Kernel Panic - Unable to use Arch :(

    Good evening, yesterday i tried on my vbox Arch Linux and i was fascinated with his elegance and cleanness. Today i decided to install it on my physical machine, an HP tx2000 tablet pc with AMD Turion 64 processor, 2GB RAM, NVidia graphic chip. I dow

  • Electronic Signature in a Captivate project

    How do you put an electronic signature in a Captivate project?

  • BAPI_USER_CHANGE to change the user data

    Hi, I am using BAPI_USER_CHANGE to change the user data like telephone number, address etc. Everything is working fine but when I want to add new telephone number with no change in exsting numbers then it wont allow to add instead of adding it change