Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

configuring a database

Status
Not open for further replies.

byleth

Programmer
Feb 27, 2004
70
0
0
PT
Hi,

I'm starting with Oracle 9i and it all seems very confusing to me..

I've installed the Database Server, after that i've used the Database Configuration Assistant to create a database, wich i've called TEST, with SID TEST.

I've also installed the oracle data access client for .net

It all went fine, but i'm unable to connect to the data source with .net, and i get this error:

ORA-12154: TNS:could not resolve service name

using the following connect string:

"Data Source = TEST; user id = SYS; password = zzz"

I'm using this user because it was the user that appeared by default when configuring the database.

I've searched for this error and found that the problem is in the tnsnames.ora file, and this is it's content:

# TNSNAMES.ORA Network Configuration File: C:\oracle\ora92\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

ORACL_HOME =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = HOME)(PORT = 1521))
)
(CONNECT_DATA =
(SID = ORACL)
(SERVER = DEDICATED)
)
)

Do i have to configure this manually? I've no idea on what to do...


thanks
 
Byleth,

Notice you have 9 open parens and 8 close parens. The entry " (ADDRESS_LIST =" is extraneous and your paren count will also match. Replace my "<machine name here>" the the correct machine name. I used the alias, "YADA" to illustrate the the alias for the tns entry does not need to match anything else. Try changing your TNSnames.ora-file entry to:
Code:
YADA =
  (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = <machine name here>(PORT = 1521))
    )
    (CONNECT_DATA =
      (SID = TEST)
      (SERVER = DEDICATED)
    )
  )
Let us know your findings. (There are a couple of additional settings that may be affecting connectivity, but let's do step-wise modification so that we can isolate the cause of your troubles.)


[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[ Providing low-cost remote Database Admin services]
Click here to join Utah Oracle Users Group on Tek-Tips if you use Oracle in Utah USA.
 
thanks for your reply,


Now i get an ORA-12541: TNS:No listener found


i went to the services manager and i really don't have a listener running, how do i start it?
 
well i've started the listener, but now i get an:

ORA-1017: invalid username/password

using the previous connect string..

do i have to create a user? I've created a Local Role with grant to connect, but i really don't know if this is what i have to do..
 
Byleth,

Your advances all respresent excellent progress. In fact, the error message you are receiving indicates that you have now resolved your initial problem. If you have not made any changes to the passwords on your system, then you should be able to log in with a default DBA user named "SYSTEM" whose default password is "MANAGER".

Once you connect with such a user, you should change the passwords of both the SYSTEM user and the SYS user. You can affect these changes with commands similar to:
Code:
ALTER USER user_name IDENTIFIED BY new_password;
Also, to create a new user, you can use the following commands:
Code:
CREATE USER user_name IDENTIFIED BY password
DEFAULT TABLESPACE some-non-SYTEM-tablespace-name
TEMPORARY TABLESPACE your-TEMPORARY-tablespace-usually-named-TEMP
QUOTA ON one-or-more-tablespace-names {nnnM | UNLIMITED};
GRANT {DBA | CONNECT} TO new-user-name;
GRANT RESOURCE TO new-user-name (if the new user should be able to CREATE tables, views, et cetera.)
Let us know if you have additional questions and of your progress, Byleth.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[ Providing low-cost remote Database Admin services]
Click here to join Utah Oracle Users Group on Tek-Tips if you use Oracle in Utah USA.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top