I'm completely newbie to the database.
I successfully installed instant client for Mac, and now can use sqlplus /nolog
in the terminal, but I can't log in any database because I don't have any except for some txt files, nor can I create any user.
After a lot of search, I have tried these codes to create a new user, however, none of them can do.
SQL> create user t1 identified by tiger;
SP2-0640: Not connected
SQL> conn t1/tiger
ERROR: ORA-12545: Connect failed because target host or object does not exist
SQL> create user t1@localhost identified by tiger;
SP2-0640: Not connected
SQL> conn t1/tiger@localhost
ERROR: ORA-12541: TNS:no listener
SQL> conn scott/tiger@orcl
ERROR: ORA-12154: TNS:could not resolve the connect identifier specified
Here are my settings
tsnnames.ora file
ORALOCAL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521)))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
listener.ora file
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
)
)
)
)
The software requirement in my lab class is Oracle XE on Windows, but I don't feel like to run VM on my Mac, and I saw what they did was just login the user that created when they installed XE, then create
, connect
, start
the txt file to build a database, and all done. I feel really weird that it is so difficult for Mac users.