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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting started

Status
Not open for further replies.

jambu

Programmer
Nov 20, 2002
185
0
0
GB
I have just installed 8i personal edition and would like to start creating pl/sql scripts but I am not sure how to log in using sql plus.

Is there a default admin user account I can use? what do I need to enter to access this? If there is decent "getting started" docs available can you let me know where to find them?

As you can tell I am not all that familiar with oracle admin so would appreciate the help.
 
Thanks Scott/tiger rings a bell. Isnt it a default user on all oracle installations?

For the host part of the sql*plus login I used the name of the database I provided during installation. Will the scott login actually log me on to that database?

Can anyone tell me how I get a list of tables/users?
 
Yes it will log you on to the sample database. You can list the tables by entering: select table_name from all_tables;

I just have a question to anybody reading this post: how come I can not desc some of the tables (i.e job, department)? When I desc job, i got this error
message:

ERROR at line 1:
ORA-00942: table or view does not exist
 
Hi EdRev

You can’t use SELECT * FROM ALL_TABLES if connected as SCOTT.

You are connected as SYSTEM or someone else with SYSDBA rights.

If connected as SCOTT use SELECT * FROM USER_TABLES – all tables you OWN you se with USER_TABLES.

SYSDBA users can see all tables with ALL_TABLES – but have to use SCHEMA id (=owner) before the table name then using the table.

Ex.

connect system/manager@orcl;

select table_name, owner from all_tables;

desc SCOTT.JOB;


connect scott/tiger@orcl;

select table_name from user_tables;

desc job;

Regards
Allan
Icq: 346225948
 
I suppose Allan is wrong and scott may see both ALL_TABLES and USER_TABLES. Though by default it can not see DBA_TABLES, that does contain a list of ALL tables. In scot's case ALL_TABLES stands for ALL ACCESSIBLE TABLES, while USER_TABLES lists only tables owned by scott.

As for job table, why do you think it exists? Regards, Dima
 
Hi Dima

Ups your right - sorry but if he can see the table in ALL_TABLES then he has to check the OWNER column. Regards
Allan
Icq: 346225948
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top