destroydbPostgreSQL User's GuidePrevNextdestroydbNamedestroydb — Create a new Postgres databasedestroydb [ dbname ]
destroydb [ -h host ] [ -p port ]
[ -i ] [ dbname ]Inputs
-h hostSpecifies the hostname of the machine on which the
postmaster
is running. Defaults to using a local Unix domain socket
rather than an IP connection..
-p portSpecifies the Internet TCP/IP port or local Unix domain socket file
extension on which the postmaster
is listening for connections. The port number defaults to 5432,
or the value of the PGPORT
environment variable (if set).
-iRun in interactive mode.
Prompts for confirmation before destroying a database.
dbnameSpecifies the name of the database to be destroyed. The database
must be one of the existing Postgres databases
in this installation.
dbname
defaults to the value of the
USER
environment variable.
Outputsdestroydb will remove files from the
PGDATA/dbname/
data area for the existing database.
Connection to database 'template1' failed.
connectDB() failed: Is the postmaster running and accepting connections
at 'UNIX Socket' on port 'port'?
destroydb: database destroy failed on dbname.destroydb could not attach to the
postmaster
process on the specified host and port. If you see this message,
ensure that the postmaster
is running on the proper host and that you have specified the proper
port. If your site uses an authentication system, ensure that you
have obtained the required authentication credentials.
Connection to database 'template1' failed.
FATAL 1: SetUserId: user 'username' is not in 'pg_shadow'
destroydb: database destroy failed on dbname.You do not have a valid entry in the relation pg_shadow
and and will not be allowed to access Postgres.
Contact your Postgres administrator.
ERROR: user 'username' is not allowed to create/destroy databases
destroydb: database destroy failed on dbname.You do not have permission to destroy (or create) databases.
Contact your Postgres site administrator.
ERROR: destroydb: database 'dbname' does not exist.
destroydb: database destroy failed on dbname.The database to be removed does not have an entry in the
pg_database class.
ERROR: destroydb: database 'dbname' is not owned by you.
destroydb: database destroy failed on dbname.You are not the Database Administrator (DBA) for the specified database.
destroydb: database destroy failed on dbname.An internal error occurred in psql
or in the backend server. Ensure that your site administrator has
properly installed Postgresand initialized the site with
initdb.
Note: destroydb internally runs
DESTROY DATABASE from psql
while connected to the template1 database.
Descriptiondestroydb destroys an existing
Postgres database.
The person who executes this command must be
the database administrator, or DBA,
or must be the Postgres super-user.
The program runs silently; no confirmation message will be displayed.
After the database is destroyed, a Unix shell prompt will reappear.
All references to
the database are removed, including the directory containing this
database and its associated files.
destroydb is a shell script that invokes
psql.
Hence, a postmaster
process must be running on the database server host before
destroydb
is executed. The
PGOPTION
and
PGREALM
environment variables will be passed on to
psql
and processed as described in psql.
UsageTo destroy the database demo
using the postmaster on the local host, port 5432:
destroydb demo
To destroy the database demo
using the postmaster on host eden, port 5000:
destroydb -p 5000 -h eden demo
PrevHomeNextcreateuserUpdestroyuser
Wyszukiwarka
Podobne podstrony:
app destroyuserfunction mcve destroyengineDESTROY?RTHAGE1 PPP APP Wprowadzenie do zarz środowiskSO2 App ?za4DestroyFailedExceptionAPP Zadania Wskaznikifunction session destroySO2 App ?za2app asrt06app asrt10SO2 App pytania(Chrobot)(2)Gwyneth Jones Destroyer of Worldsfeb Transportation Moblie Bar Codes App Brief 0111 Polishapp pg dumpExcel Web App praca grupowa w chmurze ebook demoDBZ Special Plan To Destroy The Saiya Jins Part 1app asrt01więcej podobnych podstron