How can I connect to SAMPLE database?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zhif
    New Member
    • Oct 2006
    • 8

    How can I connect to SAMPLE database?

    I installed IBM DB2 Database for Window (Ver. 9) before.
    Meanwhile, I installed the database SAMPLE.
    Because I forgot my password, I uninstalled later on.

    Several days ago, I reinstalled again. When I try to connect to sample database (db2 => connect to sample user db2admin), it shows,

    SQL1013N The database alias "SAMPLE" could not be found. SQLSTATE=42705

    However, when I tried to get back to reinstalled SAMPLE database from my installed program (db2exc_91_win_ x86, same as what I used at the first time installation), the error message comes up as following,

    Existing "SAMPLE" option was not specified...
    Attempt to create the database "SAMPLE" failed...
    SQL1005N The database alias "SAMPLE" already exists either the local database directory or system database directory.

    So, how can I found the existing SAMPLE database? How can I connect to them?

    Thanks, everybody.

    Cheers,
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by zhif
    I installed IBM DB2 Database for Window (Ver. 9) before.
    Meanwhile, I installed the database SAMPLE.
    Because I forgot my password, I uninstalled later on.

    Several days ago, I reinstalled again. When I try to connect to sample database (db2 => connect to sample user db2admin), it shows,

    SQL1013N The database alias "SAMPLE" could not be found. SQLSTATE=42705

    However, when I tried to get back to reinstalled SAMPLE database from my installed program (db2exc_91_win_ x86, same as what I used at the first time installation), the error message comes up as following,

    Existing "SAMPLE" option was not specified...
    Attempt to create the database "SAMPLE" failed...
    SQL1005N The database alias "SAMPLE" already exists either the local database directory or system database directory.

    So, how can I found the existing SAMPLE database? How can I connect to them?

    Thanks, everybody.

    Cheers,
    You did not delete the conatiners and nodes for the database when you uninstalled it. You might have to just create another database with a different name. If you still want to work with the name Sample for the database, you might have to uninstall the DB2 (make sure you delete all files including those in my documents) and install again

    Comment

    • zhif
      New Member
      • Oct 2006
      • 8

      #3
      Thanks sir. Indeed, like you said, after I uninstalled it, I did not delete the conatiners and nodes for the database when I uninstalled it.

      So, after I deleted all the files in C:/Program Files/IBM after I did uninstall process and deleted C:/DB2, the default instance when I installed the DB2, the reinstall the SAMPLE database is successful this time.

      Thank you very much.

      Cheers,

      Comment

      • jeeva86
        New Member
        • Sep 2007
        • 1

        #4
        Thanks! This has helped me too.

        Comment

        • r035198x
          MVP
          • Sep 2006
          • 13225

          #5
          Originally posted by jeeva86
          Thanks! This has helped me too.
          Good to know

          Comment

          • wen zhong
            New Member
            • Oct 2015
            • 1

            #6
            No. You do not need to reinstall it. Only one sentence could solve this problem:
            Db2 catalog db sample as sample
            Please refer to this page:http://www.databaseskill.com/3166676/
            I search this result for a long time. Finally, I make it!

            Comment

            • RizalDarma
              New Member
              • Nov 2015
              • 1

              #7
              Thanks sir! That really help me

              Comment

              Working...