I'm going around in circles and so need some help.
I want to be able to run an .sql against a database which is a scheduled task via a bat file. However when i run the bat file manually I get prompted for a password. I enter the password and then get told that....
"psql: FATAL: password authentication failed for user "(my windows login)"
'-h' is not recognised as an internal or external command,
operable program or batch file.
At the moment my bat reads...
@echo off
"D:\Program Files (x86)\PostgreSQL\9.1\bin\psql.exe"
-h localhost -U postgres -d database_name -f D:/scripts/SQL/test.sql
pause
First thing, what cmd do i need to add to populate the password request
What am I doing wrong with the rest of the statement to get it to load the .sql
Thanks