0

Sorry for the newbie question on both powershell and PostgreSQL. On my Windows Server 2008 R2, I would like to execute a script that would do a simple select against one of my tables. This script is supposed to run once a week, but i was going to handle the scheduling through Windows Task Scheduler. I just cant figure out how to connect to the databse via powershell and pull the data i need. This server is a Production system, so installing applications and etc is highly not recommended.

Any help would be greatly appreciated.

530529
  • 41
  • 2
  • 8
  • Thanks for the reply. In my case the database is in my local server. So I am afraid the solution might be different for what i need. – 530529 Aug 07 '15 at 22:09
  • Try using the method in the question there (for local installation, only the URL should be different). If you then get the same error as the OP, follow the link that is given in the answer there: https://code.google.com/p/visionmap/wiki/psqlODBC – CaringDev Aug 07 '15 at 22:13
  • I created a script with the exact same lines as his only replacing the url for localhost and adding my table and user information. I get three errors, which are different than his. But the first is "ConnectionString":"Format of the initialization string does not conform to specification starting at index 0." – 530529 Aug 07 '15 at 22:18
  • You could add the script you have so far to your question. This would also show some more original effort. – CaringDev Aug 07 '15 at 22:22
  • 1
    RCH, I really appreciate the feedback. After tweaking the code a bit i reached to the point of same issue the op was having on his end. So please cancel if necessary since it is a duplicate. Thank you – 530529 Aug 07 '15 at 22:37

0 Answers0