473,900 Members | 3,343 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How can I connect to SAMPLE database?

8 New Member
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 13220
r035198x
13,262 MVP
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 New Member
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
jeeva86
1 New Member
Thanks! This has helped me too.
Sep 25 '07 #4
r035198x
13,262 MVP
Thanks! This has helped me too.
Good to know
Sep 25 '07 #5
wen zhong
1 New Member
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
RizalDarma
1 New Member
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
5301
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 = conn.cursor()
7
19783
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 = "DATABASE=192.168.1.43;UID=XXXX;PWD=XXXX"; DB2Connection myConnection = new DB2Connection(myConnString); myConnection.Open(); Throws this error on the .Open() method:
3
3887
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 = mysql_connect("localhost","user1","xxxx"); mysql_select_db("sample", $connection);
4
6483
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 define the servername / hostname in my Perl Progrem.. Here is the code:
6
2713
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 program I want to do a select from one database, and insert some stuff into another database. I've got all the connects and disconnects declared and the pre-compile doesn't complain about any of that, but when I say bldapp, the precompiler does say that...
0
2294
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 (enter)
0
2622
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: ------------------------------------------ Server Error in '/PersonalWebSiteStarter' Application. -------------------------------------------------------------------------------- An error has occurred while establishing a connection to the server. ...
5
3136
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 database sample.
4
2017
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 "tbstudentfees". In my 1st table i renamed my fieldname to STUDENTNUMBER and STUDENTNAME on the second fieldname, then below i entered (0001) for studnumber and (Paul) for studname. The 2nd table is almost the same with the 1st table but i added another...
0
9997
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9845
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11276
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10976
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
8043
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7204
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5891
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
4301
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3320
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.