Solved

Help with IBM DB2 DBMS

Posted on 2012-04-03
5
595 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:
Kent Olsen 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:Kent Olsen
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

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Problem to script 14 189
DB2 join tables across schemas 5 576
DB2 return first match 3 116
How to create a stored procedure in AS400 1 161
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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

830 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