Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help on DB2 for Windows NT

Status
Not open for further replies.

libab

Programmer
Nov 21, 2001
3
PH
Hi all!
I'm currently (with my team mate) trying to figure out how to create a Database using the programs under DB2 for Windows NT. We've tried using Control Center and adding a database using the Smart guide but this function is disabled (on our part). Is there any way we can go about this?
Thanks in advance. We're pretty new to creating databases using DB2.

eli
 
Hey eli,

The basic systax to create a database is as follows:

"CREATE DATABASE database_name"

Of course you can play around with different parameters, however as I said the basic command is as seen above.
One more thing, you'll have to make sure that you have the right authority to create a table.

Try it and if it doesn't work then send another message.

P.S - are you from Israel?
 
The syntax you gave me is for SQL, right? We have not reached that point yet in our creating of databases, though we are quite familiar with SQL.
Our problem now is more of how to give ourselves authority to create databases or tables in DB2. This probably is the reason why the adding database using Smartguide function is disabled in our case.
I tried typing in "db2set -g db2_grp_lookup=local" on MSDOS (this command is supposed to force DB2 to enumerate groups on the local machine). Is this the right step to giving ourselves access in creating databases? I followed this step from one of the DB2 for Windows NT tutorials online.

Also, would you have any idea on how the programs under DB2 for Windows NT - Command Center, Command Window, Event Analyzer, etc. - works? If they have there specific functions etc.

Thanks in advance again. By the way, I'm not from Israel:)

eli
 
Hey eli,

If you are using NT, then all you have to do is go and create a user in the User Manager (you can find it in the Start -> Programs -> Administrative Tools section. So all you have to do is create a new user and make sure that you make him part of the Administrative group. By doing so, that user should have SYSADM authority on that machine, and thus will have the authority to create Databases.

BTW, what type of DB2 are you using, and I mean is it the Personal edition, enterprise etc.

Let me know if that works.

Thebioman
 
Hi again...
I am already recognized as an Administrator in my pc. Does this not automatically also give me SYSADM authority (authority to create databases)? Just want to clarify this since I read on the online tutorial that this was possible.

Nevertheless, I think I have already solved the SYSADM authorization problem by executing &quot;db2set -g db2_grp_lookup=local&quot; on Command Prompt. Before, there would always be a message regarding the user not having authority to create database function when we ran the CREATE DATABASE <database name> command on the Command Center. Now, this message has disappeared.

Thanks for the tip:) It was what we envisioned the solution to be in the first place. Now however, we are having some problems adding a system correctly in DB2 Control Center. We're supposed to create our database on local...hmmm Do you have any advice on how to do this correctly?

We are using IBM DB2 Personal Editon V. 6.1...

Thanks again. I'll continue researching on DB2...

eli



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top