How to create a new Oracle scheme step by step

Printer-friendly version

In order to be able to make all the steps you must initiate the session in the database with a user with administration permissions, you can use the SYSTEM user, for example

  • Creation of tablespace for data, and another one for index.

These tablespaces are the location where Oracle will save the objects of the scheme which we are going to create.

Tablespace for data, with initial size of 1024 Mb, and autoextensive

CREATE TABLESPACE "APPDAT" LOGGING DATAFILE '/export/home/oracle/oradata/datafiles/APPDAT.dbf' SIZE 1024M EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO

  • Tablespace for indices, with initial size of 512 Mb, and autoextensive

CREATE TABLESPACE "APPIDX" LOGGING DATAFILE '/export/home/oracle/oradata/datafiles/APPIDX.dbf' SIZE 512M EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO

  • Creation of the user who is going to work on these tablespaces, and who will be the owner of the objects that are created in them

CREATE USER “APP” PROFILE “DEFAULT” IDENTIFIED BY “APPPWD”

DEFAULT TABLESPACE “APPDAT” TEMPORARY TABLESPACE “TEMP” ACCOUNT UNLOCK;

  • Assign the permissions necessary to work.

    “Connect” and “Resource” rolls provide minimum permissions

GRANT “CONNECT” TO “APP”;

GRANT “RESOURCE” TO “APP”;

We can complete the allocation of permissions with specific privileges on objects to assure that user can conduct all the operations he needs.

GRANT ALTER ANY INDEX TO “APP”;

GRANT ALTER ANY SEQUENCE TO “APP”;

GRANT ALTER ANY TABLE TO “APP”;

GRANT ALTER ANY TRIGGER TO “APP”;

GRANT CREATE ANY INDEX TO “APP”;

GRANT CREATE ANY SEQUENCE TO “APP”;

GRANT CREATE ANY SYNONYM TO “APP”;

GRANT CREATE ANY TABLE TO “APP”;

GRANT CREATE ANY TRIGGER TO “APP”;

GRANT CREATE ANY VIEW TO “APP”;

GRANT CREATE PROCEDURE TO “APP”;

GRANT CREATE PUBLIC SYNONYM TO “APP”;

GRANT CREATE TRIGGER TO “APP”;

GRANT CREATE VIEW TO “APP”;

GRANT DELETE ANY TABLE TO “APP”;

GRANT DROP ANY INDEX TO “APP”;

GRANT DROP ANY SEQUENCE TO “APP”;

GRANT DROP ANY TABLE TO “APP”;

GRANT DROP ANY TRIGGER TO “APP”;

GRANT DROP ANY VIEW TO “APP”;

GRANT INSERT ANY TABLE TO “APP”;

GRANT QUERY REWRITE TO “APP”;

GRANT SELECT ANY TABLE TO “APP”;

GRANT UNLIMITED TABLESPACE TO “APP”;

Now this user can connect and start working on his scheme

 

Well, if you are looking

Well, if you are looking forward to create a new Oracle theme, there are certain aspects that you need to take into account and initiating the session in database is the first and foremost thing to do. Of course, the user should have complete administrative privileges. I personally use the USER as it has complete administrative permissions. However, when you perform the step by step instructions given here, make sure you assign all the permissions accordingly! business continuity planning software

A simple way to export data from a query, table, etc.. of an oracle database to a flat file is to use the SPOOL command in SQLPlus. This would not need to rely on visual...
Data mining or data mining is the nontrivial process to discover valid patterns, new, potentially useful and understandable within a data set, as defined by Piatetsky-Shapiro...
In a previous blog entry ( OpenSource Database. Why do we choose MySQL for our project? ), we talk about open source databases as interesting and reliable option for the...
These are the 20 most popular 2010 contents on IBM developerWorks. The TOP 20 is based on newsletter subscriber activity. Very interesting list, specially for developers.
Dataprix We have created a space in which we call Lab, accessible from the domain labs.dataprix.com, where we operate online experiments and demonstrations of products....
The cloud has now largely managed to wrap the entire ICT operation of any enterprise, from e-mail and text editing to creating an online store or backup systems. It has also...