Take the 2-minute tour ×
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. It's 100% free, no registration required.

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 stackoverflow.com 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

1 Answer 1

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

 
discard

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