Getting ORACLE_HOME must be set and %ORACLE_HOME%\database must be writeable createdb terminated unsucessfully while creating db in postgres - database

I am getting the following error and the process of creating a DB gets terminated automatically while creating a DB in PostgreSQL.
ORACLE_HOME must be set and %ORACLE_HOME%\database must be writeable
createdb terminated unsucessfully.
How to create a Database in Postgres using createdb command?
Running the same command on the Git Bash also doesn't work, the process doesn't getting terminated and it showing as in the picture below.

I wanted to leave this as a comment but I cannot, there are several issues that may be happening here, the first that comes to mind is that your command prompt is not showing as admin. This can also be a path issue, because sometimes cmd will not recognize paths for software except when you try to use it on the folder its installed. Another common issue with Windows is that sometimes you want to run the GUI software instead of cmd, and if you absolutely need cmd try powershell with admin rights.
The error it gives makes me believe that its either a path error or a user rights error, I also agree with the comments. My suggestion if you keep having issues like this who are either depending on your windows path system or your system requirements in general is to try using Anaconda or (conda), this will give you a clean environment to properly see what you did wrong.

Related

SQLAlchemy/pgAdmin: Error: password authentication failed for user "root"

I'm conducting a study and I need to store some data. I found an open source data scraper and parser online: https://github.com/hicsail/materials
I've followed some instructions (some of which but not all came from here) and
installed Postgres, created a docker-compose.yml file, and created a config file:
Above is the config file, and this is the .yml file
I started by going into the pgAdmin folder and running "docker-compose up", after which, this was the result:
I'm not sure if the "no privileges flag" means anything. Anyway, after this, I opened up a localhost:5050 in my browser and logged into pgAdmin.
I named the database "materials" as this was what it was supposed to be named.
Same thing with the username and password; both were named "root". However, when I run the command to parse the data, I'm getting this error:
I've been stuck on this for a long time now, and I can't seem to find any solution. This is running in a python2.7 conda environment, as per the requirements. These were the other installed libraries (I'm not 100% sure those were the exact versions, but I tried to get them as close as possible).
psycopg2==2.7.3.1
requests>=2.20.0
SQLAlchemy==1.0.9
wheel==0.24.0
If I need to clarify anything please let me know.
Thanks.
I found an answer for this. I had to go into services, then to postgres, and stop it from running. I then had to kill the port "5432" and run it again.

INS-30131 Initial setup required for the execution of installer validations failed

i just uninstall oracle 12c manually on windows 10 and now am reinstalling it shows errors:
Cause - Failed to access the temporary location. Action - Ensure that
the current user has required permissions to access the temporary
location. Additional Information:
 - Framework setup check failed on all the nodes
- Cause: Cause Of Problem Not Available
 - Action: User Action Not Available Summary of the failed nodes desktop-81i87ss
 - Version of exectask could not be retrieved from node "desktop-81i87ss"  - Cause: Cause Of Problem Not Available
 - Action: User Action Not Available
In some cases, there is a possibility that your computer name contains some special character, unique installer throws same error in that case. Try removing any special character by renaming your system to a new name and then try installation again.
For Example: My system had name "LAPTOP-GENCONIAN". Problem was solved for me after renaming to "GENCONIAN"
I come across similar issue and was able to resolve with this method
Open CMD
CD into the folder in which setup file exits
3.Run the command - setup.exe -ignorePrereq -J"-Doracle.install.client.validate.clientSupportedOSCheck=false"
Now the intallation window will open without validation check and you can continue

Windows service recovery - run a program wont work

How do i do this?
i've tried all i can think of.
Browsing for my .exe file i want to run.
run a bat file
writing forcedos.exe in program textbox and path to my bat file in command line parameters textbox
Why cant it just work with an normal exe?
and i know it should run a program because it can restart the service correctly.
EDIT
Application: test.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Exception
This is my latest try to make it work.
the script has the code
Dim objShell
Set objShell = WScript.CreateObject( "WScript.Shell" )
objShell.Run("iexplore")
Set objShell = Nothing
Now the script opens internet explorer if i run the cmd command
wscript.exe "C:\asfh.vbs"
The "run a program" recovery option for when a service crashes runs the specified executable in the same way as the service, i.e., it runs in session 0 (and so is affected by session 0 isolation, see also related questions) and it runs with the same security context as the service.
This means that it can't interact directly with the user (you can display a GUI, but nobody will see it) but it also restricts what the executable or script can do. For example, some shell API functions will not work properly unless the user account has been interactively logged in at some point. In the example script you posted, the script itself is probably running, but is unable to launch Internet Explorer because IE is only designed to run in an interactive session.
Provided you restrict yourself to basic functionality, it should all work as expected. (There is no master list that I know of describing what functionality is safe to use in a service context, but it is usually easy to guess. You can resort to trial and error if necessary!)
Also note that as far as I know forcedos.exe is no longer present in modern versions of Windows. If you want to run a batch file, you can specify cmd.exe as the application and /c myscript.bat as the command line parameters.

Psexec Error Code -2146232576

I'm trying to open up a an .exe program that is on a remote computer through my main desktop using a batch file and psexec.exe.
I have been able to remotely kill programs using pskill, but when I run the command line required to open a program the window opens up for a fraction of a second before closing down due to an error. The error code it gives is: -2146232576.
I've tried Googling what this error actually is but I can't find much. Does anyone know for sure what this error relates to?
This is the batch file I made that does not work:
cd c:\Users\[local user]\Downloads\PSTools\
psexec.exe \\computername -u [user] -p [password] "C:\Users\[user]\Desktop\SQAUtilities\utlity.exe"
Note: I found a question on StackOverflow which is similar, but has a different error code:
psexec error code -1073740771
And also:
Error code 1073741502 when running psexec through TeamCity
This one has an answer that says the error is "a low-level .NET initialization error, the CLR cannot get loaded":
visual studio 2010: error code -2146232576 (0x80131700)
This is likely the exit code of utility.exe that PSExec is passing back to you, not an error generated by PSExec.
Here's one possible source:
FIX: 0x80131700 error code when starting or configuring the Enterprise Single Sign-On Service
I don't know what utility.exe does, but if it attempts to perform Windows authentication, PSExec might be blocking it. In my experience, PSExec deliberately blocks some actions (under certain circumstances). For example, if you don't use a username/password, all attempts to access remote shares fails instantly.
Since you're providing some creds, this might not be the precise problem, but if utility.exe requires access to your Kerberos tickets or something, they might not be accessible in a PSExec session.
Things to Try
Do you know that this command (utility.exe) works on the remote machines as your user when run interactively (GUI logon)? Surely you've already tried that, but just to make sure...
Is the build directory on the remote computer or is it a share on a third machine? The method of accessing those files might require more steps within PSExec (like mapping a drive, etc.).
If the program absolutely requires a GUI, you may have to allow it to interact with a specific GUI session using the -i parameter of PSExec. You might try logging into the remote machine, running the command with -i 2 (or whatever session qwinsta tells you you're using—2 is common for remote desktop connections) and see if it opens any error dialogs that are more informative.
You might try running ProcMon on the remote machine while you run the PSExec command and seeing if there are any ACCESS_DENIED or other failures that it notices.
Got the same error while remotely running an EXE install file (not copying it local). As near as I can tell this is an error related to insufficient permissions. For me, the simple addition of the -S switch (to run as SYSTEM) fixed my problem.
Why this works I'm not sure - I'd always thought SYSTEM was strictly limited to local resources, yet the EXE I'm running is located on a network share.
Hope this helps someone.
I got the same error lately and found out why I get this.
You must make a local copy of "utility.exe" on the remote computer for before launching it via PsExec.
for /f "usebackq delims=" %%i in ("d:\utility\remote_computers.txt") do (
xcopy "D:\utility\utility.exe" "\\%%i\d$\" && psexec \\%%i -u %%i\administrator -p password cmd /c "/i \\%%i\d$\utility.exe"
)
Pause

Failed to update database becase the database is read only

I have created a winform application and programmatically trying to attach the database when an application runs first time. Unfortunately in windows 7 i always got an error. Please view the screenshot below it tells the whole story. Now my question is that how can i get rid from this error, is there any way to automatically give required rights on the folder where the application installs?. I want to permanently resolve this error and need smooth attachment. Anyone please help.
Please view the error below. Thanks in advance
Try ALTER DATABASE MyDatabaseName SET READ_WRITE
More informations here on This forum
Edit
This was asked by someone else
If you put your database in your own subdirectory of the directory returned by Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData then the user will have read/write access to it.
See Environment.SpecialFolder Enumeration to determine if a different location would be more suitable, e.g. ApplicationData if you need it to roam or CommonApplicationData if you need all users of the computer to use it.
Edit: I found a slightly more extensive version of this answer: Where Should I Store my Data and Configuration Files if I Target Multiple OS Versions?, please also see the articles it links to.
I know this answer is somehow late, but I believe people always face the same problems so my case is worth to be shared.
tl;dr = Change the permission of deployed files manually or using icacls command.
Actually I use InstallForge for packing and deploying my application(s).
No matter what setup creator is used, when the application is installed to a non-system folder ( e.g. D:\ ) the program works perfectly and the database is readable/writable.
Whereas when the application is installed in [Program Files] folder or [Program Files (X86)] folder, Windows takes a preventive security measurement and sets file permission to be only [Read] and [Read & Execute].
I think Windows Vista and later versions of Windows have this behavior.
You can check that by right-clicking the installed file and going to properties then Security tab.
The files I installed on D:\ had Full-Control permission while, as I mentioned, the ones on C:\ had only Read & Execute permissions.
You won't notice the difference when you install a normal program on C:\ because you might not be writing data on a file or a database. But in case of database deployment, the file has to be writable.
Finally, the solution for this case was telling InstallForge to change file permissions at the end of the installation using icacls commands :
icacls "C:\MyApp\MyDB.mdf" /Grant Everyone:F
icacls "C:\MyApp\MyDB_log.ldf" /Grant Everyone:F
In my case, it is okay to give everyone full-control on the database files, but you might need a customized solution for your case so please refer to :
http://ss64.com/nt/icacls.html
You can tell your setup creator to run those commands, or you can put them together in a batch file and run it after the installation.

Resources