Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

copy entire Postgres database (its structure and data)

create db using sql prompt:
create db with sql prompt:
$ CREATEDB new_db_name -T orig_db_name -O db_user;
  • This requires originaldb to not be in use
  • you need to stop all services. and this work fine
  • This is probably implemented as CREATE DATABASE newdb WITH TEMPLATE originaldb OWNER dbuser; and as a result requires that the original database must be idle (no connections with write access) and any new connections to original database are prevented while the copying is in process. 


Popular posts from this blog

How to find the server is whether standby (slave) or primary(master) in Postgresql replication ?

spfile and pfile errors

2017 Shortern URL - Other Website Like ADFOC.US

How to Get Table Size, Database Size, Indexes Size, schema Size, Tablespace Size, column Size in PostgreSQL Database

ORA-01261: Parameter db_recovery_file_dest destination string cannot be translated ORA-01262: Stat failed on a file destination directory Linux-x86_64 Error: 2: No such file or directory