Solved

Help with IBM DB2 DBMS

Posted on 2012-04-03
5
591 Views
Last Modified: 2012-04-04
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
Comment
Question by:JameMeck
  • 2
  • 2
5 Comments
 
LVL 45

Accepted Solution

by:
Kdo earned 400 total points
ID: 37800680
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
 

Author Comment

by:JameMeck
ID: 37804596
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
 
LVL 16

Assisted Solution

by:theo kouwenhoven
theo kouwenhoven earned 100 total points
ID: 37805238
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
 

Author Comment

by:JameMeck
ID: 37805272
Dear sir, I understood the problem.

Thank you very much!
0
 
LVL 45

Expert Comment

by:Kdo
ID: 37805768
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

November 2009 Recently, a question came up in the DB2 forum regarding the date format in DB2 UDB for AS/400.  Apparently in UDB LUW (Linux/Unix/Windows), the date format is a system-wide setting, and is not controlled at the session level.  I'm n…
Recursive SQL in UDB/LUW (you can use 'recursive' and 'SQL' in the same sentence) A growing number of database queries lend themselves to recursive solutions.  It's not always easy to spot when recursion is called for, especially for people una…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now