Solved

Help with IBM DB2 DBMS

Posted on 2012-04-03
5
592 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
DB2 Drivers Windows Server - Database port number 4 440
DB2 tablespace disk full error 33 1,086
AS400 Single Sign On 3 1,155
SSIS Connection Manager Password Disappears 6 106
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…
Recursive SQL in UDB/LUW (it really isn't that hard to do) Recursive SQL is most often used to convert columns to rows or rows to columns.  A previous article described the process of converting rows to columns.  This article will build off of th…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

867 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

22 Experts available now in Live!

Get 1:1 Help Now