How to upgrade MongoDB on Windows Server - windows

How do you upgrade MongoDB on Windows server? Running the Windows installer for the new version only installs a new copy of MongoDB and ignores the existing copy.

Edit:
First start the cmd.exe in admin mode and cd to the location of the old installation, for standard installations:
cd C:\Program Files\MongoDB\Server\3.2\bin
Stop all applications, which are accessing mongodb, then enter
mongod --remove
Then install the new mongo db, copy the mongod.cfg file from 3.2 to 3.4 directory. When you had one, otherwise follow the installation instructions for setting up the new service. This update worked fine for me, all data available, I didn't need to use this features switched off.

I upgraded from version 3.6.0 to 3.6.2 just today and below are the steps involved:
Download the latest version from the [mongodb wesbite][1].
When downloading is complete, stop any running instance of mongodb by typing 'Ctrl+C' on the command console.
Run the installation file and it automatically installs the new version at the same path as the previous version (at C:\Program
Files\MongoDB\Server\3.6).
Start the database server by typing 'mongod'.
All previous databases will be accessible to you.

Windows MongoDB major version upgrade can be performed easily in-place , here i am describing the steps to upgrade MongoDB 4.2 to 4.4 with existing data directory. You can follow the same for any version upgrade.
We will use the Windows command prompt to perform all steps below:
For safety take a backup of existing DB, provide a path to backup them
cd C:\Program Files\MongoDB\Server\4.2\bin
mongodump -o D:\DB_backup
Stop all the application writes and shutdown the MongoDB service
type "services. msc" and hit Enter or press OK
Services -> MongoDB Server -> Right click & stop
Install the new MongoDB mongodb-windows-x86_64-enterprise-4.4.8-signed.msi file msi package by using GUI provide the old exixting directories. Meanwhile rename directory from 4.2 to 4.4
Data dir - D:\MongoDB\Server\4.4\data
Log dir - D:\MongoDB\Server\4.4\log\
This will replace all the bin files with older version ones and MongoDB will be started automatically.
Finally , move to the bin directory, run mongo.exe client and check the DB availablity
cd C:\Program Files\MongoDB\Server\4.4\bin

On windows pro.
It worked for me like below:
Install new version without uninstalling existing.
Stop the mongodb service.
Copy data folder from previous mongo to new mongo folder.
Repair new mongo installation.
Uninstall previous mongodb.

Related

How do I clear the cache in Pentaho Data Integration

I am trying to run Pentaho Data Integration (ver. 8.3) in my Windows machine and it is not working.
These are the steps I tried to make it work:
Tried rebooting the machine without success.
Also tried to run the Spoon.bat command directly from the directory where Pentaho is located, but it did not work.
Checked if my java installation changed since the last time it worked, it did not, what can be happening?
In a support chat I read someone was able to fix the problem by clearing the cache, but did not explain how to do it, how do I clean the cache?
Have you installed >jdk java 1.8 environment?
And you should open powershell or other terminal to check: java -version
These are the steps to clear the cache in a Windows environment:
Go to C:\Users\youruser.kettle
Look for the file db.cache-* (I have PDI version 8.3, my file is named db.cache-8.3.0.0-371)
Edit the file with any editor (i.e. Notepad) and erase all content
It worked for me!
First, you should run .\data-integration\set-pentaho-env.bat; It will set pdi environment. The most important is the Java HOME, and JAVA Version. PDI 8.3 can only run in JAVA 1.8 and above.

Upgrade "My WebMethods Server" from 10.1 to 10.5 using/applying patches/fixes

Could anyone please help me with steps to upgrade "My WebMethods Server" from 10.1 to 10.5 using/applying patches/fixes?
Upgrade document is clear enaough if you read it all but just in case you want to play safe, this is how I’ve done it:
1- Install DBConfigurator to new location (If you are performing upgrade on the same machine).
2- Install Update Manager.
3- Install latest fixes for DBConfguratior.
4- Run the latest db scripts. (If you installed the scripts already, perform migrate operation after installing fixes for DBConfguratior).
5- Perform Installation of the new version.
6- Shutdown both old and new instances. Run the migrate utility from the new installation.
7- Migration utility will ask for old version installation directory. (Or you can have an export of the old version as a zip file).
8- Follow the steps guided by migration utility, It will ask couple of questions which you can answer by typing Y or N.
9- If everything goes OK, you should be getting the message below. (Might be different for newer versions.)
Failed migrations
None
Migration successful. Exiting the migration utility.
*** End Integration Server Migration ***
10- Validate the scripts you are using for startup have the new installation directory. I faced a couple of problems with that.
Bonus : Make sure the extendend setting about java compiler have the right path for the jvm. watt.server.compile=…\jvm\jvm\bin\javac -classpath {0} -d {1} {2}

Error 0xc000007b when launching mongod.exe / mongo.exe

Installed mongodb on Windows.
Mongodb: 3.4.3 - Windows Server 2008 R2 64-bit, with SSL support x64
OS: Windows 7 64-bit
When I run mongod.exe or mongo.exe this error occurs
The application was unable to start correctly (0xc000007b). Click OK to close the application
What can I do to get rid of this error?
Thanks to everyone who helped.
I got rid of this error by updating Visual C++ Redistributable. But note that before this i also updated my Net Framework, DirectX and drivers for video-card.
Go to my Computer
Properties (Under windows edition check if service pack 1 is listed)
If not, make sure you have following windows updates installed on your system:
KB958488 (dot NET Framework) (<=10mb) (msu file)
KB2533552 (a prerequisite for service pack 1) (<=10mb) (msu file)
KB976932 (service pack 1) (around 900 mb) (exe file)
KB2999226 (Visual C++) (<=2mb) (msu file)
Add your mongo db bin directory to Path (Environment variable):
Example >>> C:\Program Files\MongoDB\Server\3.4\bin
Go to control panel → system and security → system → advanced system settings → advanced → environment variable → system variables → Path
Restart your system
Create a file C:\data\db
then run cmd
change directory to mongodb bin
run mongod
Enjoy....
I was facing the same issue with mongodb 3.6.5 version on my windows 7. I tried updating .net and vc++, nothing worked. Then I downloaded and installed an older version of mongodb, version 3.2 and it worked!
I have the issue while running mongod (Error 0xc000007b when launching mongod.exe / mongo.exe).
I solve the problem by using these following steps
1 step:uninstall the latest version of mongodb currently (4.2).
2 step: install mongodb version(3.0.15) don't worry its running all the feature that given by 4.2.
3 step:install the mongodb 3.0.15 in installing it gives the option (complete ,custom and other) you select the complete option and install.
4 step: Go to the program file check the mongodb folder inside the mongodb folder go to bin and run the mongod application .On this time the error will gone..
I solved this error by installing all the Microsoft Visual C++ re distribute files .
i.e. all the versions .
You need correct version to run mongo 2013 and 15 didnt work but 2019 did .

How do I install just the client tools for PostgreSQL on Windows?

I have a PostgreSQL database on a Linux system that I want to access from my Windows PC. But the only Windows binaries I have been able to find are the full installer, which includes the database server and client.
Is it possible to get a client-only Windows binary install for PostgreSQL from anywhere?
(To clarify, I want the standard PostgreSQL client, psql - not a GUI client or independent tool).
Unfortunately there is no real client "only" installer.
What you can do, is to download the ZIP archive of the complete Postgres binaries:
http://www.enterprisedb.com/products-services-training/pgbindownload
and then remove the "server" part from it.
When you unzip it, you get the following directories:
bin
doc
include
lib
pgAdmin III
share
StackBuilder
symbols
You can remove the doc, include, pgAdmin III, StackBuilder and symbols directories. As far as I can tell (but I am not sure) the client also doesn't need the share or lib directories, but you would need to test that. So that leaves only the bin directory.
I think the share directory could be needed for localized error messages in psql but I'm not sure about that.
Inside the bin directory you can essentially remove all .exe files (except psql.exe of course). You can also remove all wx*.dll files, they are only needed for pgAdmin. The libxml2.dll and libxslt.dll are also only needed for the server.
If you do want some of the other client tools, you might want to keep
pg_dump.exe
pg_dumpall.exe
pg_restore.exe
One drawback of this approach is that this requires the Visual C++ Redistributable to be installed. But you can overcome that as well by simply putting the MSVCR120.DLL from some computer where it is installed into the bin directory.
So that leaves you with these files (from the bin directory) that are required for the psql client:
iconv.dll (libiconv-2.dll in newer Postgres versions)
libeay32.dll
libintl-8.dll
libpq.dll
msvcr120.dll
ssleay32.dll
zlib1.dll
psql.exe
Of course you can also take all that from an existing Postgres installation without the need to download the ZIP archive.
It is obviously not a real installer, but if you put the cleaned up directory into a ZIP file, you can distribute that and whoever needs it just unzips the archive. Personally I find unzip to be the best "installer" anyway (I also use that to install the Postgres server, the Windows installer just has too many quirks)
As of 2020, when you click download the full installer from here , click next and next and you get the option to install only the command line - tools
. Remember to add the path to the bin folder in the PATH variable.
Actually there are client CLI tools in pgAdmin. All you need is just to install it on your Windows machine from https://www.postgresql.org/download/windows/.
Then you'll be able to find those tools in folder like C:\Program Files (x86)\pgAdmin III\1.22 or C:\Program Files (x86)\pgAdmin 4\v2\runtime, depends on the pgAdmin version you have installed.
Thanks to everyone who has posted on this thread.
For what it's worth, I got psql.exe from PostgreSQL 10.10 working under Windows 10 with just the following files from the zip archive:
libcrypto-1_1-x64.dll
libiconv-2.dll
libintl-8.dll
libpq.dll
libssl-1_1-x64.dll
psql.exe
When connecting to AWS Redshift, I got the following error:
psql: FATAL: invalid value for parameter "client_encoding": "WIN1252"
I resolved this by running
set PGCLIENTENCODING=UTF8
I found this solution at https://forums.aws.amazon.com/thread.jspa?messageID=600088
HTH.
I realize this is an older question, but when I used the Windows installer for the latest version of Postgres (10.4), it gave me the option to install just the command line tools. I just unchecked server and pgadmin in the installer's window when prompted to choose what I wanted to install.
Below are the steps I followed to connect to Amazon Redshift with postgres12 psql on windows:
download postgres 12.4 from below location:
https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
run the installer which will take few minutes and prompt you for installations options
select command line tools as shown in below screenshot and install that
Above will install postgres12 command line in below folder C:\Program Files\PostgreSQL\12\bin. Make sure to add this to your PATH environment variable
open cmd and run command
set PGCLIENTENCODING=UTF8
run psql to connect to redshift. Make sure to change below parameters highlighted in red for your cluster endpoint, userid, copy script file name and log script file name respectively
psql -h redshift-cluster-1.abcdefgh.us-east-1.redshift.amazonaws.com -U demo_user -d dev -p 5439 -f d:\demo\redshift_script.sql -L d:\demo\log_redshift_script.log
all commands in redshift_script.sql file would get executed in PSQL and logs will be stored in log_redshift_script.log file
There is a third-party command-line tool available known as PGCLI - A command-line interface for Postgres with auto-completion and syntax highlighting.
Install:
pip install pgcli
Connect to POSTGRES Server from Command-line:
pgcli -h localhost -U xyz -d app_db
For official documentation, visit PGCLI
If there's pgadmin v4 installed then just copy these libraries (from C:\Program Files\pgAdmin 4\v4\runtime\):
libcrypto-1_1-x64.dll
libpq.dll
libssl-1_1-x64.dll
These were enough for me to connect from a client Windows 10 x64 PC to a remote Postgres 13 server. Note, that libraries coming with the ZIP archive mentioned above are slightly different and have more dependencies.
I kind of cheat. I install sqlbackupandftp.com on a Windows server - which has a free version that can schedule a single database backup. In the binaries, pg_dump.exe is there - typically on the C: drive like C:\Program Files (x86)\SQLBackupAndFTP\dbms\PostgreSql
I built standalone versions for windows and linux.
It has less dll dependecies and smaller size and work with many linux.
https://github.com/hemnstill/StandaloneTools/releases?q=pg_dump
You can also download "https://www.nuget.org/packages/Postgres.psql" nuget package to get "psql.exe"

Spring Tool Suite (STS) upgrade fails

An update was downloaded automatically by my 2.6.3.RELEASE Build 201411281425.
STS (Spring Tool Suite) asks to install it and when I click on the pop-up window it does some things and then stops with the following message which seem to indicate that it wants to delete itself.
I can understand why this fails but I am not sure why STS would think that this was possible.
I could not find any instructions about manually installing the zip file that is available as a download as an alternative way to upgrade my installation.
How do I fix the automatic install or manually install the zip?
(I am on Windows 7)
Error message:
An error occurred while uninstalling
session context was:
(profile=DefaultProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.Uninstall,
operand=[R]org.springsource.sts.ide.executable.win32.win32.x86_64
3.6.3.201411281415-RELEASE-e44
--> null,
action=org.eclipse.equinox.internal.p2.touchpoint.natives.actions.CleanupzipAction).
Backup of file C:\RAMDrive\spring\STS.exe failed.
File that was copied to backup could not be deleted: C:\RAMDrive\spring\STS.exe
Start the STS you want to upgrade and before you click on "Check for Upgrades", with STS still running, rename the STS.exe file you just started, to something else, like "STS_old.exe". That should do it.
The message sounds strange, I've never seen this before. To install a fresh copy of STS, just download the ZIP file from the download page (the one that matches your operating system and pick the right 32bit or 64bit one, depending on your OS and the JDK you are using). Then unzip, and start STS.exe. That's it.

Resources