Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 602
  • Last Modified:

Help with IBM DB2 DBMS

I am newbie with IBM DB2 DBMS.

I need to write some commands below.

Somebody please help me?

Thank you very much!


1. Give a set of commands to create a database name TEST1 in schema DB2ADMIN with the following specification

- Use only 1 default buffer pool IBMDEFAULTBP, having page size of 32K.
- Tablespace for user data: USERSPACE1 for Large data type, using IBMDEFAULTBP, Managed by Database, NOT using Automatic Storage, and is Auto-resizable.


2. Give a set of commands to create a compressed offline backup of the TEST1 database above.


3. Give a set of commands to create a clone of TEST1, called TEST2, in the same DB2 instance, using the backup created in the step above. The TEST1 database must remain functioning.
0
JameMeck
Asked:
JameMeck
  • 2
  • 2
2 Solutions
 
Kent OlsenData Warehouse Architect / DBACommented:
Hi Jame,

Please forgive the question, but the questions look remarkably like homework/classwork kinds of questions.  Is this as assignment or do you have specific needs for the items you've described?  The reason I ask is so that we can stay on the correct side of EE's rules on academic integrity.

The questions also indicate that some basic information is in order.  :)

>> 1. Give a set of commands to create a database name TEST1 in schema DB2ADMIN with the following specification

This is a trick question.  :)  

The hierarchy is server, instance, schema.  On the server, you can run 1 or more copies of DB2.  These copies are called an "instance".  Each copy of DB2 manages only the items that are registered to that copy.  In most environments, only 1 copy of DB2 will be running, hence only 1 instance.

Within each instance are multiple databases.  In this case, database is nearly synonymous with schema.  You can have lots of schemas, but they are peers.  They all have the same level in the logical hierarchy.  Data and queries can span across multiple schemas.

By default, a DB2 user gets a schema that is his logon ID.  Additional schemas can also be created.

So for this question, the answer is "you can't".  You can create database TEST1 on the instance owned (managed) by user DB2ADMIN, but you can't create the database (schema) in the DB2ADMIN schema.


Kent
0
 
JameMeckAuthor Commented:
Dear Kdo,

I am learning IBM DB2 by myself from begining, these question from the book and my friends. Surely not homework it is as an assignment for my job.

And I think there isn't any trick here, just sample question for a beginner like me.

Anyway, if nobody help me with this, I have to read more from the book.

Thank you very much for your help!
0
 
theo kouwenhovenCommented:
Hi JameMeck,

if nobody help me with this

Wrong assumption Jame,  KDO helped you more then you think, its NOT possible to create something in schema DB2ADMIN.
DB2ADMIN is the admin schema and you can't use that.

so he is right, its a trick question.

And because of this answer, the answer on the other questions are "see answer on Q1".

Regards,
Murph
0
 
JameMeckAuthor Commented:
Dear sir, I understood the problem.

Thank you very much!
0
 
Kent OlsenData Warehouse Architect / DBACommented:
Hi Jame,

I thought that the questions you'd asked were asked by someone else and you were tasked with getting the answers, hence my reference to a "trick question".

There's certainly nothing tricky about your asking questions here!  :)


Kent
0

Featured Post

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now