Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Sybase -> Oracle8 SQL

Re: Sybase -> Oracle8 SQL

From: Teresa Larson <tlarson_at_ari.net>
Date: 1998/02/19
Message-ID: <6cg2to$9ph@ari.ari.net>#1/1

Anis Bouagina (boua_at_ant.uni-hannover.de) wrote:
: I need to create an Oracle8 database for use with Jmapi.
: This is an Example with Sybase via isql.
: Can you give me similar SQL statements with my Oracle8 database .

There are no comparable commands for what you want to do because the concept of separate databases does not exist in the Oracle world. An Oracle instance is the combination of the SGA (shared memory basically) and the database. All objects owned by a particular user are considered a schema no matter where (what tablespaces) those objects reside. A schema in Oracle is conceptually similar to a database in Sybase.

: The Sybase Code :
: 1> create database testdb
: 2> on userdb=20
: 3> log on userlog=10
: 4> WITH OVERRIDE
: 5> go

If Oracle has been installed and an instance created, then you just need to create the user and give the user "quota" on the tablespaces where you want to create database objects.

If an instance has not been created, then you're really gonna miss those 5 lines above. :-) There is no way I can relate to you the series of commands that you need to execute to create a database in Oracle. If you want a script to use as a guide, send me email at work and I'll send you one. I am no Oracle expert, so I may not do things in the most efficient way, but I know it works because I ran it. :-)

: 1> sp_dboption testdb, "trunc log chkpt", "true"
: 2> go

This is Sybase-specific.

: 1> sp_addlogin user_1, passwd_1
: 2> go

create/add user_1 identified by passwd_1 ...

I can't remember if it's create or add (sad, I know) and the "..." is the default tablespace, temp tablespace and quotas for the user. I'll send you a sample script for adding users too if you need it.

: 1> use server_1
: 2> go

As I said, there is no concept of multiple databases. An Oracle instance manages one database. The ORACLE_SID environment variable is comparable to DSQUERY in the Sybase world. You specify the database you want to access by setting ORACLE_SID to the appropriate instance. The username you use to login determines the schema you are "in".

: 1> sp_changedbowner user_1
: 2> go

Again, since you don't have the concept of databases, there is no need to change the database owner.

You definitely need access to documentation for this stuff. You might want to check out the following URL's. They are a couple of useful Oracle sites:

	http://www.oramag.com/
	http://www.onwe.co.za/frank/faqmain.htm

				Hope this helps
				Teresa Larson

     _________________________________________________________________
    /  Teresa A. Larson                 http://www2.ari.net/jmasino/ /
   /  Bell Atlantic                          Voice: (301) 282-0224  /
  /  13100 Columbia Pike, A-3-3                    tlarson_at_ari.net /
 /  Silver Spring, MD  20904         Teresa.A.Larson_at_bell-atl.com /
/________________________________________________________________/
                      #include <std_disclaimer>
Received on Thu Feb 19 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US