Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2011
    Posts
    3

    Unanswered: create database in using batch file?

    How to create database using batch file.

    I tried in following way,

    C:\Program Files\PostgreSQL\8.4\bin>psql -W Mydatabase>create.sql
    Password:

    but then it is asking me password...it is not accepting my password..

    Also Make clear whether the method I m using is correct or not.

    Thank you.

  2. #2
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    What do you mean with "not accepting my password"?

    And it should be
    Code:
    psql mydatabase < create.sql
    (note the < instead of >)

  3. #3
    Join Date
    Nov 2011
    Posts
    3
    C:\Program Files\PostgreSQL\8.4\bin>psql mydatabase < create.sql
    Password: elitser

    psql: FATAL: password authentication failed for user "Admin"

    It gives me error........I am unable to understand which password do I enter here.

    Thank you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •