Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Question for DBA who do both Oracle and DB2
On 4 Oct 2002 07:25:51 -0700, sheemat_at_yahoo.com (Mathew) wrote:
Control Center is pretty cool and much Better than OEM IMO. I do most of my Oracle work using command line. Its a matter of learning the commands.
Below is from an Article.
>IRAMAKRISHNA KOLLURU
With these reference tables, you can translate your Oracle skills into
a DB2 future.
Learning the Lingo
You’ve honed and polished your Oracle DBA skills over the years. Then
one day, something happens.
Your company decides to migrate to a new database. Or, you decide to
migrate from your
company and want to expand your skills. Do you have to start over from
the beginning?
Not if you’re migrating to DB2 Universal Database (DB2 UDB). IBM
provides a number of resources
to help DBAs transfer their skills to the DB2 environment, including a
free, self-study course for relational
DBAs that you can download from the Web. (For a complete list of IBM
migration resources, go to ibm.
com/software/data/db2/migration.)
I’ve put together several reference tables that you can keep by your
side as you start to explore DB2:
Table 1 (page 50) compares the different approaches to databases and
instances. Table 2 (page 52)
shows the DB2 equivalents for common Oracle commands. I’ve also
written sample code for moving
Oracle data to DB2, which you can read in the online version of this
article (www.db2mag.com/db_area/
archives/2002/q1/kolluru.shtml). Please note: These tables cover DB2
UDB v.7.1 for Windows NT and
Oracle 8.0 and higher.You can find more detailed information in the
DB2 reference manuals available
online.
So dust off your skill set and get ready to update.
www.db2mag.com DB2 magazine 49
Users Users are created by the database. Users are created at the
operating system level.
Operating system users are possible.
Instances You can have one database per instance. One instance can
have multiple databases.
(However, in Oracle Parallel Server, you Use the following to create
them:
can have multiple instances for one
database.) Create set db2instance=inst1
db2icrt inst1
Delete db2idrop inst1
List db2ilist
Databases Create database doesn’t create any Create database creates
three default
default tablespaces. tablespaces: SYSCATSPACE,TEMPSPACE1,
and USERSPACE1.
Create set db2instance=inst1
db2start
db2cmd /c /w /i db2 create database db1
Drop db2cmd /c /w /i db2 drop db db1
List db2cmd /c /w /i db2 list db directory
Sample Oracle provides Scott, a sample schema DB2 provides the SAMPLE
database
where new users can learn SQL. for learning and testing. Here’s how to
create it:
set db2instance=inst1
db2sampl
Tablespaces Data files are managed by the database. DB2 uses two kinds
of tablespaces:
Oracle tablespaces are similar to DB2 System Managed Storage (SMS) and
DMS.
Database Managed Storage (DMS). Objects (for example, tables and
indexes) placed on
SMS tables are individual files.Containers in DB2 are
synonymous with data files in Oracle. Examples:
Create
db2cmd /c /w /i db2
connect to db1
SMS (where d:\inst1\systab is the directory location):
create regular tablespace \
db1tab managed by system using \
(‘d:\inst1\systab’)
DMS (where systab.dbf is the container of size 5120
and 4k page size is the default.):
create regular tablespace db1tab \
managed by database using \
( file ‘d:\inst1\systab.dbf’ 5120)
number(precision,scale) numeric(precision,scale)or decimal(p,s)
varchar2(max 4000) varchar(max 32672) – page size 32k
blob blob(max size) not logged compact* clob clob(max size) not logged compact long clob(max size) not logged compact