0

I want to work in Windows with Oracle DB (OracleXE112_Win32). I've installed ORACLE DB instance on my windows 8.1 machine, the admin page being here: enter image description here

The listener seems working properly: enter image description here Now i want to get SQL Developer to connect to DB instance running, yet i fail to make any connection: As login/password i enter "sysdba/oracle" (or sys/oracle or oracle/oracle or sysdba/password) with no avail. The "username/password invalid" prompt is getting for most of my trials: enter image description here

The hr/hr user account is not yet unlocked. This post explains how to do it. But prior to that i neen any connection. What username/password i need for an initial connection? Need your help.

UPDATE

The shot of the env. and system variables in Win 8.1: enter image description here

TNS ping with igor: enter image description here

The bin directory without netca: enter image description here

Community
  • 1
  • 1
Igor Savinkin
  • 5,669
  • 8
  • 37
  • 69
  • Just run this command `sqlplus / as sysdba` and create new user IGOR with desired privileges, then login via SQL Developer using IGOR schema. – Egor Skriptunoff Mar 24 '14 at 08:13

1 Answers1

0

Seems like you forgot the default password and you dont have a user to log in with.

Connect to the database from the command line as sysdba using an os admin user

sqlplus / as sysdba

Create your self a dba user

create user igor identified by topsecret; 
grant dba to igor;

conn igor/topsecret
haki
  • 9,389
  • 15
  • 62
  • 110
  • thank you, @haki, it does work in command line, yet, as i enter these credentials in SQL Developer the error transpire - "Cannot access NSL data files or invalid enviroment specified". Should i disconnect in SQL*Plus and then try in SQL Developer? – Igor Savinkin Mar 24 '14 at 09:12
  • You shouldent experience NLS issues when connecting locally. First, run `netca` from the cmd and follow the wizard to add a new Local net service name configuration (hence the NLS). After testing the new connection you should be able to connect from sql developer using the nls name you provided. You can also test it from the cmd with `tnsping the_name_you_selected` – haki Mar 24 '14 at 09:55
  • as i run **netca** in command line the responce is '*netca* is not inner nor ouside program to be run nor packed file' (translation from russian). – Igor Savinkin Mar 24 '14 at 10:17
  • Then you need to set an os environment variable for `ORACLE_HOME` with the path to your oracle home. Go over the installation docs. – haki Mar 24 '14 at 11:41
  • I've done as you suggested: ORACLE_HOME="C:\oraclexe\app\oracle\product\11.2.0\server" having the path to the directory containing bin directory. (according to [here](http://stackoverflow.com/questions/761557/proper-way-to-set-oracle-home) ). – Igor Savinkin Mar 24 '14 at 12:53
  • ORACLE_HOME should be set to the base directory as you did. now add the bin directory to the `PATH` environment variable and you should be able to execute sqlplus, netca etc from the cmd. – haki Mar 24 '14 at 13:00
  • i've added env. variable PATH='C:\oraclexe\app\oracle\product\11.2.0\server\bin' yet still the same with netca . – Igor Savinkin Mar 24 '14 at 13:11
  • the PATH should be enviromant or system variable? In my case both are set for 'C:\oraclexe\app\oracle\product\11.2.0\server\bin;...' – Igor Savinkin Mar 24 '14 at 13:40
  • If you have oracle/bin set in your environment variable `path` you should be able to execute both sqlplus and netca from the command line. – haki Mar 24 '14 at 13:57
  • sqlplus works well, yet `netca` fails (with above error msg.). I've added screenshot to the Update section. – Igor Savinkin Mar 24 '14 at 14:20
  • never mind the netca, have you made sure you'r using a tns entry to log into sql developer ? you have several options there. – haki Mar 24 '14 at 14:32
  • seems TNS failed, see screenshot in Update section. – Igor Savinkin Mar 24 '14 at 14:44
  • is it possible that oracle XE does not have netca ? (do you see an executable by that name in you'r oracle/bin folder ? ) – haki Mar 24 '14 at 14:47
  • seems no **netca** in bin directory (screenshot is above). – Igor Savinkin Mar 24 '14 at 14:55
  • Then edit `tnsnames.ora` manually ([docs](http://www.orafaq.com/wiki/Tnsnames.ora)) – haki Mar 24 '14 at 14:57
  • thank you, really i have no idea how(what) to edit in `tnsnames.ora` file. As i was searching i've found some references to the NSL_LANG issues - [here](https://community.oracle.com/thread/430906) and [here](http://stackoverflow.com/questions/7700330/ora-12705-cannot-access-nls-data-files-or-invalid-environment). The win registry on my comp does not have the NLS_LANG environment variable. The rusult of `select userenv('LANGUAGE') from dual` gave me **RUSSIAN.RUSSIA.AL32UTF-8** while `select * nls_database_parameters` issued with NLS_LANGUAGE - AMERICA, NLS_TERRITORY - AMERICA ... – Igor Savinkin Mar 24 '14 at 17:40
  • My attempt to change by `alter session set nsl_territory='RUSSIA'` profited nothing, the NLS parameters remained the same. – Igor Savinkin Mar 24 '14 at 17:44
  • In tnsnames.ora the config data seems to be ok: `XE = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = igor-pc)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE) ) )` – Igor Savinkin Mar 24 '14 at 17:47
  • If you can loging to the database with `igor/topsecret@xe` then make sure that when logging in with sql developer you'r selecting connection using tnsnames and that the connection name is XE. – haki Mar 25 '14 at 06:11
  • Before i was logging with 'Basic' type of connection. Now i chose the TNS type with 'XE' for network alias. Still it issues the same error. – Igor Savinkin Mar 25 '14 at 12:54