could not open version file PG_VERSION postgresql pg upgrade - windows

I need some help please, I am upgrading postgresql from v10 to v11 on Windows, but get the following error message: could not open version file: C:/Program Files/PostgresSQL/11/data/PG_VERSION.
Here are the steps taken:
Stopped both PostgresSQL v10 and PostgresSQL v11 services using
services.msc
Set full access control/complete permissions for users for both v10 and v11.
Created 'postgres' user account with full admin rights.
Opened command-line and entered
RUNAS /USER:postgres "CMD.EXE
prompted to enter password for user postgres user.
New command-line window opens and cd to 'C:\Program Files\PostgreSQL\11'.
Entered the following:
pg_upgrade.exe --old-datadir "C:/Program Files/PostgreSQL/10/data" --new-datadir "C:/Program Files/PostgreSQL/11/data" --old-bindir "C:/Program Files/PostgreSQL/10/bin" --new-bindir "C:/Program Files/PostgreSQL/11/bin" --check
On pressing enter I get the above mentioned error.
I am new to the whole process of using PostgreSQL.
Any thoughts on what is wrong?

I had to grant \postgres modify access to both the old and the new datadirectory. That solved the problem for me while upgrading from 9.6 to 10

I had the same problem. I solved it by not running a cmd as postgres user.
Instead I made a passwsord file and set the env PGPASSFILE accordingly:https://www.postgresql.org/docs/11/libpq-pgpass.html
Apparently when running cmd as postgres user, it was some permissions that prohibited the PG_VERSION to be opened

Related

Where is the Firebird DB log file located in Windows?

I just installed Firebird 3.0.6. When running this command in isql from the documentation:
SQL> connect localhost:employee user sysdba password somepassword;
Statement failed, SQLSTATE = 08006
Error occurred during login, please check server firebird.log for details
SQL>
When I looked in the C:\Program Files\Firebird\Firebird_3_0 folder. It is not there.
Where should I look for it?
I just reinstalled Firebird DB as an application in C:\Firebird and everything works. Must have been the permissions issue that is all over the internet.
If you need to run the Firebird server in application mode, run it as administrator.
This doesn't directly answer your question, the log file still doesn't appear in the installation folder, I don't know why. However, the error will be gone and there is no need for your question anymore :)

Execution of postgresql by a user with administrative permissions is not permitted

Win7. Postgres 9.3.
Every time I type "postgres" in cmd I get this error.
Created a new account without any admin rights and with "Log on as" rights and with correct directory access rights to postgres/data, then I set this account as the "Log on as" in the services menu, but I still get the same error.
update2017: I never found a solution to this.
For windows do this:
Start cmd.exe (administrator as you are)
Add postgres user:
net user postgres your_password /add
Start a cmd.exe using your new postgres account:
runas /user:postgres cmd.exe
You can validate you are login correctly using" whoami
Run postgres normally.
It is not clear from your question whether you are trying to start the Postgres service or "manually" start Postgres without having a Windows service registered.
Since 9.x Postgres does not require it's own Windows user account to run the service. It defaults to use the built-in "Network" account.
To start the Postgres service (if it has been correctly installed), simply use use
net start postgresql-9.3
(the actual name might be different)
If you did not register a Windows service you should start Postgres through pg_ctl.exe not through postgres.exe. pg_ctl.exe will drop any administrative privileges from the process when starting the server.
To start Postgres manually from the commandline use:
pg_ctl -w -D c:\Path\To\The\DataDirectory
assuming that the access rights to the data directory are setup correctly so that the current user has full access to the directory.
If you want to install/create the Windows service manually, you can also do this through the pg_ctl program:
pg_ctl register -N "postgresql-9.3" -D c:\Path\To\The\DataDirectory
Again the access rights to the data directory must be setup correctly.

MySql 5.6 Windows reset root password for the service

I did all this: http://dev.mysql.com/doc/refman/5.6/en/resetting-permissions.html
The mysqld is running in the command prompt and I can connect with the new password. But, the database is gone.
Luckily i found my root password again, and tried to login (with workbench) when the service is running normally with the "networkservice" user. Now I wonder why I can't change the password for the networkservice instance. It seems that the database is hooked up to that windows user.
I installed the mysql with the installation wizard.I have tried a lot of things, I cant reset the password for the MySQL 5.6 service running on Windows 8. I have tried running the reset as administrator in cmd, and it starts an instance in the command prompt, I can connect with the new password, but it's not the same as the MySql56 service...
I have tried to run start paramters in the service options, but it seems that windows are ignoring it when starting the services.
Any suggestions why?
I needed to change the defaults-file destination to the hidden folder: C:\ProgramData\MySQL\MySQL Server 5.6\my.ini
http://dev.mysql.com/doc/refman/5.1/en/option-files.html

How to login to Postgres after install on Mac Snow Leopard?

I got Postgres 8.4 installed on my mac with Snow Leopard. I know the 'postgres' user was created but I have no idea what the default password is. How should I login to the database?
http://archives.postgresql.org/pgsql-admin/2001-10/msg00192.php and similar internet resources may answer your question. Supposedly, there is no password by default.
For future readers...
I had a similar problem. After installing Postgres 9.1, the password I supplied to the installer didn't allow me to connect to the database using pgadmin 3. This is what I had to do to fix it:
Configure so you can log in without a password:
Stop the postgres server (launch daemon):
sudo launchctl unload /Library/LaunchDaemons/com.edb.launchd.postgresql-9.1.plist
Edit data/pg_hba.conf and change 'md5' to 'trust' in the 'local'
'127.0.0.1/32' line.
Start the daemon
sudo launchctl load /Library/LaunchDaemons/com.edb.launchd.postgresql-9.1.plist
Connect using pgadmin 3 and re-set the password
Start pgadmin 3 and connect to the database (right click 'Connect' on the Postgres 9.1 server).
Under Login roles, right-click the 'posgres' user, select 'Properties...' and reset the password on the 'Definition' tab panel.
Then disconnect pgadmin 3 from the database (right-click 'Disconnect' on the Postgres 9.1 server).
Configure the server so it requires a password again:
Stop the daemon (as per step 1.1).
Edit data/pg_hba.conf and change 'trust' back to 'md5' in the
'local' '127.0.0.1/32' line.
Start the daemon (as per step 1.3).

oracle express sytem Invalid Login Credentials

I just installed oracle express, I'm trying to login at database homepage. trying with user sys and system with the password I gave at the installation but I cant log in.
message: Invalid Login Credentials at SQL command line trying to
connect ora-01017 invalid username/password; logon denied
I don't know how to modify the password or just try to uninstall and reinstall?
You can try this from the DOS command line:
sqlplus /nolog
connect / as sysdba;
alter user sys identified by newpass;
Make sure the Oracle bin folder is on your path, but XE installation usually modifies that for you automatically.
I have solved that by doing all the installation and configuration again. I have followed this tutorial: https://forums.oracle.com/forums/thread.jspa?threadID=2301639
my friends, this problem happend when you try connect to localhost:8080/apex/ and over linux, ubuntu or opensuse , if your answer is yes then ,please do it .
Firts login as oracle user:
sudo su - oracle .
then , read the next steps .
on http://mhananto.blogspot.com.co/2012/01/error-invalid-login-credentials-apex-40.html , all credits are to Mr Mahardika Dwi Hananto , thanks for this amazing hack.

Resources