Search
 
SCRIPT & CODE EXAMPLE
 

SQL

postgres duplicate database in same server while other session is using source database

SELECT pg_terminate_backend(pg_stat_activity.pid)
FROM pg_stat_activity
WHERE pg_stat_activity.datname = '[Database to copy]'
AND pid <> pg_backend_pid();
CREATE DATABASE [Database to create]
WITH TEMPLATE [Database to copy]
OWNER [Your username];
Comment

PREVIOUS NEXT
Code Example
Sql :: ring MySQL commit updates to the database 
Sql :: missing index for constraint error in mysql 
Sql :: sql offfset 
Sql :: set identity_insert off 
Sql :: break too long line yaml 
Sql :: sql online code 
Sql :: run eroku psql 
Sql :: ajax error exception handeling 
Sql :: mysql create link between tablesdatabase 
Sql :: Insert into Select * - NAYCode.com 
Sql :: SQL MAX() and MIN() with Strings 
Sql :: How to make PHP handeling my "WITH CTE as" SQL 
Sql :: sql developer sql worksheet not showing 
Sql :: cursors in db2 
Sql :: SQL authentication error 
Sql :: nueva tabla mysql 
Sql :: sql multiple column 
Sql :: shows all databases created by user in ms sql 
Sql :: radius search with point data in mysql 
Sql :: get db connection detail from sql developer profile 
Sql :: declare table temporary sql server 
Sql :: sql server select query datatype 
Sql :: suhaib 
Sql :: SQL random boolean 
Sql :: how we can perform acid Operations in sql with examples 
Sql :: date query 
Sql :: add id column to temp table insert 
Sql :: sql server import json 
Sql :: see here: https://mode.com/sql-tutorial/sql-window-functions/ 
Sql :: faire une recherche par liste de mot clé sql 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =