0

I have a SQL dump file: C:\Users\Rayyan\Desktop\dump_2.sql.

I have been trying to import this for so long. I am using pgadmin 4, and since I could find nothing in that gui to help, I tried using psql console (I'm on windows).

So I created my new database "wecudos" in pgadmin4.

Then tried the following command in psql console:

psql wecudos < C:\Users\Rayyan\Desktop\dump_2.sql

according to the specified format:

psql dbname < dumpfile

This is not working, please help, I have also added a screenshot of the error/data I entered, thanks!

enter image description here

Ray92
  • 439
  • 6
  • 18
  • What is the error you get? –  Nov 27 '18 at 10:42
  • Hi, I have added a screenshot showing the error, please help, thanks – Ray92 Nov 27 '18 at 10:49
  • Please open a `cmd.exe` **manually** then call `psql` from there. Do not use the shortcut provided by the Windows installer - that shortcut is not suitable for this kind of tasks. –  Nov 27 '18 at 10:52
  • Hi, i am getting this error : 'psql' is not recognized as an internal or external command, operable program or batch file. – Ray92 Nov 27 '18 at 10:58
  • https://duckduckgo.com/?q=windows+%22is+not+recognized+as+an+internal+or+external+command%2C%22&t=h_&ia=web –  Nov 27 '18 at 10:58
  • Is this because i have not changed any environment variables? thats partly because i dont know how to do that :( – Ray92 Nov 27 '18 at 10:58
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/184318/discussion-between-ray92-and-a-horse-with-no-name). – Ray92 Nov 27 '18 at 11:08
  • Hi i changed the env variables, and now im getting a different type of error , whose screenshot ive posted, please help , thanks – Ray92 Nov 27 '18 at 11:10

1 Answers1

0

You need to click on the Tools tab in the top > Query Tool. Then click on the folder icon in the Query Editor area > then select the location of the SQL file.

Renny
  • 64
  • 2
  • 1