Connecting to a database on another machine, please help!!!!!!

Hi there,
I am new to oracle and at the minute I am using Oracle 9i. I have set up a database on one machine (PC2) and would like to create an odbc from another machine (PC1) to connect to this database. I have set up a listener for (PC1) the using oracle net manager on PC2. what I want to know is: is there anything else I need to do on the PC2 end???? Also, what needs to be done on the PC1 end??? please help!!!

If everything is setup and working properly on the Server PC2, you can just test the ODBC from PC1 (assum you already have an Oracle ODBC drive).

Similar Messages

  • Connecting to a database from another computer...

    hi guys!
    i just wonder if there is a simple way to connect to my database from another computer?
    do you have to change something in this method?
        private static Connection getConnection() {     Connection con = null;     try {         Class.forName("com.mysql.jdbc.Driver");         String url = "jdbc:mysql://localhost/Movies";         String user = "root";         String pw = "x";         con = DriverManager.getConnection(url, user, pw);         System.out.println("****Connected****");     }     catch (ClassNotFoundException e)     {         System.out.println(e.getMessage());           System.out.println("1");         System.exit(0);     }     catch (SQLException e) {         System.out.println(e.getMessage());           System.out.println("2");           System.exit(0);     }         return con;     }
    thanks! :)
    Edited by: Shaor-1 on Dec 22, 2008 3:47 AM

    hey!
    is there no one who knows how to do this?
    Here is my program that i want to change so it can connect to my mysql database but from another computer.
    import java.sql.*;
    import java.text.NumberFormat;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    public class ListMovies {
            static String exist = "existed";
        static int ye = 2221;
        static double pr = 21.12;
    public static void main (String[] args) throws InterruptedException {
    go();
    public static void go(){
           NumberFormat cf = NumberFormat.getCurrencyInstance();
        for(int i = 0; i < 1; i--){
        ResultSet movies = getMovies();
        try
            while (movies.next()){
                Movie m = getMovie(movies);
                String msg = Integer.toString(m.year);
                msg += ": " + m.title;
                msg += " (" + cf.format(m.price) + ")";
                System.out.println(msg);
              Thread.sleep(1000*10);
                catch (InterruptedException ex) {
                    Logger.getLogger(ListMovies.class.getName()).log(Level.SEVERE, null, ex);
                }    catch (SQLException e)
            System.out.println(e.getMessage());
    public static void loanMovie(String d) {
        Connection con = getConnection();
        try {
            Statement stmt = con.createStatement();
            String insert = "insert into movie "
                    + "(title, year, price) "
                    + "values ("
                    + "\"" + d + "\"" + ", "
                    + ye + ", " + pr +");";
            int i =stmt.executeUpdate(insert);
            if (i == 1){
                System.out.println("Loan recorded");
            else
                System.out.println("Loan not recorded");    
        catch (SQLException e){
            System.out.println(e.getMessage());
            System.out.println("CRAP"); 
    private static ResultSet getMovies()
        Connection con = getConnection();
        try {
            Statement s = con.createStatement();
            String select = "Select title, year, price " +
                    "from movie order by year";
            ResultSet rows;
            rows = s.executeQuery(select);
            return rows;
        catch (SQLException e)
            System.out.println(e.getMessage());
        return null;
        private static Connection getConnection() {
         Connection con = null;
         try {
             Class.forName("com.mysql.jdbc.Driver");
             String url = "jdbc:mysql://localhost/Movies";
             String user = "root";
             String pw = "x";
             con = DriverManager.getConnection(url, user, pw);
             System.out.println("****INFO****");
         catch (ClassNotFoundException e)
             System.out.println(e.getMessage());
               System.out.println("1");
             System.exit(0);
         catch (SQLException e) {
             System.out.println(e.getMessage());
               System.out.println("2");
              System.exit(0);
            return con;
        private static Movie getMovie(ResultSet movies) {
            try {
                String title = movies.getString("Title");
                int year = movies.getInt("Year");
                double price = movies.getDouble("price");
                return new Movie(title, year, price);
            catch (SQLException e)
            System.out.println(e.getMessage());   
            return null;
        private static class Movie
            public String title;
            public int year;
            public double price;
            public Movie(String title, int year, double price)
                this.title = title;
                this.year = year;
                this.price = price;
    BTW_
    my computers ip is: 81.229.40.17
    the database is on that computer.
    thanks!

  • Problem in recovering a database on another machine

    Dear All,
    I need your help in restoring and recovering a database on another machine. I don't have access to old machine to get logfile or archivelogs. I have taken full backup using RMAN. I have restored the database using rman sucessfully and trying to recover the database. RMAN have't restored the logfile. Database version is 8.1.7.4, OS is Solaris 8. In recovery, its showing the problem in rbs file. I'm showing all command and error. Just give me any idea that how to recover it sucessfully.
    SVRMGRL>recover database using backup controlfile until cancel;
    ORA-0279: Change 1935345519 generated at 08/19/2005 16:45:50 needed for thread 1
    ORA-0289: suggestion: /u07/oraexp/PROD/arch/arch_1_29958.arc
    ORA-0280: Change 1935345519 for thread 1 is in sequence #29958
    specify log : {RET}...
    cancel
    ORA-01547: warning: Recover succeeded but open resetlogs would get error below
    ORA-01194: file 2 needs more recovery to be consistent
    ORA-01110: data file 2: '/u06/oracle/oradata/PROD/rbs01-PROD.dbf'
    This RBS file size is 7GB. Is it the reason of problem. Even I tried until time, but its also has same error.
    SVRMGRL>recover database using backup controlfile until time '2005-08-16:20:10:00';
    ORA-0279: Change 1935345519 generated at 08/19/2005 16:45:50 needed for thread 1
    ORA-0289: suggestion: /u07/oraexp/PROD/arch/arch_1_29958.arc
    ORA-0280: Change 1935345519 for thread 1 is in sequence #29958
    specify log : {RET}...
    cancel
    ORA-01547: warning: Recover succeeded but open resetlogs would get error below
    ORA-01194: file 2 needs more recovery to be consistent
    ORA-01110: data file 2: '/u06/oracle/oradata/PROD/rbs01-PROD.dbf'
    Why its asking for archive file which generated on 19th, when I'm trying to recover until 16th only.
    Regards
    Rakesh

    Hi.
    What is the size of the redo logs in the database. With a small amount of transactions, there might be redo in this particular archived file from two days back. The timestamp of the archivelogfiles does not indicate that all redo in the file is from this day. It might have changes several days back if no logswitch occured inbetween.
    So, if I were you, I would provide all archivelogs required to get the datafiles consistent.
    As a matter of fact, if archived redo is in the following folder :
    /u07/oraexp/PROD/arch/
    I would use recover database until time and press return for all archived logs svrmgrl comes up with.
    I assume that the database was closed normally prior to taking the offline backup.
    Good luck.
    Rgds
    Kjell Ove

  • How to acess Database in I18N? Please help.

    How to acess Database in I18N? Please help.

    I have tried to overide the getContents() method of ListResourceBundle class but it returning an error at run time saying null Pointer exception.
    Here are the 2 codes resp.
    import java.util.*;
    public class Test1
         static String string ;
         public static void main(String args[])
    Locale locale = Locale.ENGLISH;
    ResourceBundle myResources =
    ResourceBundle.getBundle("MyResources", locale);
    string = myResources.getString("HelpKey");
    System.out.println(string);
    import java.util.*;
    import java.sql.*;
    public class MyResources extends ListResourceBundle
         static String[][] s3= null;
    String s6= null;
         String s7= null;
    public Object[][] getContents()
    Object[][] obj= (Object[][])dataBase();
              for(int i= 0; i< obj.length;++i){
                   for(int j = 0;j<obj.length;++j){
                        System.out.println("GGGGGGGG obj["+i+"]["+j+"]"+obj[i][j]);
              //s6=(String)obj[0][0];
         //     s6= obj[0][0].toString();
              //s7=obj[1][0].toString();
    Object[][] contents = { {s6},{s7}};
         return contents;
         private static String[][] dataBase()
         {           try
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   Connection con=DriverManager.getConnection("jdbc:odbc:DSN");
                   PreparedStatement stat= con.prepareStatement("Select Value,Key from Table1 where Key= ?");
                   String s1= "HelpKey";
                   stat.setString(1,s1);
                   ResultSet rs= stat.executeQuery();
                   while(rs.next())
                        String s2= (String)rs.getString("Key");
                        String s4= (String)rs.getString("Value");
                        String[][] s3 ={{s2},{s4}};
              catch(Exception e)
              e.printStackTrace();
         return s3;

  • Database Link question ! Please help me ....

    Hi everybody,
    I have some question about database link.
    For example, I have 3 database, database 1 and database 2 connect together by database link db_link1, database 2 and database 3 connect together by database link db_link2.
    I want to ask: Can I connect from database 1 to database 3 ? ( Of course don't use database link between database 1 and 3, just use database db_link1 and db_link2 )
    Both db_link1 and db_link2 are public database link.
    Can I restrict user access by 2 these public database link ?
    Thanks a lot.

    A database link has directionality-- it connects from one database to another database. It is not a bi-directional link.
    Assuming db_link1 exists in database 1 and connects to database 2 and db_link2 exists in database 2 and connects to database 3, it should be possible to read data that is in database 3 from database 1 without creating a new database link. But you'd need some sort of intermediate layer in database 2 (i.e. a view in database 2 that queries an object in database 3) because you can't nest database links in a single SQL statement. Of course, you would almost never actually do this for a variety of reasons. The only time I've ever heard of someone using this sort of setup is if database 1 is a very recent version of Oracle and database 3 is a very very old version of Oracle such that a database link between 1 and 3 is not possible.
    If you create a public database link, you cannot restrict access to that link short of potentially doing something with VPD. If you're creating a database link using a fixed username & password that would create a security issue, it would make far more sense to create private database links.
    Justin

  • HT4628 My macbook pro doesn't connect to the Wi-Fi at home while my iPad connects to the same Wi-Fi. When I try connecting my macbook to my iPhone's personal hotspot, the internet works but the issue is connecting my macbook to the Wi-Fi. Please help!!

    My macbook doesn't connect to the Wi-Fi at home while my iPad connects to the same Wi-Fi. When I try connecting my macbook to my iPhone's personal hotspot, the internet works but the issue is connecting my macbook to the Wi-Fi. Please help!!
    I don't understand how to fix this and I don't seem to understand where the problem is coming from.

    Let's try the simple approach first. Restart your router. Any change?

  • Good day please help me, my iphone 5 wont turn on.  i have tried the hard reset . but that didnt even work. i plugged it in charger but still no response i connect it in itunes still.dont open. please help. i dont have the warranty anymore, i

    good day please help me, my iphone 5 wont turn on.  i have tried the hard reset . but that didnt even work. i plugged it in charger but still no response i connect it in itunes still.dont open. please help. i dont have the warranty anymore, so please help.me.

    Please make a Genius Appointment and take it in for service. By now it probably cannot be fixed, but you never know.

  • Database Dropdown Population - Newbie, please help

    Hi,
    I am having problems populating a dropdown list in a jsp page with
    mulitple entries from a database. Can anyone please help me with the
    code or point me in the right direction. Im am using the oreily custom
    tags. The page is as follows.
    <%@ page language="java" contentType="text/html" %>
    <%@ page import="java.util.*" %>
    <%@ page import="com.ora.jsp.util.*" %>
    <%@ taglib uri="/orataglib" prefix="ora" %>
    <HTML>
    <BODY>
    <ora:sqlQuery id="sqlAdminDropdown" dataSource="AileenDB"
    scope="session">
    SELECT AdminName From Aministrator
    </ora:sqlQuery>
    <TABLE>
    <TR>
    <TD>
    ** Need to put the dropdown populated with ALL the
    AdminName here **
    </TD>
    </TR>
    </TABLE>
    </BODY>
    </HTML>
    I have tried things like the following but dont have a clue:
    <html:select name="session">
    <html:optionsCollection name="sqlAdminDropdown"
    property="sqlAdminDropdown" labelProperty="AdminName"/>
    </html:select>

    Hi,
    I am having problems populating a dropdown list in a jsp page with
    mulitple entries from a database. Can anyone please help me with the
    code or point me in the right direction. Im am using the oreily custom
    tags. The page is as follows.
    <%@ page language="java" contentType="text/html" %>
    <%@ page import="java.util.*" %>
    <%@ page import="com.ora.jsp.util.*" %>
    <%@ taglib uri="/orataglib" prefix="ora" %>
    <HTML>
    <BODY>
    <ora:sqlQuery id="sqlAdminDropdown" dataSource="AileenDB"
    scope="session">
    SELECT AdminName From Aministrator
    </ora:sqlQuery>
    <TABLE>
    <TR>
    <TD>
    ** Need to put the dropdown populated with ALL the
    AdminName here **
    </TD>
    </TR>
    </TABLE>
    </BODY>
    </HTML>
    I have tried things like the following but dont have a clue:
    <html:select name="session">
    <html:optionsCollection name="sqlAdminDropdown"
    property="sqlAdminDropdown" labelProperty="AdminName"/>
    </html:select>

  • I installed viber on my iPhone 5s. After entering my number, it says:" No Service It seems to be a problem connecting to viber's service.please check your connection and try again" Nevertheless I have connected to the internet. Could you please help me?

    I installed viber on my iPhone 5s. After entering my number, it says:"
    No Service
    It seems to be a problem connecting to viber's service.please check your connection and try again"
    Nevertheless I have connected to the internet.
    Could you please help me?

    Hello!
    Using a cradle with the Tungsten E2?  Tried bypassing the cradle and just use the hotsync cable?  Tried a different computer yet?  Somehow, the PC is having problems getting a signal from the device.  I assume you have the laptop charger plugged into the laptop during this?  Not going through a docking station or port-replicator.
    One crazy thing you can try is unplug the charger from your laptop, remove the battery from the laptop and leave it out for like 10mins and put it back in and reboot the laptop.  This should not cause side effects but still contact your OEM to make sure that nothing else is needed after leaving the battery out for extended period of time.  Keep me posted.
    Post relates to: Treo 650 (Unlocked GSM)

  • I have photoshop elements 11 installed on my desktop pc, I want to install it on my laptop as well, I read that it can be installed on two systems, but I get a message taht the redemption code has been used by another ID, please help

    I have photoshop elements 11 installed on my desktop pc, I want to install it on my laptop as well, I read that it can be installed on two systems, but I get a message taht the redemption code has been used by another ID, please help

    A redemption code can only be redeemed once.  It is used to acquire a serial number. The serial number is what you need to activate the installed software.  If you did not keep the serial number when you first installed, you might still be able to find it in your Adobe account online if you registered the software.

  • Someone meet the problem, I am not abble install mac OS 10.6 snow leopard on intel based machine, (intel core 2 duo, 2,8 ghz, 4GB RAM, 320 GB HDD, OSX 10.5.8) system every time wrote "OS X snow leopard cannot be install on this machine" please help, Majo

    omeone meet the problem, I am not abble install mac OS 10.6 snow leopard on intel based machine, (intel core 2 duo, 2,8 ghz, 4GB RAM, 320 GB HDD, OSX 10.5.8) system every time wrote "OS X snow leopard cannot be install on this machine" please help, Majo

    It is retail disk, i bought it in apple store. I also resetter PRRAM and SMC and checked disk. I also tried clean installation and upgrade, nothing works, after run installation program after few seconds wrote: OS X Snow Leopard cannot be install on this machine :-(
    Thank you for your answer
    Majo

  • I upgraded to iOS 7 yesterday on my iphone and now none of my apps shows me any new message and when i open the apps it says "Connect to itunes for push notifications". Please help!!!

    I upgraded to iOS 7 yesterday on my iphone and now none of my apps shows me any new message and when i open the apps it says "Connect to itunes for push notifications". Please help!!!

    Same here.  I don't know how to solve the problem, but I figured out a way to close the app without re-starting or resetting the phone.  If you click ok and then press the home button twice really fast before the dialog box shows back up, you can put the phone in multi-tasking mode and close the app without having the shut the phone off or reset it.  Anxiously awaiting the fix for this since I have several apps I use that I can access at the moment.

  • I can not connect my i phon with my pc it shows athorised computer when i am trying to do authorised process the process done but again i connect my phon again show this errore please help me to solve my prob....

    i can not connect my i phon with my pc it shows athorised computer when i am trying to do authorised process the process done but again i connect my phon again show this errore please help me to solve my prob....

    I have clicked on the  connect button, but it brings up the same There is a problem connecting,  and I have also tried SMB://
    i tried pinging the ip address with in termial and it times out.  
    From my windows PC and I can access my MacBook Air just fine,

  • I know this is old now but since the update i can't get into icloud on my phone it keeps asking me to check t & c's and now no emails. Can't connect to server. I have 4S please help :-(

    I know this is old now but since the update i can't get into icloud on my phone it keeps asking me to check t & c's and now no emails. Can't connect to server. I have 4S please help :-(

    Hi Kellyssi,
    Thanks for visiting Apple Support Communities.
    If you're being asked repeatedly to check terms and conditions, try restarting and then resetting your iPhone:
    iOS: Turning off and on (restarting) and resetting
    http://support.apple.com/kb/ht1430
    All the best,
    Jeremy

  • I have business catalyst website imported in Dreamweaver. But I am unable to find or use database for it. Please help me into this

    I have business catalyst website imported in Dreamweaver. But I am unable to find or use database for it. Please help me into this

    You might find better help here: Dreamweaver & Business Catalyst
    Additional Info: Dreamweaver Help | Dreamweaver-Business Catalyst integration

Maybe you are looking for