database.sarang.net
UserID
Passwd
Database
DBMS
MySQL
ㆍPostgreSQL
Firebird
Oracle
Informix
Sybase
MS-SQL
DB2
Cache
CUBRID
LDAP
ALTIBASE
Tibero
DB 문서들
스터디
Community
공지사항
자유게시판
구인|구직
DSN 갤러리
도움주신분들
Admin
운영게시판
최근게시물
PostgreSQL Q&A 9003 게시물 읽기
No. 9003
복구할대요 테이블 생성이 안됩니다.
작성자
김선희
작성일
2012-06-28 15:34
조회수
11,159

계속 질문을 하게됩니다. 너그러이 봐주시기 바랍니다.

http://www.enterprisedb.com/crossover-postgresql 에서 윈도우용 pgAdmin3 버전 9.1.4를 설치하였고

'New login role'메뉴를 선택하여 'test_admin'를 만들고 'Role privileges'를 모두 선택하여 모든 권한을 갖도록 했습니다.
즉 'test_admin'의 권한은 'Can login', 'Inherits rights from parent roles', 'Superuser', 'Can Create database objects', 'Can create roles', 'Can modify catalog directly', 'Can initiate streaming replication and backups'

'test' 라는 DB를 만들고 'test'를 오른쪽마우스 메뉴에서'Restore'클릭하여 'test.backup'파일을 선택하여 'Restore'버튼을 실행하니

D:\Program Files\PostgreSQL\9.1\bin\pg_restore.exe --host localhost --port 5432 --username "postgres" --dbname "test" --no-password  --create --verbose "K:\testdb.backup"
pg_restore: connecting to database for restore
pg_restore: creating SCHEMA t1
pg_restore: creating SCHEMA t2
pg_restore: creating TABLE consumer_ui_context
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 4287; 1259 19058 TABLE consumer_ui_context test_admin
pg_restore: [archiver (db)] could not execute query: ERROR:  syntax error at or near "DISTRIBUTED"
LINE 10: ) DISTRIBUTED BY (batch_id);
           ^
    Command was: CREATE TABLE consumer_ui_context (
    batch_id integer NOT NULL,
    number_of_files bigint,
    number_of_files_previous big...
pg_restore: [archiver (db)] could not execute query: ERROR:  relation "t1.consumer_ui_context" does not exist
    Command was: ALTER TABLE t1.consumer_ui_context OWNER TO test_admin;

왜 TABLES를 생성을 못할까요? 제가 또 뭘 해야하는지 어떻게하면 이 문제를 해결할수있을지 알려주시면 머리숙여 감사하겠습니다.


 

 

이 글에 대한 댓글이 총 2건 있습니다.

 사용하고 있는 데이터베이스 서버에서 

테이블을 만드는 SQL 구문 가운데, 

CREATE TABLE .....

LINE 10: ) DISTRIBUTED BY (batch_id);

 

이런 형태의 구문을 사용할 수 없어서 생긴 오류입니다. 

 

덤프 받은 데이터베이스와 같은 종류의 데이터베이스 서버를 설치해서 사용해야 이 문제가 풀릴 것 같네요. 

 

 

김상기(ioseph)님이 2012-07-02 10:13에 작성한 댓글입니다.

답변 너무 너무 감사합니다. :) 좋은 하루 되세요.

김선희(sunteho)님이 2012-07-02 10:48에 작성한 댓글입니다.
[Top]
No.
제목
작성자
작성일
조회
9006조건절을 하나 만들어야 하는데 도움좀 주세요. ㅋㅋ [4]
김현진
2012-07-13
9074
9005Dump Size와 관련하여 문의 드립니다. [1]
박병훈
2012-07-06
8867
9004postgreSQL 외부 라이브러리 활용 방법 [2]
노진광
2012-07-04
9478
9003복구할대요 테이블 생성이 안됩니다. [2]
김선희
2012-06-28
11159
9002pg_restore 할때요 [2]
김선희
2012-06-27
8733
9001Greenplum 에 대해서요 [2]
김선희
2012-06-26
10497
9000q] data = null, data is null 시 리턴되는 자료형 [4]
송효진
2012-06-18
9354
Valid XHTML 1.0!
All about the DATABASE... Copyleft 1999-2024 DSN, All rights reserved.
작업시간: 0.021초, 이곳 서비스는
	PostgreSQL v16.2로 자료를 관리합니다