O'Reilly logo

Oracle Database Administration: The Essential Refe by Brian Laskey, David C. Kreines

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

SQL Commands by Task

One of the most frustrating and time-consuming aspects of database administration, particularly for the novice DBA, is finding the proper command to accomplish a particular task. In Table 13.1, we have listed most common database administration tasks along with the SQL commands used to accomplish these tasks. The detailed syntax of each command is listed later in this chapter.

Table 13-1. Common DBA Tasks and SQL Commands

If You Want to...

Use This Command

Add a column/integrity constraint to a table

ALTER TABLE

Add a comment to the data dictionary about a column

COMMENT

Add a comment to the data dictionary about a table or view

COMMENT

Add a comment to the data dictionary about a snapshot

COMMENT

Add or remove a resource limit to or from a profile

ALTER PROFILE

Add/drop/clear redo log file group members

ALTER DATABASE

Add/rename datafiles

ALTER TABLESPACE

Allocate an extent for a cluster

ALTER CLUSTER

Allocate an extent for the table

ALTER TABLE

Allow/disallow writing to a table

ALTER TABLE

Allow/disallow writing to a tablespace

ALTER TABLESPACE

Back up the current control file

ALTER DATABASE

Begin/end a backup

ALTER TABLESPACE

Bring a rollback segment online/offline

ALTER ROLLBACK SEGMENT

Change a rollback segment’s storage characteristics

ALTER ROLLBACK SEGMENT

Change a snapshot log’s storage characteristics

ALTER SNAPSHOT LOG

Change a user’s default role

ALTER USER

Change a user’s default tablespace

ALTER USER

Change ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required