Results 1 to 11 of 11
  1. #1
    Join Date
    Apr 2006
    Posts
    11

    Unanswered: has anyone tried 10g database express?

    hi
    I am new to oracle. Here is a question relates to connection string:

    There is a sample database when oracle is installed. I put this connection
    string to my c# code. "user id=hr;password=hr;data source=????"; I am
    not sure what should be inserted into the data source. Is data source ==
    the name of database, which is "hr"?

    confused here
    figo2476

  2. #2
    Join Date
    Jan 2004
    Posts
    370
    Use whatever connection descriptor is in your tnsnames.ora file for that database.

    If you can connect through sqlplus using sqlplus hr/hr@hr then your connect string in c# will be:

    "User Id=hr;Password=hr;Data Source=hr";

  3. #3
    Join Date
    Apr 2006
    Posts
    11

    reply

    thx for the reply.

    When I configure the net manager using the wizard, I have some questions.

    stage1:
    It says net service name. What should I put there? hr.com? localhost?

    stage2:
    Should I pick tcp/ip? In fact, I install both oracle database server & the client software in my computer. Should I pick IPC?

    stage3:
    Suppose I pick tcp/ip? What should I fill for the 1st row (it means "your computer" to me)? So I put down the name of my computer, correct?

    stage4:
    I need to provide the name of service. What should I do? Put down "hr" again?

    stage5:
    Need to test the connection.......



    Quote Originally Posted by SkyWriter
    Use whatever connection descriptor is in your tnsnames.ora file for that database.

    If you can connect through sqlplus using sqlplus hr/hr@hr then your connect string in c# will be:

    "User Id=hr;Password=hr;Data Source=hr";

  4. #4
    Join Date
    Sep 2004
    Location
    London, UK
    Posts
    565
    Stage 1: A Net Service Name is "A simple name for a service that resolves to a connect descriptor. Users initiate a connect request by passing a username and password along with a net service name in a connect string for the service to which they want to connect." In practice it should be the same as the database name, for example "XE" which I think is the default (I don't have an XE instance around at the moment, though I did install it on a work PC last year, and I've recently installed 10.1 on my iMac).

    Stage 2: Yes use TCP/IP, same as the Internet. I think the others are provided for compatibility with older, weirder environments.

    Stage 3: Is it asking for a hostname? I'm afraid I can't remember what I put there. For 10.1 on Mac, getting the hostname set up to something it would accept was a bit of a struggle (thank goodness for Google), but I seem to remember it wasn't so bad on XE.

    Stage 4: sounds a lot like Stage 1. I would use the same value.

    Stage 5: The wzard should prompt you with a "test connection" dialog. If so, what happens?

  5. #5
    Join Date
    Apr 2006
    Posts
    11
    Quote Originally Posted by WilliamR
    Stage 1: A Net Service Name is "A simple name for a service that resolves to a connect descriptor. Users initiate a connect request by passing a username and password along with a net service name in a connect string for the service to which they want to connect." In practice it should be the same as the database name, for example "XE" which I think is the default (I don't have an XE instance around at the moment, though I did install it on a work PC last year, and I've recently installed 10.1 on my iMac).

    Stage 2: Yes use TCP/IP, same as the Internet. I think the others are provided for compatibility with older, weirder environments.

    Stage 3: Is it asking for a hostname? I'm afraid I can't remember what I put there. For 10.1 on Mac, getting the hostname set up to something it would accept was a bit of a struggle (thank goodness for Google), but I seem to remember it wasn't so bad on XE.

    Stage 4: sounds a lot like Stage 1. I would use the same value.

    Stage 5: The wzard should prompt you with a "test connection" dialog. If so, what happens?

    stage1:
    * hr

    stage2:
    * tcp/ip

    stage3:
    * (I should put a hostname here, but I have no idea what to put)
    * port: 1521

    stage4:
    * hr (It asks the name of service)

    stage4:
    * testing.....

  6. #6
    Join Date
    Sep 2004
    Location
    London, UK
    Posts
    565
    Did you try "localhost" as the hostname?

  7. #7
    Join Date
    Apr 2006
    Posts
    11

    reply

    Quote Originally Posted by WilliamR
    Did you try "localhost" as the hostname?
    oracle error: ORA-12514

    doesn't work... not easy.....

  8. #8
    Join Date
    Sep 2004
    Location
    London, UK
    Posts
    565
    OK, how about 127.0.0.1? (Wild guess.) Is there nothing helpful in the installation guide?

  9. #9
    Join Date
    May 2004
    Location
    Dominican Republic
    Posts
    721
    ..believe 12514 is more SID related rather than the host description in the connection string..

  10. #10
    Join Date
    Apr 2006
    Posts
    11
    Quote Originally Posted by WilliamR
    OK, how about 127.0.0.1? (Wild guess.) Is there nothing helpful in the installation guide?
    In the installation guide, it has very good examples. It doesn't contain configuration of net manager.

  11. #11
    Join Date
    Sep 2004
    Location
    London, UK
    Posts
    565
    Here I can type "http://127.0.0.1/" into my browser and it brings up the Apache default page, which confirms that at least the browser recognises 127.0.0.1. This also works for "localhost". Perhaps on a PC it will give you an equivalent result using IIS or something.

    According to the Oracle Database Express Edition Installation Guide:
    "host is the host name or IP address of the computer where Oracle Database XE Server is installed. If Oracle Database XE Server is on your local computer, then you can enter localhost as the host name."

    However I agree with JM that you probably need to research exactly what is failing and why. For example when do you get the ORA-12514 error?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •