Uninstalling IBM DB2 Express C - db2

I'm trying to uninstall IBM DB2 Express C in Windows 7. The uninstaller completed successfully (removed files, users, etc) but the databases which I created were not removed. I still have about 1GB of database files in C:\DB2\NODE0000. How do I also remove the databases?
PS: DB2 is now uninstalled. DB2 drop database command will not work now right?

The uninstaller doesn't know if you're removing it for reinstallation purposes, so it doesn't automatically delete databases that you created. You don't have a db2 command available anymore, so you have to remove it manually.
Since DB2 is completely uninstalled, you can simply remove the files by dragging the C:\DB2 directory to the trash and emptying it. (You may want to ensure that there aren't any files like you created manually in the directory, though).
You may also want to look for additional files that may have been left in C:\ProgramData\IBM\DB2.

Related

How do I remove postgres from Homebrew

In my /usr/local/var/ I see there are directories of postgresql#9.6, postgresql#9.5, even after I ran brew uninstall postgresql#9.6. How do I get rid of these directories?
It does contain your data, this is why it's not deleted. Say you had trouble with postgres, and decided to reinstall it, you don't want to lose your data because of it. If you did a migration of your databases to a new version or don't need any of the databases anymore you can just delete these folders manually.

Changing installation directory of installed DB2 in AIX 7.1

I have installed DB2 10.1 in AIX 7.1 at /opt/IBM/db2/V10.1. But there is a script which is expecting DB2 at /opt/db2_10_1.
I am not sure if it is possible to change the directory of an installed software and if I do it, what are the points I have to keep in my mind before performing this step.
FYI- I am not an AIX or DB2 expert. I am just performing this task as instructed.
Did your instructions specify a non-default path for the Db2-installation?
(The path /opt/IBM/db2/V10.1 is a typical default for AIX )
Do not manually hack to change the installation directory of Db2, just because a script is badly written! Responsible admins would never allow such mistakes on production environments.
It is an error for a script to hard-code a Db2-installation path. That script should be coded correctly to determine the Db2-installation path, or to have that information provided via configuration or arguments.
A possible option is to create a symbolic link so that /opt/db2_10_1 points to the real path at /opt/IBM/db2/V10.1 , but this is not guaranteed to work for all situations, it depends on how badly written is the script - so other different errors may appear later from that script (although Db2 itself will function normally).
A separate matter is that it is unwise to install a Db2 version that is already out of support (end of life). Does the business understand the consequences of installing an out-of-support version? (unless the business has purchased an extended support contract from IBM).
You have to make new install
stop instance
rename sqllib directory
recreate instance using db2icrt in new binaries in install directory
import catalogued database with db2cfimp previously exported using db2cfexp

Cannot reinstall PostgreSQL because Windows thinks it's still installed

I've installed PostgreSQL but I want to reinstall it to another directory. So I've uninstalled it and when I execute the installer I get:
An existing PostgreSQL installation has been found at C:\Program Files (x86)\PostgreSQL\9.1. This installation will be upgraded.
I'll add that I didn't uninstall PostgreSQL with Add/Remove programs from Control Panel because I was getting an error in French so I just removed the main directory and then removed it from Control Panel.
I've also removed HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\postgresql-9.1 and WampServer which used PostgreSQL (just in case). I cannot find any other keys in regedit because the search is taking forever (and I think it's bugged). And I got rid of the directories C:\Users\<username>\AppData\Roaming\postgresql and C:\USers\postgresql.
Perhaps it has something to do with Visual Studio because when I run the installer I briefly get a window:
I've finally done it. I had to remove all keys in the Registry.
Seems obvious, right?
But Win10 Regedit is bugged and if there are keys that are longer than 255 chars it goes into an infinite loop. I've found no fix for this.
So one of the solutions is to download Regscanner, search for "postgre" and "pgadmin" and remove all entries but with Regedit. I mean, you can probably use Regscanner too but I prefered to delete keys with a native tool. It's a lot slower, though, as you have to manually find all keys.
Even though this already has a solution, I'm documenting the steps I had to take to accomplish a full manual uninstall on Windows Server 2016:
open a CMD window with "Run as Administrator"
sc query postgresql-9.1 or sc query postgresql-x64-9.1, use this for step 3 and 4.
if the STATE was RUNNING, then do: sc stop postgresql-9.1
sc delete postgresql-9.1
using the file explorer, locate the postgres software directory, probably "c:\Program Files (x86)\PostgreSQL\" ... right click on this, properties, security, ownership, take ownership, ok ok ok. then delete this folder and everything in it.
using the file explorer, locate the postgres data directory. Sometimes it's in the same directory as in step 5, and other times it will be in something like D:\postgres\data
net user postgres /delete
windows key + r to open Run prompt. Type regedit
scroll to HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node and/or HKEY_LOCAL_MACHINE\SOFTWARE
delete both folders with the word PostgreSQL in them

Does Postgresql work after copied to other directory on windows?

I'm new to Postgresql and am going to install on A directory for my Application.
After building a package including the Application and Postgresql, I should deliver it to other user(by Installer but Postresql is not embedded).
I was wondering if it is okay for me to just copy Postgresql to other directory without any consideration of registry or environment variables on Windows.
Does it work by copying the all of directories to other directory or server?
If you stop the running PostgreSQL service, and you preserve file permissions when copying/moving, and the destination is also a NTFS filesystem, it will work. But you'll have to adjust the service definition or create a new one to start from the new location; PostgreSQL won't know where the data directory is until you tell it.
However.
You should simply initdb PostgreSQL where it needs to be in the first place. There's no need to copy or move the data directory. Ask the user where they want it to be put and then put it there from the start.
I strongly recommend that you bundle PostgreSQL binaries in your installer rather than having the user run a PostgreSQL installer first. Then have your app initdb its own private PostgreSQL data directory for its use.
See Installation of postgresql with NSIS (it doesn't matter if you're not using NSIS, the principles are the same).

Firebird 2.5 reports "is not a valid database" although it is

I've got two computers both running Firebird (let's called them A and B) and two database files (let's call them a.fdb and b.fdb), both copied to both computers. On B I get the message
b.fdb is not a valid database
The other files work, on A both files work.
This would be easy to explain, if B was an older version, but it's a newer one (it was FB 2.1, and because of this problem I installed FB 2.5). The files a.fdb and b.fdb have ODS 11.1 and 10.1, respectively. It looks like new versions of FB wouldn't support ODS 10.1 anymore, which I can't believe. But I see no other explanation, can you?
I had the same problem with an old database.
In my case even the gbak command presented the "is not a valid database". (I also tried with the FIX_FSS_METADATA option)
I found that if the database was created in an 32bits environment it can't be opened in a 64bits one.
So, what I had to do was:
Create a VM with a 32bits environment (in my case I created a VM with Windows XP)
Copy the database to this VM and make a backup using GBAK
Copy the backup file to my machine (64bits)
Run a restore using GBAK
After all this I could open the database again.
Hope it helps!
Try to make backup and restore of database.
In my case I can't open a database whose was created in 32 bits in a 64 bits, so try to install firebird in 32 bits