Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm facing a issue while importing the dump in my system, i'm getting the error as

" Error: syntax error at or near "" LOCK TABLESDB_NAME` WRITE;"

and exiting with "out of memory"

We had taken back-up from Suse linux and trying to import in Cent OS 6.3.

Any suggestion to fix this issue.

Thanks in Advance,

share|improve this question

migrated from Apr 11 '13 at 9:38

This question came from our site for professional and enthusiast programmers.

Are you using a command like psql dbname < dumpfile.sql to do the import? – Dondi Michael Stroma Apr 11 '13 at 5:58
Yes i'm using that command to import. – Boopaathy Apr 11 '13 at 6:01
up vote 3 down vote accepted

LOCK TABLES dname WRITE is not a valid PostgreSQL statement. It's a MySQL statement. You can't just take a MySQL dump and restore it to Postgres. You'll need to convert it either manually or find some kind of converter script.

share|improve this answer
Thanks for the reply. – Boopaathy Apr 11 '13 at 6:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.