473,386 Members | 1,654 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How can I connect to SAMPLE database?

8
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,
Feb 28 '07 #1
6 13181
r035198x
13,262 8TB
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
Mar 1 '07 #2
zhif
8
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,
Mar 1 '07 #3
Thanks! This has helped me too.
Sep 25 '07 #4
r035198x
13,262 8TB
Thanks! This has helped me too.
Good to know
Sep 25 '07 #5
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!
Oct 5 '15 #6
Thanks sir! That really help me
Nov 30 '15 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: yuzx | last post by:
hi,all i am python newbie,i try to connect to db2 use python,i find it on python-db2 doc: $ python >>> import DB2 >>> conn = DB2.connect(dsn='sample', uid='db2inst1', pwd='ibmdb2') >>> curs...
7
by: C.E.O. Gargantua | last post by:
I am using the IBM DB2 Connector class of the Redistributable DB2 Run-Time Client Lite in a c# .net application using Visual Studio. Running the code: string myConnString =...
3
by: Markus Keuthmann | last post by:
Hi, is it possible to connect to a DB2 database through PHP WITHOUT ODBC like in MySQL? Example MySQL: // Open the database connection and use the sample // database $connection =...
4
by: banz | last post by:
Hello I have a problem to resolve: I wrote a Perlscript which caches data from a server (local on my machine) I would like to have a other connection to a remote server but I don't know how to...
6
by: yoyo | last post by:
Mabey I'm missing something very basic, but I can't seem to get it to work. I'm trying to follow along in the sample programs that tells how to do that, but mine still doesn't work. In my...
0
by: vicky | last post by:
Hello Experts, Trying to run sample Postgrel's ECPG(Embedded SQL)programs on RHL 9.0. Im unable to connect to PostgreSQL database (sirishadb) when I run the program .... # su postgres...
0
by: Larry Rebich | last post by:
I am trying to use the sample web template that is distributed with Visual Studio 2005 called 'Personal Web Site Starter Kit'. After running for awhile it fails with the following message: ...
5
by: danfan46 | last post by:
Hi! I have a previous post on the subject that connect takes a long time. I uninstalled db2 completely. Installed V9.5 Installed fixpack 1 created das created an instance installed...
4
by: psyvanz | last post by:
Im a college student, my program is a computerized enrollment system, Im using MS ACCESS database in connecting my VB6 program form. Inside i'd created two tables, named "tbstudentinfo" and...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.