Martin Vajsar wrote:This looks like an excellent introductory documentation for Oracle database: 2 Day Developer's Guide. It employs SQL Developer instead of sqlplus, but you can download that for free. (I haven't read this one myself.)
If you're planning some serious affair with Oracle, you certainly should not miss the Database Concepts guide. I'd even suggest to read it first, but if you can't wait trying out the new shiny database, you can leave this one for a little bit later. (I have read this one, albeit for an older version of Oracle, and that is why I recommend it. The 11g version has been reworked to bring the volume down, they say.)
Martin Vajsar wrote:Oracle doesn't support multiple logically separated databases on one database server (roughly speaking). Our FAQ actually describes Oracle's way of achieving the same.
Never ever use the SYS account for anything. When you need admin privileges, use the SYSTEM account (you've provided passwords for these accounts when creating the database). You'll need it at least to create a new user in Oracle and grant him permissions to connect to the DB and to create tables, views etc. From that point on, connect as that user and do all your experiments there. Do not create database objects in the SYSTEM schema.
The 2 Day Developer's Guide I've linked before contains instructions on how to unlock and use the HR user. I'd say it would be easier to get you started, since creating a user has some caveats on its own. If you do need to create your own user promptly, you might start with this script and modify it until it fits your needs. As mentioned before, it has to be run under the SYSTEM account:
I use this in dev environment only, as some of these grants (such as UNLIMITED TABLESPACE) are quite powerful.
Look up the syntax and exact meanings of these commands in the documentation.
lalit khera wrote:
Martin Vajsar wrote:Oracle doesn't support multiple logically separated databases on one database server (roughly speaking). Our FAQ actually describes Oracle's way of achieving the same.
Never ever use the SYS account for anything. When you need admin privileges, use the SYSTEM account (you've provided passwords for these accounts when creating the database). You'll need it at least to create a new user in Oracle and grant him permissions to connect to the DB and to create tables, views etc. From that point on, connect as that user and do all your experiments there. Do not create database objects in the SYSTEM schema.
The 2 Day Developer's Guide I've linked before contains instructions on how to unlock and use the HR user. I'd say it would be easier to get you started, since creating a user has some caveats on its own. If you do need to create your own user promptly, you might start with this script and modify it until it fits your needs. As mentioned before, it has to be run under the SYSTEM account:
I use this in dev environment only, as some of these grants (such as UNLIMITED TABLESPACE) are quite powerful.
Look up the syntax and exact meanings of these commands in the documentation.
hey martin, from all the stuff that you said, i learnt these things:
1. do not create tables in sys account, we need to create users and assign priveliges to them.
2. never use sys/system acount.
3. how to lock/unlock the users
But now i have few more doubts:
1. whats the difference between sys/system account, both are admin accounts, then why its prefferable to use system account not sys??
2. can i create a new account which has same privileges as sys/system account and that admin stuff will be then done through this newly created user account.
May be i will few more questions as i am progressing towards oracle, i believe you never minds.
thanks
lalit khera wrote:Another doubt:
So oracle will be used for creating the database and i can use sql developer to add tables in that database.
No more Blub for me, thank you, Vicar.
Martin Vajsar wrote:I didn't know the XE is so much easier to start with.
No more Blub for me, thank you, Vicar.
chris webster wrote:It sounds like you're getting a bit bogged down here. As you are obviously completely new to Oracle, could I suggest you uninstall Oracle 11g and then download and install the much simpler Oracle Express edition (XE) 11g instead?
Oracle XE is really easy to install and use, and it requires far fewer resources than the standard Oracle RDBMS, but it contains most of the core functionality of any Oracle database, so anything you do here will transfer easily to the enterprise RDBMS in future. Oracle XE gives you just one database, which is called "XE", and you cannot create new databases, but you only need one database for learning the basics of Oracle anyway. I often use Oracle XE for prototyping and trying out different techniques etc, before applying these things on an enterprise database.
Oracle XE should be all you need to work through the 2 Day Developer Guide. There is also a quick intro to SQL Developer and Oracle XE. It's slightly out of date e.g.they tell you to use Oracle XE 10g (you should use XE 11g), but it will give you a starting point. Lots of Oracle's other tutorials assume you are using XE as well. You can connect to Oracle XE via JDBC in the same way as any other Oracle database, so it's useful for trying out your Java/database development as well.
When you start building your tables, you need to create a user schema in your XE database via the SYSTEM user (e.g. in SQLDeveloper) with the right permissions to create/modify tables etc. Then log in as your new user to create the tables, which will be created in your user's schema (not SYS or SYSTEM). In general, you should only log in as SYS or SYSTEM if you are performing database system admin tasks, not for developing your own database objects and applications etc.
So I recommend you switch to Oracle XE 11g, then work through some tutorials etc to get an understanding of how Oracle works. Then switch back to the standard/enterprise RDBMS when you're ready.
I am going down to the lab. Do NOT let anyone in. Not even this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|