database-administration

Random timeout running a stored proc - drop recreate fixes

帅比萌擦擦* 提交于 2019-12-01 20:45:00
So I work with a largish database (30 gig) sql 2005 with a .net 3.5 web front end on a 10 year old system. It has new and old bits We are getting a problem that is happening more and more frequently. A stored proc (we've had 4 different ones so far) decides that it will timeout. The call is happening from the webserver and hits the 30 sec timeout and logs to our error log. The website uses a single login (I know this is wrong but it cannot be changed due to legacy code). Just after this I run the exact same call and it takes (logged in as me) 1 sec. The issue remains on this one stored proc

How to list all prepared statements for all active sessions?

跟風遠走 提交于 2019-12-01 17:04:03
I know that there is a way to list all prepared statements for the current session by selecting all rows from the pg_prepared_statements table, but is there a way to see all prepared statements for all active sessions ? I think I'm looking for something like an administrator function, but I can't find anything like it in the docs. Nope. AFAIK prepared statements are local to a backend; other backends just don't know they exist. You'd need to modify the server to add additional inter-process communication to allow one backend to ask the others about prepared statements. The backends initally

How to list all prepared statements for all active sessions?

隐身守侯 提交于 2019-12-01 15:45:51
问题 I know that there is a way to list all prepared statements for the current session by selecting all rows from the pg_prepared_statements table, but is there a way to see all prepared statements for all active sessions ? I think I'm looking for something like an administrator function, but I can't find anything like it in the docs. 回答1: Nope. AFAIK prepared statements are local to a backend; other backends just don't know they exist. You'd need to modify the server to add additional inter

How to unlock table in sybase?

橙三吉。 提交于 2019-12-01 12:17:53
问题 im trying to change some types on my table in sybase, but when i change it, the output is this one. User 'DBA' has the row in 'table' locked How to unlock this? 回答1: I would: determine the connection_id using sa_locks (documentation here) issue the drop connection *connection_id* statement to the connection that is causing the lock to the table. Use it with care! 来源: https://stackoverflow.com/questions/21413676/how-to-unlock-table-in-sybase

set new value for “ft_min_word_len ” FULLTEXT in mysql

烂漫一生 提交于 2019-11-30 18:07:49
I changed to "ft_min_word_len" = 4 by my-innodb-heavy-4G.ini located in my system path "C:\Program Files\MySQL\MySQL Server 5.1" , but when i run SHOW VARIABLES LIKE 'ft_min_word_len' I got still result value= 4 . I did not find this variable in my.ini file. So i have also create a my logic. I copied to ft_min_word_len variable and place in my.ini file and now my result show value=3 . But it is not working for three character search. I've restarted server. How can i achieve to be able to search three character value also. You should change this system parameter, restart server and then rebuild

how to drop database

冷暖自知 提交于 2019-11-30 04:48:59
i used the following sytanx drop database filmo; and got the following error: ERROR 1010 (HY000): Error dropping database (can't rmdir './filmo/', errno: 17) any ideas.. It means there are files in that directory not relating to MySQL. Another issue, although I doubt it, is insufficient permissions. You may delete that directory from the filesystem. Got same error. This fixed it for me in Ubuntu 10.04: stop mysql rm -rf /var/lib/mysql/XXXXX start mysql Where XXXXX is the offending database name. sudo rm -rf /var/lib/mysql/db_production where db_production is the name of the database Remember

Can not login to mysql 5.7.9 after change password

痴心易碎 提交于 2019-11-30 04:34:29
I have installed Mysql Ver 14.14 Distrib 5.7.9, for Linux (x86_64) using EditLine wrapper On CentOS Linux release 7.1.1503 I Changed root password using this command: alter user 'root'@'localhost' identified by 'XXXXXXX'; flush privileges; After re-login [root@server ~]# mysql -u root -p Enter password: ERROR 1524 (HY000): Plugin '*A6074285732753D325C55AD74E7517CF442C1A81' is not loaded Two things have changed since earlier versions of mySQL (I''m using 5.7.10): systemd is now used to look after mySQL instead of mysqld_safe (which is why I was getting the -bash: mysqld_safe: command not found

ORA -12953: The request exceed the maximum allowed database size of 11GB

蹲街弑〆低调 提交于 2019-11-29 12:14:46
We have oracle express edition 11g i.e. ORACLE XE 64bit. There is 10GB available space in the database. But system tablespace is 98% full, there are 2 system tabalespaces. When we (our startup team) try to ADD or RESIZE the datafile or tablespace using ALTER command we get following error: ORA -12953: The request exceed the maximum allowed database size of 11GB What should be done to add or resize the datafile? What should be done to add or resize the datafile? Nothing can be done. The XE version is limited to 11GB of data, see this link Oracle Database Express Edition Oracle Database Express

how to drop database

半世苍凉 提交于 2019-11-29 02:11:07
问题 i used the following sytanx drop database filmo; and got the following error: ERROR 1010 (HY000): Error dropping database (can't rmdir './filmo/', errno: 17) any ideas.. 回答1: It means there are files in that directory not relating to MySQL. Another issue, although I doubt it, is insufficient permissions. You may delete that directory from the filesystem. 回答2: Got same error. This fixed it for me in Ubuntu 10.04: stop mysql rm -rf /var/lib/mysql/XXXXX start mysql Where XXXXX is the offending

Can not login to mysql 5.7.9 after change password

倾然丶 夕夏残阳落幕 提交于 2019-11-29 02:00:10
问题 I have installed Mysql Ver 14.14 Distrib 5.7.9, for Linux (x86_64) using EditLine wrapper On CentOS Linux release 7.1.1503 I Changed root password using this command: alter user 'root'@'localhost' identified by 'XXXXXXX'; flush privileges; After re-login [root@server ~]# mysql -u root -p Enter password: ERROR 1524 (HY000): Plugin '*A6074285732753D325C55AD74E7517CF442C1A81' is not loaded 回答1: Two things have changed since earlier versions of mySQL (I''m using 5.7.10): systemd is now used to