Topic
  • 16 replies
  • Latest Post - ‏2013-05-06T08:58:23Z by YuanFeng
SystemAdmin
SystemAdmin
1632 Posts

Pinned topic First connection to Data Studio

‏2013-03-29T01:41:17Z |
Installed DB2 10 Express and missed the control center. Installed Data Studio 3.2, and was going to try to import a database backed up on the old Express I had installed. My problem is that my local connection is not shown in the tree on the left. Actually there is nothing there. Just the "All Databases" item with nothing under it.

Every time I try to add a new connection, it wants a database. There is no database. It is a new installation with no database defined. It is just an Instance into which I want to restore a backup from DB2 Express 9.7. So how do I get the instance in there so I can actually do something with it?
Updated on 2013-04-04T20:13:55Z at 2013-04-04T20:13:55Z by SystemAdmin
  • YuanFeng
    YuanFeng
    78 Posts

    Re: First connection to Data Studio

    ‏2013-03-29T02:07:22Z  
    Hi,
    Thanks for using data studio, this is currently limitation, you have to create one database in your database server, then you can use data studio to create connection,and continue create databases.

    We already plan to solve the limitation in future release.
  • SystemAdmin
    SystemAdmin
    1632 Posts

    Re: First connection to Data Studio

    ‏2013-03-29T16:22:25Z  
    • YuanFeng
    • ‏2013-03-29T02:07:22Z
    Hi,
    Thanks for using data studio, this is currently limitation, you have to create one database in your database server, then you can use data studio to create connection,and continue create databases.

    We already plan to solve the limitation in future release.
    OK, so I attempted to load the SAMPLE database and it said that there was no dbstart command, so I checked the services and one of the automatic service was not started, so I started it. This is running on Windows 7 64bit by the way. After that I tried loading it again, and it said it was already there. So I tried to connect to SAMPLE in Data Studio and I get SQL4499N and I am still dead in the water. It doesn't seem like it should be this tough.
  • SystemAdmin
    SystemAdmin
    1632 Posts

    Re: First connection to Data Studio

    ‏2013-03-29T17:22:59Z  
    OK, so I attempted to load the SAMPLE database and it said that there was no dbstart command, so I checked the services and one of the automatic service was not started, so I started it. This is running on Windows 7 64bit by the way. After that I tried loading it again, and it said it was already there. So I tried to connect to SAMPLE in Data Studio and I get SQL4499N and I am still dead in the water. It doesn't seem like it should be this tough.
    Hi,

    Yes. Something does not sound right here. It is typically very easy to connect to the sample database. Can you try out a few things -

    1. Can you go to the CLP (command line processor) and type "db2 list db directory". SAMPLE should show up here as a database. If it does, try to connect to it from CLP. Let me know what happens.

    2. If you can connect to SAMPLE, then Data Studio will automatically create a connection profile called SAMPLE for you. If you see this profile created in Data Studio already, please check the Connection profile properties and make sure they are correct. You can do this, by right click on Connection Profile and go to properties.

    3. Can you tell me if you have DB2 and Data Studio on the same box?

    Let me know and we can decide the next steps if the issue is still not resolved.

    Thanks,
    Vinod
  • SystemAdmin
    SystemAdmin
    1632 Posts

    Re: First connection to Data Studio

    ‏2013-03-29T22:15:22Z  
    Hi,

    Yes. Something does not sound right here. It is typically very easy to connect to the sample database. Can you try out a few things -

    1. Can you go to the CLP (command line processor) and type "db2 list db directory". SAMPLE should show up here as a database. If it does, try to connect to it from CLP. Let me know what happens.

    2. If you can connect to SAMPLE, then Data Studio will automatically create a connection profile called SAMPLE for you. If you see this profile created in Data Studio already, please check the Connection profile properties and make sure they are correct. You can do this, by right click on Connection Profile and go to properties.

    3. Can you tell me if you have DB2 and Data Studio on the same box?

    Let me know and we can decide the next steps if the issue is still not resolved.

    Thanks,
    Vinod
    This is getting stranger.

    I did the command and got this response:
    SQL1057W The system database directory is empty. SQLSTATE=01606.

    So I went to the First Steps program and tried to do the "Create Sample Database" option and got

    Starting the DB2 instance...
    Creating database "SAMPLE" on path "C:"...
    Attempt to create the database "SAMPLE" failed.
    SQL1032N No start database manager command was issued. SQLSTATE=57
    'db2sampl' processing complete.

    I checked the Services and the DB2 - DB2COPY1 - DB service was not started. I started it and tried the operation again and got:

    Creating database "SAMPLE" on path "C:"...
    Existing "SAMPLE" database found...
    The "-force" option was not specified...
    Attempt to create the database "SAMPLE" failed.
    SQL1005N The database alias "SAMPLE" already exists in either the local
    database directory or system database directo
    'db2sampl' processing complete.

    Going to CLP, I tried the directory command again and got the same response as before.

    Is there perhaps something left from 9.7? I uninstalled it after backing up the databases, but did not remove any directories. Are there perhaps some registry entries left over?
  • SystemAdmin
    SystemAdmin
    1632 Posts

    Re: First connection to Data Studio

    ‏2013-03-29T22:25:43Z  
    Can you try running db2sampl with the force option. Type db2sampl -force. This will drop and recreate the sample database if it exists. When you uninstall the DB2 instance and install a new version, it does not remove the databases by default. Can you please try that and let me know what happens?
    Thanks,
    Vinod
  • SystemAdmin
    SystemAdmin
    1632 Posts

    Re: First connection to Data Studio

    ‏2013-04-01T15:25:35Z  
    Can you try running db2sampl with the force option. Type db2sampl -force. This will drop and recreate the sample database if it exists. When you uninstall the DB2 instance and install a new version, it does not remove the databases by default. Can you please try that and let me know what happens?
    Thanks,
    Vinod
    This might be a case of user error, but I started the Command Line Processor and entered:

    db2sampl -force

    It returned some some information that ended with:
    SQL1024N A database connection does not exist. SQLSTATE=08003

    I tried adding the -dpath and got the same. If this is user error, let me know what I am doing wrong.
  • YuanFeng
    YuanFeng
    78 Posts

    Re: First connection to Data Studio

    ‏2013-04-03T07:00:09Z  
    This might be a case of user error, but I started the Command Line Processor and entered:

    db2sampl -force

    It returned some some information that ended with:
    SQL1024N A database connection does not exist. SQLSTATE=08003

    I tried adding the -dpath and got the same. If this is user error, let me know what I am doing wrong.
    db2sampl doesn't require database connection.When you run the command,no need add db2 ahead(db2 db2sampl is wrong),just put db2sampl.
    The correct example:

    F:\Program Files\IBM\SQLLIB\BIN>db2sampl
  • SystemAdmin
    SystemAdmin
    1632 Posts

    Re: First connection to Data Studio

    ‏2013-04-04T20:11:31Z  
    • YuanFeng
    • ‏2013-04-03T07:00:09Z
    db2sampl doesn't require database connection.When you run the command,no need add db2 ahead(db2 db2sampl is wrong),just put db2sampl.
    The correct example:

    F:\Program Files\IBM\SQLLIB\BIN>db2sampl
    If it does not require a database connection, then why am I getting the message. I have done all combinations of trying to execute DB2SAMPL, and I get the same error.
  • SystemAdmin
    SystemAdmin
    1632 Posts

    Re: First connection to Data Studio

    ‏2013-04-04T20:13:55Z  
    Can you try running db2sampl with the force option. Type db2sampl -force. This will drop and recreate the sample database if it exists. When you uninstall the DB2 instance and install a new version, it does not remove the databases by default. Can you please try that and let me know what happens?
    Thanks,
    Vinod
    I got your email about an invitation. I followed the link and accepted the invitation. I tried posting something to the profile and tried the option to send you and email, but have not heard anything back at all. What happened?
  • RuiNie
    RuiNie
    13 Posts

    回复:Re: First connection to Data Studio

    ‏2013-04-21T04:35:23Z  
    I got your email about an invitation. I followed the link and accepted the invitation. I tried posting something to the profile and tried the option to send you and email, but have not heard anything back at all. What happened?

    Hi,

    Not sure if your problem has been resolved, if yes, pls ingore m below comment.

    This is more likely a db2 usage issue instead of a DataStudo issue.
    I guess you did following on your machine:

    1. Installed db2(db2copy1), then created sample db.
    2. Uninstalled db2copy1 but didn't drop the databases first.
    3. Installed another db2(maybe with different version) with the same db2 instance as db2copy1.
    If so, the SAMPLE is in your local directory but is missing from the system directory.

    pls run following steps to resolve this issue:

    1. Run command "db2 list db directory on <directory path on linux or drive name on win>  instead of "db2 list db directory", then you should see all the databases  created in your previours db2copy1.
    2. Run command "db2 catalog db sample on <directory path on linux or drive name on win>", if you are on win, maybe "db2 catalog db sample" is enough.
    3. If the db2 version of your second db2coyp1 is higher than your first dbcopy1, you need to upgrade the SAMPLE db before you connect to it, or you can simply drop it and create a new one. e.g  db2 upgrade db sample

  • drbcpg
    drbcpg
    5 Posts

    回复:Re: First connection to Data Studio

    ‏2013-04-25T05:33:42Z  
    • RuiNie
    • ‏2013-04-21T04:35:23Z

    Hi,

    Not sure if your problem has been resolved, if yes, pls ingore m below comment.

    This is more likely a db2 usage issue instead of a DataStudo issue.
    I guess you did following on your machine:

    1. Installed db2(db2copy1), then created sample db.
    2. Uninstalled db2copy1 but didn't drop the databases first.
    3. Installed another db2(maybe with different version) with the same db2 instance as db2copy1.
    If so, the SAMPLE is in your local directory but is missing from the system directory.

    pls run following steps to resolve this issue:

    1. Run command "db2 list db directory on <directory path on linux or drive name on win>  instead of "db2 list db directory", then you should see all the databases  created in your previours db2copy1.
    2. Run command "db2 catalog db sample on <directory path on linux or drive name on win>", if you are on win, maybe "db2 catalog db sample" is enough.
    3. If the db2 version of your second db2coyp1 is higher than your first dbcopy1, you need to upgrade the SAMPLE db before you connect to it, or you can simply drop it and create a new one. e.g  db2 upgrade db sample

    I am having a similar problem in running Data Studio. Windows 7. same problem on my 32 bit and 64 bit machines.

    I ran your list db directory... and it verified that SAMPLE was present. When I run Data Studio, do a connect i get a ping. I then connect and it is successful.

    Then I want to build a simple script with SELECT

    It ask for a table add, right click. At that point it does not give me a list of tables to choose from as it has done in earlier versions of Data Studio.

    Any ides why it does not give me a list.? I am the only user for the PC and I have Admin rights. I have not set up a separate 'db2admin' I am using my usual user logon and password.

  • RuiNie
    RuiNie
    13 Posts

    回复:Re: First connection to Data Studio

    ‏2013-04-25T13:31:46Z  
    • drbcpg
    • ‏2013-04-25T05:33:42Z

    I am having a similar problem in running Data Studio. Windows 7. same problem on my 32 bit and 64 bit machines.

    I ran your list db directory... and it verified that SAMPLE was present. When I run Data Studio, do a connect i get a ping. I then connect and it is successful.

    Then I want to build a simple script with SELECT

    It ask for a table add, right click. At that point it does not give me a list of tables to choose from as it has done in earlier versions of Data Studio.

    Any ides why it does not give me a list.? I am the only user for the PC and I have Admin rights. I have not set up a separate 'db2admin' I am using my usual user logon and password.

    Hi, 

    Thanks for your feedback on DataStuio.

    Could you pls address your questions with a bit more details ?  

    You said "you want to build a simple script with SELECT, it ask for a table add",  were you trying to  use SQL Editor to create script in DataStudio ?  How did the DataStudio ask for a table?  What's the scenario?

    Normally, you expnad the database node under the Administration Explorer view, click on the folder "Tables", then all the tables should be listed the  OLE (Object List Editor).  If nothing listed in the OLE, can you check the Error Log view to see if there are exceptions show up? 

  • drbcpg
    drbcpg
    5 Posts

    回复:Re: First connection to Data Studio

    ‏2013-04-25T15:24:11Z  
    • RuiNie
    • ‏2013-04-25T13:31:46Z

    Hi, 

    Thanks for your feedback on DataStuio.

    Could you pls address your questions with a bit more details ?  

    You said "you want to build a simple script with SELECT, it ask for a table add",  were you trying to  use SQL Editor to create script in DataStudio ?  How did the DataStudio ask for a table?  What's the scenario?

    Normally, you expnad the database node under the Administration Explorer view, click on the folder "Tables", then all the tables should be listed the  OLE (Object List Editor).  If nothing listed in the OLE, can you check the Error Log view to see if there are exceptions show up? 

    Thank you for the fast feed back. I did some research using CLP and determined the tables for the SAMPLE database were there.

    Knowing that I would guess that I am making an error in the way I am using the Data Studio.

    I will be reviewing my notes and see where I went wrong. If I figure out my error I will post it so some one else  will have the solution.

     

     

  • drbcpg
    drbcpg
    5 Posts

    回复:Re: First connection to Data Studio

    ‏2013-04-26T05:12:17Z  
    • drbcpg
    • ‏2013-04-25T15:24:11Z

    Thank you for the fast feed back. I did some research using CLP and determined the tables for the SAMPLE database were there.

    Knowing that I would guess that I am making an error in the way I am using the Data Studio.

    I will be reviewing my notes and see where I went wrong. If I figure out my error I will post it so some one else  will have the solution.

     

     

    Good Evening,

    I made a lot of progress today. Three steps forward and two back. Much better than the previous days. I am locating the answers and reading up on Data Studio  So far my problems have been of my own making. That is part of the learning process for me. I also make notes in my little black book when I learn from my mistakes.

    I generated a simple script and learned a lot getting there. I ran the script and received a standard Java response of "Null Data". It appears that I may not have any data in the table. I will look at the tables to see if they are empty or something else using CPL. I am at home using that.

    One question. In the past when I brought up "db2cmd" and started it, it would always put the prompt up db2> and I did not need to type it in before my commands. I have forgotten how to set that feature on. I thought that a -p would turn it on but it is not working for me. Open to your thoughts.

    Thanks

     

     

  • drbcpg
    drbcpg
    5 Posts

    回复:Re: First connection to Data Studio

    ‏2013-04-27T05:25:52Z  
    • drbcpg
    • ‏2013-04-26T05:12:17Z

    Good Evening,

    I made a lot of progress today. Three steps forward and two back. Much better than the previous days. I am locating the answers and reading up on Data Studio  So far my problems have been of my own making. That is part of the learning process for me. I also make notes in my little black book when I learn from my mistakes.

    I generated a simple script and learned a lot getting there. I ran the script and received a standard Java response of "Null Data". It appears that I may not have any data in the table. I will look at the tables to see if they are empty or something else using CPL. I am at home using that.

    One question. In the past when I brought up "db2cmd" and started it, it would always put the prompt up db2> and I did not need to type it in before my commands. I have forgotten how to set that feature on. I thought that a -p would turn it on but it is not working for me. Open to your thoughts.

    Thanks

     

     

    Well I have learned a lot about Data Studio. No longer am I taking steps backwards. It is full speed ahead.

    Using CLP determined there was data in all the SAMPLE tables,created some simple queries there and got correct results. At that point I knew I was doing something wrong in Data Studio. I was connecting but nothing was working correctly.

    More research help me understand the task launcher. That lead to understanding a variety of other things and start building complex scripts that worked.

    I would suggest that anybody trying to understand Data Studio down load a document called "Bye Bye Control Center Hello Data Studio" It is a Power Point presentation that explains the Data Studio better than any of the other documents I have read.

    A second document is from a presentation at the IDUG Washington, DC Chapter. "IBM Data Studio for Mainframe Developers" by David Simpson of Themis, Inc. Washington was my home IDUG chapter and they have had some great speakers. Their meetings are all day and worth every minute a persons spends there. That is where I was educated in "Big Data" and learned more than reading on the subject. Unfortunately where I live now the closes IUDG chapter is 3 hours away.

    If I had found those to documents a week ago I would have save 7 days of pain and suffering. There is another document I am going to look at that should be good, "DB2 10 Bootcamp" by IBM.

    Still trying to solve the one question on how to get "db2cmd" to automatically put the db2> prompt up.

     

  • YuanFeng
    YuanFeng
    78 Posts

    回复:Re: First connection to Data Studio

    ‏2013-05-06T08:58:23Z  
    • drbcpg
    • ‏2013-04-27T05:25:52Z

    Well I have learned a lot about Data Studio. No longer am I taking steps backwards. It is full speed ahead.

    Using CLP determined there was data in all the SAMPLE tables,created some simple queries there and got correct results. At that point I knew I was doing something wrong in Data Studio. I was connecting but nothing was working correctly.

    More research help me understand the task launcher. That lead to understanding a variety of other things and start building complex scripts that worked.

    I would suggest that anybody trying to understand Data Studio down load a document called "Bye Bye Control Center Hello Data Studio" It is a Power Point presentation that explains the Data Studio better than any of the other documents I have read.

    A second document is from a presentation at the IDUG Washington, DC Chapter. "IBM Data Studio for Mainframe Developers" by David Simpson of Themis, Inc. Washington was my home IDUG chapter and they have had some great speakers. Their meetings are all day and worth every minute a persons spends there. That is where I was educated in "Big Data" and learned more than reading on the subject. Unfortunately where I live now the closes IUDG chapter is 3 hours away.

    If I had found those to documents a week ago I would have save 7 days of pain and suffering. There is another document I am going to look at that should be good, "DB2 10 Bootcamp" by IBM.

    Still trying to solve the one question on how to get "db2cmd" to automatically put the db2> prompt up.

     

    Thanks for given so many feedback for Data Studio, yes Bye Bye Control Center Hello Data Studio lists the functions Data Studio support and other tools replace control center functions.

    According your question for CLP, I guess you are asking directly for db2cmd, not in Data Studio,am I right?

    the db2cmd is try to load some of the library to you command edit,that help you start with db2,if the db2cmd doesn't work correctly on windows,you can make a try check whether your PATH is set correct to the <DB2 install folder>\BIN,INCLUDE has <DB2 install Folder>\INCLUDE and <DB2 install Folder>\LIB, LIB has <DB2 install Folder>\LIB, DB2INSTANCE also set correctly