新建数据库失败,提示"template1" being accessed by other users
2017-02-14 13:11
573 查看
新建数据库提示:
[PostgreSQL] "template1" being accessed by other users
说明该template1模板正在被人连接。我选择的解决方案是:
查询出连接该数据库的进程,并将其杀死(比较暴力)。
select pg_terminate_backend(pid) from pg_stat_activity where DATNAME = 'template1';
[PostgreSQL] "template1" being accessed by other users
说明该template1模板正在被人连接。我选择的解决方案是:
查询出连接该数据库的进程,并将其杀死(比较暴力)。
select pg_terminate_backend(pid) from pg_stat_activity where DATNAME = 'template1';
相关文章推荐
- 新建数据库失败,提示"template1" being accessed by other users
- PostgreSQL创建数据库时报错:ERROR: source database "template1" is being accessed by other users
- PostgreSQL创建数据库时报错:ERROR: source database "template1" is being accessed by other users
- database "mydb" is being accessed by other users
- 解决方法 dropdb: database removal failed: ERROR: database "TDADB" is being accessed by other users
- 解决方法 test: database removal failed: ERROR: database "test" is being accessed by other users
- 解决postgresql:template1 is being accessed by other users问题
- 【原】IIS发布ASP.Net网站提示"访问IIS元数据库失败"的解决
- 进入用友通:提示"由于文件不可访问,内存磁盘空间不足无法打开ufsystem数据库"登录失败
- 往bomb上传图片至数据库失败,提示"数据上传失败107 invalid file: filename empty."
- 用SQLServer2005还原数据库的时候出错,提示错误信息"C:/Program Files/Microsoft SQL Server/MSSQL.1/MSSQL/Data/db.mdf的目录查找失败..."。这样的错误偶尔会遇到,请问是怎么回事,该怎
- CLI 连接失败。SQL0332N 没有从源代码页 "1114" 至目标代码页 "UNKNOWN" 的转换。原因代码是 "1"。 SQLSTATE=57017
- 用Microsoft Office Visio for Enterprise Architects生成数据库时出现“无法打开登录所请求的数据库"masterDATABASE=master"。登录失败”
- 无法打开登录所请求的数据库 "JOBWEB"。登录失败。
- 还原WSS3.0内容数据库时碰到"OnRestore事件失败"
- 从数据库取出一个时间字段,当取出的时间超过当前时间就显示"1" 不超过当前时间就显示"0"
- “数据库关系图”提示:此数据库没有有效所有者,因此无法安装数据库关系图支持对象"的解决方法
- vs.net2008在开发环境下调试没有问题,发布后运行却提示"无法更新数据库,因为数据库是只读的"
- 数据库关系图”提示:此数据库没有有效所有者,因此无法安装数据库关系图支持对象"的解决方法(转)
- SQL2000附加数据库时提示"错误602;未能在sysindexes中找到数据库ID7中对象ID1的索引ID1对应的行