Updated on 2023-12-22 GMT+08:00

GAUSS-00521 -- GAUSS-00530

GAUSS-00521: "cannot change the tablespace of the currently open database"

SQLSTATE: 55006

Description: When a database is being accessed by other users, its tablespace cannot be modified using the ALTER DATABASE SET TABLESPACE syntax.

Solution: Ensure that other users are not accessing the database when modifying the database tablespace. If the database has been accessed by other users, log out of the database and attempt to modify the tablespace of the database again.

GAUSS-00522: "some relations of database '%s' are already in tablespace '%s'"

SQLSTATE: 55000

Description: If relationship objects, such as tables, indexes, and views, exist in the tablespace directory of a database, its tablespace cannot be modified using the ALTER DATABASE SET TABLESPACE syntax.

Solution: Ensure that no relationship objects, such as tables, indexes, and views, exist in a database when modifying the database tablespace. If such relationship objects exist, delete them and then attempt to modify the tablespace again.

GAUSS-00523: "could not remove directory '%s': %m"

SQLSTATE: XX000

Description: Internal system error.

Solution: Contact technical support.

GAUSS-00524: "permission denied to change owner of database"

SQLSTATE: 42501

Description: The current user does not have the permission to modify the database owner using the ALTER DATABASE name OWNER TO newowner syntax.

Solution: Ensure that the current user is a database owner or an administrator user when this user attempts to modify the database owner using the ALTER DATABASE name OWNER TO newowner syntax.

GAUSS-00525: "dbase_redo: unknown op code %u"

SQLSTATE: XX000

Description: Internal system error.

Solution: Contact technical support.

GAUSS-00526: "could not create directory '%s': %m"

SQLSTATE: XX000

Description: When a database tablespace is being created, the following exceptions may occur in the directory of this tablespace: 1. The current user is not an administrator user and does not have the permission to access this directory. 2. The file system is read-only. 3. This directory already exists. 4. No sufficient disk space is available for creating a directory. 5. Hardware faults result in I/O errors. 6. An internal error occurs in the GaussDB(DWS) database. "

Solution: Use the following methods to resolve directory exceptions when the database tablespace is being created: 1. Ensure that the current user is an administrator user or has the database creation permission. 2. Change the file system permissions to read and write permissions if the file system is read-only. 3. Do not create a tablespace if the tablespace directory exists.

GAUSS-00527: "could not stat directory '%s': %m"

SQLSTATE: XX000

Description: The directory of a database tablespace to be created does not exist or the directory name is incorrect.

Solution: Ensure that the directory of a database tablespace to be created is valid.

GAUSS-00528: "'%s' exists but is not a directory"

SQLSTATE: 42809

Description: The directory of a database tablespace to be created is invalid.

Solution: Ensure that the directory of a database tablespace to be created is valid.

GAUSS-00529: "Permission denied to create tablespace '%s'."

SQLSTATE: 42501

Description: The current user does not have the permission to create a tablespace in the database.

Solution: Create a tablespace in the database as a system administrator.

GAUSS-00530: "tablespace location cannot contain single quotes"

SQLSTATE: 42602

Description: When the CREATE TABLESPACE tablespace_name ...LOCATION syntax is used to specify a tablespace directory, the location information strings are marked with single quotation marks ('').

Solution: Ensure that the location information strings are marked with double quotation marks ("") when the CREATE TABLESPACE tablespace_name ...LOCATION syntax is used to specify a tablespace directory.