Postgresql 11.1: "Problem running post-install step. Installation may not complete correctly. Error with configuration or permissions." - postgresql

I checked the log file and I think this is the part that caused the problem:
Setting up database
[15:30:54] Configuring pg11 to point to existing data dir D:\John's Files\My Documents\Code\Databases\PostgreSQL\data\pg11
Setting PostgreSQL port
= 5432
Executing C:\Installed Software\Developer Software\PostgreSQLv11.1/pgc config pg11 --datadir "D:\John's Files\My Documents\Code\Databases\PostgreSQL\data\pg11"
Script exit code: 1
Script output: ################################################
# FATAL SQL Error in check_release
# SQL Message = near "s": syntax error
# SQL Statement = SELECT r.component FROM releases r, versions v
WHERE r.component = v.component
AND r.component LIKE '%D:\John's Files\My Documents\Code\Databases\PostgreSQL\data\pg11%' AND v.is_current = 1
################################################
Script stderr: Program ended with an error exit code
Error with configuration or permissions. Please see log file for more information.
Problem running post-install step. Installation may not complete correctly
Error with configuration or permissions. Please see log file for more information.
I think the problem is the apostrophe in "John's". Does anyone know if that's right? Is there a fix to this problem? I don't want to rename my directory because Postgresql can't handle apostrophes.

Related

Getting a "Missing token: ASSIGN" error when running OpenModelica script through a batch file

I am trying to run an OpenModelica script using a DOS .bat file. But facing some issues.
The batch file runmodelica.bat has
%OPENMODELICAHOME%\bin\omc testscript.mos
The file testscript.mos is
loadModel(Modelica)
getErrorString()
loadFile("HelloWorld.mo")
simulate(HelloWorld)
getErrorString()
If I run the commands in the testscript.mos file from an OM Shell by changing to that directory, everything works fine. But If I run the batch file from the DOS prompt, I get the following error
Error processing file: testscript.mos
[C:/Users/blahblah/testscript.mos:2:1-2:1:writable] Error: Missing token: ASSIGN
# Error encountered! Exiting...
# Please check the error message and the flags.
Execution failed!
The HelloWorld.mo file comes with the standard installation and I haven't modified it
class HelloWorld
Real x(start = 1);
parameter Real a = 1;
equation
der(x) = - a * x;
end HelloWorld;
I am new to OpenModelica and searched online but couldn't find a solution. Any help is appreciated.
All the commands run in the OM Shell but not when invoked from the bat file.
The script code needs to be valid Modelica, so you need ; after each command.
loadModel(Modelica);
getErrorString();
loadFile("HelloWorld.mo");
simulate(HelloWorld);
getErrorString();

Problem upon Installing PostgreSQL 12.1 Win8.1: “the database cluster initialisation failed”

I'm getting an error at the end of installing PostgreSQL 12.1 which is "the database cluster initialisation failed"
I have been searching all the day, so here what I tried:
1- Run the installation file as Administrator: didn't work.
2- Change the directory of "Data" to different place other than C:: didn't work.
3- Changed the whole installation directory to C:\Postgre or F:.... : didn't work
4- Turned off the KasperSky antivires: didn't work
5- Checked if there is an old Postgre user: not found
I checked the log file and I found the following :
Script output:
WScript.Shell Initialized...
Scripting.FileSystemObject initialized...
Called CreateDirectory(F:\PostgersSql\data)...
Called CreateDirectory(F:\PostgersSql)...
Called ClearAcl (F:\PostgersSql\data)...
Executing batch file 'rad712E9.bat'...
Called Die(Failed to reset the ACL (F:\PostgersSql\data))...
Failed to reset the ACL (F:\PostgersSql\data)
Any one can tell me what is causing this error?

For some reason, a warning is issued when calling the procedure SYSPROC.ADMIN_CMD ('EXPORT to ...')

I have the following problem:
I am using the following command:
EXPORT TO "D:\ExportFiles\ACTIVATE_DICT.csv" OF DEL MODIFIED BY TIMESTAMPFORMAT="YYYY/MM/DD HH:MM:SS" STRIPLZEROS MESSAGES "D:\ExportFiles\FMessage.txt" SELECT * FROM DB2INST4.ACTIVATE_DICT;
In the Command Editor of the program, the Control Center successfully exported data from the ACTIVATE_DICT table to a CSV file ACTIVATE_DICT.csv.
But for a number of reasons, I need you to execute this command in the IBM Data Studio or DataGrip program, and there it cannot be executed in this form.
Therefore, I read the following manual enter link description here
and based on it wrote the following command:
CALL SYSPROC.ADMIN_CMD('EXPORT to /lotus/ExportFiles/ACTIVATE_DICT.csv OF DEL MODIFIED BY TIMESTAMPFORMAT="YYYY/MM/DD HH:MM:SS" STRIPLZEROS MESSAGES /lotus/ExportFiles/FMessage.txt SELECT * FROM DB2INST4.ACTIVATE_DICT');
Here is the message on the result of the command:
[2018-10-11 15:15:23] [ ][3107] There is at least one warning
message in the message file.. SQLCODE=3107, SQLSTATE= ,
DRIVER=4.23.42 [2018-10-11 15:15:23] 1 row retrieved starting from 1
in 75 ms (execution: 29 ms, fetching: 46 ms)
And in the / lotus / ExportFiles / directory there is no ACTIVATE_DICT.csv file and there is no FMessage.txt file in the / lotus / ExportFiles / directory.
Question: How then to correctly execute this command ??? Maybe I'm doing something wrong?
sqlcode 3107 is a warning message:
SQL3107W At least one warning message was encountered during LOAD processing.
Explanation
You can load data into a database from a file, tape, or named pipe using the LOAD command. You can specify that any warnings or errors from the LOAD processing be printed to a message file. If no message file is specified, the warnings or errors are printed to standard out (unless the database manager instance is configured as a partitioned-database environment.)
It is to tell you to read message log in the message file you specified. In your case: /lotus/ExportFiles/FMessage.txt
Please read into the file to see what error is logged and if you need help understand what is logged, please post the content of the file.
This message is returned when at least one warning was received during processing. If a message file is being used, the warnings and errors will be printed there.
This warning does not affect processing.
User response
Review the message file warning.
EXPORT command using the ADMIN_CMD procedure
See use of the 'MESSAGES ON SERVER' clause, and how to get these messages using the result set returned by this routine in this case.

CREATE EXTENSION pljava failed on PostgreSql 9.6

I try to install pljava for postgesql 9.6 in Ubuntu 16.04, but it fails with error.
A gradlew script makes an installation, but it fails with the following error"
Failed to execute: CREATE EXTENSION pljava; because: ERROR: could not access file "pljava-so-1.5.1-BETA1": No such file or directory
A gradlew source:
Sql sql = establishConnection()
try {
sql.execute("SET pljava.libjvm_location TO '${javaNative}';")
sql.execute("SET pljava.vmoptions TO '-Xshare:on -XX:+DisableAttachMechanism';")
sql.execute("ALTER DATABASE postgres SET pljava.libjvm_location FROM CURRENT;")
sql.execute("ALTER DATABASE postgres SET pljava.vmoptions FROM CURRENT;")
sql.execute("CREATE EXTENSION pljava;")
} finally {
sql.close()
}
As i understand, it fails during a creation of extension pljava, commands above was executed without any errors.
According to #ChapmanFlack advice:
I have no any mentions about pljava-so-1.5.1-BETA1 file at pg_config --libdir directory. Also i didn't find that file at pg_config --sharedir
grep LOAD pljava--1.5.1-BETA1.sql output following:
touched off by the LOAD command, making possible a decent installation
LOAD command, but finds the CREATE EXTENSION command instead). So,
temporarily LOAD 'pljava-so-1.5.1-BETA1'; Ok, the LOAD succeeded, so
everything happened ... unless ... the same PostgreSQL turns LOAD into
a (successful) no-op in that case, meaning To fail fast in that case,
expect that the LOAD actions should have
I think PL/Java builds from a prebuilt, because of that line at gradlew:
commandLine 'java', '-jar', '../installer/build/dependencies/pljava-pg9.6.jar'
I would be appreciate for any advice

Error while connecting to sybase database using dbd:sybase

I have compiled dbd-sybase module(1.07) to add it to my perl(5.12.3) on windows. However, when I trying to use it using following script:
use DBI;
DBD::Sybase;
$ENV{SYBASE} = 'E:\Sybase';
$ENV{SYBASE_OCS} = 'OCS-15_0';
$ENV{SYBASE_ASE} = 'ASE-15_0';
$SERVER="ABC";
$DATABASE="dadw";
$USER_NAME="";
$PASSWORD="";
$dbh = DBI->connect("dbi:Sybase:server=$SERVER;databse=$DATABASE",$USER_NAME, $PASSWORD);
I am getting following error message:
install_driver(Sybase) failed: DBD::Sybase initialize: cs_ctx_alloc(113) failed
at c:/perl/lib/DynaLoader.pm line 223.
Compilation failed in require at (eval 4) line 3.
at b.pl line 11
Can someone help in solving this error message.
It appears that the driver is using CT-Connect libraries, so I would guess it needs to have valid server information in the interfaces file.
On windows the file is usually located in C:/sybase/interfaces.ini
Check this answer for more details on creating interface file entries.
Using Sybase ASE BCP to a Remote Server
In Sybase, the interfaces file in Windows is called sql.ini and it is located in the c:Sybase/ini/ folder.