Hi 
  I am trying to restore a pgdump.sql file. i am very much in need of help.
  i first went to pgAdmin III and created two database ( postgres and 
anuradha)...
properties of anuradha ::
       1) owner = ofbiz
       2) encoding = 'UTF8'
       3)connected ? yes
       4) allow connections? yes 
properties of postgres :::
       1) owner = postgres
       2) encoding = SQL_ASCII
       3)connected ? yes
       4) allow connections? yes 
 
the encoding of my pgdump.sql is UNICODE...so i thought i should try to restore 
it in the database anuradha as it has UTF8 encoding.i select anuradha database 
and click on "Execute SQL queries " icon on the toolbar.i then opened my 
pgdmp.sql file but it gave me an error 
ERROR: syntax error at or near "\"
SQL state: 42601
Character: 387817.
So i seperated my pgdump.sql into two tables.one is creation.doc which consists 
of only the commands to create new tables and the other is datas.doc which 
contains the datas i.e. the
COPY ..FROM STDIN; statments and lots of data.
i opened creation.doc in the SQL query page of pgAdmin and executed the commands
and the tables got created in the database anuradha.
but i haven't been able to do the same with datas.doc.
So i tried a different option .I went to the command prompt of postgreSQL and 
typed the command
psql -U postgres pgdump.sql ( pgdump.sql is the real file with create and copy 
commands and data).
but i got the following message on the command prompt
C:\Program Files\PostgreSQL\8.2\bin>psql -U postgres pgdump.sql
psql: could not connect to server: Invalid argument (0x00002726/10022)
        Is the server running on host "???" and accepting
        TCP/IP connections on port 5432?
i also tried by changing the username to ofbiz and achinta(my postmaster is 
logged on as achinta.I checked this out by goin to the services of control 
panel).
   
  Any help would be appreciated.Thanks in advance.
  -Anuradha


 
---------------------------------
Need a quick answer? Get one in minutes from people who know. Ask your question 
on Yahoo! Answers.

Reply via email to