Topic(s):   DB2 Certification

November 17, 2008

DB2 9 DBA Certification Questions: Split-Mirror environments and ALTER sequence
Posted by Roger Sanders @ 04:21 PM ET | Nov 17, 2008

How well do you understand split-mirror environments? What about ALTER sequence privileges? If you're trying for the DB2 9 DBA certification credential, you'll want to find out just how much you know by trying this week's questions. Once you've mastered these, browse past questions here.

All questions are from the book DB2 9 for Linux, UNIX, and Windows Database Administration: Certification Study Guide, published by MC Press, and are reprinted with permission. Check back each week for more.

QUESTION 53
In a split mirror environment, which of the following commands is used to initialize a mirrored copy of a database named MYDB as a read-only clone of the primary database?

A. db2inidb mydb AS SNAPSHOT
B. db2inidb mydb AS MIRROR
C. db2inidb mydb AS DUPLICATE
D. db2inidb mydb AS STANDBY

QUESTION 54
What does the following statement do?

GRANT ALTER ON SEQUENCE gen_empid TO user1 WITH GRANT OPTION

A. Gives USER1 the ability to change the comment associated with a sequence named GEN_EMPID, along with the ability to give CONTROL authority for the sequence to other users and groups.
B. Gives USER1 the ability to change the values returned by the PREVIOUS_VALUE and NEXT_VALUE expressions associated with a sequence named GEN_EMPID, along with the ability to give CONTROL authority for the sequence to other users and groups.
C. Gives USER1 the ability to change the comment associated with a sequence named GEN_EMPID, along with the ability to give this authority to other users and groups.
D. Gives USER1 the ability to change the values returned by the PREVIOUS_VALUE and NEXT_VALUE expressions associated with a sequence named GEN_EMPID, along with the ability to give USAGE authority to other users and groups.

Answers

QUESTION 53
The correct answer is A. Before a split mirror copy of a DB2 database can be used, it must first be initialized; a split mirror database copy is initialized by executing the system command db2inidb. The syntax for this command is:

db2inidb [DatabaseAlias]
AS [SNAPSHOT | MIRROR | STANDBY]
<RELOCATE USING [ConfigFile]>

where:

DatabaseAlias identifies the alias assigned to the database the split mirror copy that is to be initialized references.
ConfigFile indicates that the database files contained in the split mirror copy are to be relocated according to information stored in the configuration file specified.

As you can see, a split mirror database copy can be initialized in one of three ways:
SNAPSHOT. The split mirror copy of the database will be initialized as a read-only clone of the primary database.
MIRROR. The split mirror copy of the database will be initialized as a backup image that can be used to restore the primary database.
STANDBY. The split mirror copy of the database will be initialized and placed in roll-forward pending state so that it can be continuously synchronized with the primary database. (New logs from the primary database can be retrieved and applied to the copy of the database at any time.) The standby copy of the database can then be used in place of the primary database if, for some reason, the primary database goes down.

Thus, if you wanted to initialize a split mirror copy of a database named MYDB and make it a read-only clone of the primary database, you could do so by executing a db2inidb command that looks like this:

db2inidb mydb AS SNAPSHOT

QUESTION 54
The correct answer is C. The ALTER sequence privilege allows a user to perform administrative tasks like restarting the sequence, changing the increment value for the sequence, and adding or changing the comment associated with the sequence. And when the GRANT statement is executed with the WITH GRANT OPTION clause specified, the user/group receiving privileges is given the ability to grant the privileges received to others. There is no CONTROL privilege for a sequence and the USAGE privilege is the sequence privilege that allows a user to use the PREVIOUS VALUE and NEXT VALUE expressions that are associated with the sequence. (The PREVIOUS VALUE expression returns the most recently generated value for the specified sequence; the NEXT VALUE expression returns the next value for the specified sequence.)

Trackback Pings

TrackBack URL for this entry:
http://www.ibmdatabasemag.com/blog/main/archives/2008/11/question_53_in.html

« The Information Agenda: One plan to rule them all | Main | If it wasn't IMS, what was the world's first DBMS? »





This is a public forum. CMP Media and its affiliates are not responsible for and do not control what is posted herein. CMP Media makes no warranties or guarantees concerning any advice dispensed by its staff members or readers.

Community standards in this comment area do not permit hate language, excessive profanity, or other patently offensive language. Please be aware that all information posted to this comment area becomes the property of CMP Media LLC and may be edited and republished in print or electronic format as outlined in CMP Media's Terms of Service.

Important Note: This comment area is NOT intended for commercial messages or solicitations of business.



CAREER CENTER
Ready to take that job and shove it?
SEARCH JOBS
RECENT JOB POSTINGS
CAREER NEWS
10 Search Engines You Don't Know About
Go beyond Google and get vertical. These specialized search sites will help you find the business information you need -- fast.

Subscribe to the new digital version of IBM Database Magazine
New Digital Version

Sponsored links:



Subscribe to the IBM Database Magazine Newsletter

Email Address *
First Name
Last Name
HTML Preference
HTML Text
 

Fields with * are required.

 




Visit these other IBM and TechWeb Partner Sites: :
Maximizing ROI Through Business Process Management (BPM) and Service-Oriented Architecture (SOA)
Internet Evolution – The Macrosite for News, Analysis, & Opinion About the Future of the Internet
Business Innovation – Technology Strategies and Solutions for Driving Business Success