Create first local database [message #246774] |
Thu, 21 June 2007 20:44 |
florida
Messages: 82 Registered: April 2006
|
Member |
|
|
I have Oracle 9i installed on my local Windows XP workstation that will be used for local development only.
Now I am trying to create a database and using OEM Database Configuration Assistant.
I put in FirstDB for the Global Database Name and put in FirstDB for the SID.
I completed the wizard and set up my tnsnames.ora file with the SID and hostname. Then I tried to connect with the Sys login using OEM and it says:
ORA-12545:Connect failed because target host or object does not exist.
Should I put in localhost or 127.0.0.1 for my Global Database Name?
I assume I connect as Sys or System and the password I created after right after creating the database.
Please advise how I can get this to work?
[Updated on: Thu, 21 June 2007 20:45] Report message to a moderator
|
|
|
Re: Create first local database [message #246949 is a reply to message #246774] |
Fri, 22 June 2007 10:35 |
DreamzZ
Messages: 1666 Registered: May 2007 Location: Dreamzland
|
Senior Member |
|
|
Quote: | I completed the wizard and set up my tnsnames.ora file with the SID and hostname. Then I tried to connect with the Sys login using OEM and it says:
ORA-12545:Connect failed because target host or object does not exist.
|
Your LISTENER is running??
Quote: |
Should I put in localhost or 127.0.0.1 for my Global Database Name?
|
Where you want to use this in OEM?
Quote: | I assume I connect as Sys or System and the password I created after right after creating the database.
|
could you connect through SQLPLUS?
|
|
|
|
|
Re: Create first local database [message #247023 is a reply to message #246964] |
Fri, 22 June 2007 21:27 |
florida
Messages: 82 Registered: April 2006
|
Member |
|
|
Thanks, I started listener and can now connect to local database.
I have to log in as SYS. I assume the next steps are:
1-Logged in as SYS create a username called jones
2-Create Schema called firstSchema
3-During creation of firstSchema give jones full privileges to all the objects of the firstSchema such as creating and manipulating tables, query builds, triggers, sequences, view/edit records.
Please advise.
|
|
|
|
Re: Create first local database [message #247032 is a reply to message #247024] |
Sat, 23 June 2007 00:39 |
DreamzZ
Messages: 1666 Registered: May 2007 Location: Dreamzland
|
Senior Member |
|
|
Quote: | 1-Logged in as SYS create a username called jones
|
create user JONES
identified by JONES
default tablespace ts_users
temporary tablespace ts_temp;
Quote: | 2-Create Schema called firstSchema
|
WOWW thats new to me..please tell me how to do that??
by the way when you create user jones its mean Jones schema.
SCHEMA definition
* A schema is the set of objects (tables, views, indexes, etc) belonging to an account.
It is often used as another way to refer to an Oracle account. The CREATE SCHEMA statement lets one specify
(in a single SQL statement) all data and privilege
definitions for a new schema. One can also
add definitions to the schema later using DDL statements.
3-During creation of firstSchema give
jones full privileges to all the objects
of the firstSchema such as creating and manipulating tables, query builds, triggers, sequences, view/edit records.
grant user create session to JONES;
grant create table to JONES;
and
whatever you want...
[Updated on: Sat, 23 June 2007 00:41] Report message to a moderator
|
|
|
Re: Create first local database [message #247424 is a reply to message #247032] |
Mon, 25 June 2007 19:21 |
florida
Messages: 82 Registered: April 2006
|
Member |
|
|
Thanks for all info.
If I understand this correctly I can have a Jones Schema and if I want to create a new user with the name Smith that needs create table privilege to Jones Schema I would do these SQL statements?
create user SMITH
identified by SMITH
default tablespace ts_users
temporary tablespace ts_temp;
grant create table to JONES;
|
|
|
|
Re: Create first local database [message #247627 is a reply to message #247433] |
Tue, 26 June 2007 10:44 |
DreamzZ
Messages: 1666 Registered: May 2007 Location: Dreamzland
|
Senior Member |
|
|
Quote: | if I want to create a new user with the name Smith that needs create table privilege to Jones Schema I would do these SQL statements?
|
In this Smith will be able to create table in his own schema not in Jones schema. For that you should grant create any table system privilege but ANNA told you thats Poor design.
|
|
|
Re: Create first local database [message #247688 is a reply to message #247627] |
Tue, 26 June 2007 21:07 |
florida
Messages: 82 Registered: April 2006
|
Member |
|
|
Thanks, I understand what you are saying about Smith and Jones being seperate schemas.
What if I had a Projects Schema and I wanted several people in my group to have access to the Projects Schema where they can create tables and edit values. I think this is where I am confused because each user would then have to have their own username/password to get into the Projects schema or would we just have one Projects schema login and password?
|
|
|
Re: Create first local database [message #247689 is a reply to message #246774] |
Tue, 26 June 2007 21:22 |
|
BlackSwan
Messages: 26766 Registered: January 2009 Location: SoCal
|
Senior Member |
|
|
Typically (more often than not) an application is contained within a single schema.
Typically end/application users do NOT, do NOT, do NOT have their own schema.
The application "owns" all the objects & all code (PL/SQL packages).
The application manages ALL access to its own objects.
The application presents a "logon" screen to the end user.
The end user enters a valid application username & password that has NOTHING to do with Oracle security.
The end user can only do what the application s/w allows him to do.
The end user NEVER get close to issuing actual SQL statements.
EVERYTHING that occurs within the application is done by the application schema/user/owner.
So there is NEVER a need to create any object in another schema; primarily because there is only 1 schema actually logged into the DB.
UNDERSTAND?
[Updated on: Tue, 26 June 2007 21:26] by Moderator Report message to a moderator
|
|
|
Re: Create first local database [message #247693 is a reply to message #247689] |
Tue, 26 June 2007 21:49 |
florida
Messages: 82 Registered: April 2006
|
Member |
|
|
Thanks for quick reply and all your info and time!!
I understand about the end/application users editing data and their logins which is where we will be using JSP and Servlets for the front end.
In my case I am talking about the several people that will be using Oracle OEM to build and create tables in the Project schema and that is why I am asking about multiple people having privileges to the Project schema. Will these multiple people in my group that are using OEM to build the tables use the same Project schema login and password?
|
|
|
|
Re: Create first local database [message #247696 is a reply to message #247694] |
Tue, 26 June 2007 22:01 |
florida
Messages: 82 Registered: April 2006
|
Member |
|
|
Thanks for the great amount of info you all provided.
"However OEM is a suboptimal tool to develop an application."
I am using a seperate Web tool to build the JSP and Servlets Front end and using OEM for the database.
|
|
|
|
Re: Create first local database [message #250036 is a reply to message #250024] |
Sat, 07 July 2007 03:27 |
|
Michel Cadot
Messages: 68716 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
1/ Don't write IM speak, write plain english
2/ Is this the only solution you can give: destroy the database??? Well, I hope no one will ask you to help him!
Regards
Michel
|
|
|