database-administration

Scanning a mysql table from the bottom

不打扰是莪最后的温柔 提交于 2019-12-08 13:17:17
问题 When i run a mysql select statement, it takes very long because i have already previously deleted a very large number of rows. Is there a way for the table to start scanning from the bottom, as opposed to from the top? 回答1: A query does not scan the table in any particular order; it might do so if it happens to traverse a particular index in order (e.g. a range scan), which MIGHT be because you used an ORDER BY. Databases just don't work like that. You cannot rely on their behaviour in that

Moving and Backing Up a Large MySQL Database

痴心易碎 提交于 2019-12-08 07:55:04
问题 I'm using MySQL Workbench and I've built a very large (17 GB) database. MySQL puts the data in a single file called ibdata1 in the C:\ProgramData\MySQL\MySQL Server 5.5\data directory. I'm out of space on my C drive and I would like to move it to my external drive. Is it possible to move that ibdata1 file and then tell MySQL to point to another location to find it? Also, if I want to back up that data, can I just copy the ibdata1 file and save it. And then if my computer were stolen or

Settings of connection timeout for Oracle database

≡放荡痞女 提交于 2019-12-07 14:48:01
问题 For some period time of inactivity, connection to oracle database are dropped and this leads to error - > end-of-file on communication channel . 1) Is there any oracle settings on client machine (sqlnet.ora or some kind of environment variables) which could specify connection timeout and differs from client to client ? Or it could be client settings of some "heartbeat" feature (client sends packets in some interval), which prevent connection to be dropped by firewall ? 2) Where I can find

Cannot upgrade sharded mongoDB or stop the balancer

我与影子孤独终老i 提交于 2019-12-07 09:33:40
问题 mongos is not running in the beginning. When tried to start the mongos I see the following log: Fri Mar 22 17:43:13.383 [mongosMain] ERROR: error upgrading config database to v4 :: caused by :: newer version 4 of mongo config metadata is required, current version is 3, need to run mongos with --upgrade But with --upgrade parameter, I see the following log: Fri Mar 22 17:43:39.273 [mongosMain] ERROR: error upgrading config database to v4 :: caused by :: balancer must be stopped for config

No start database manager command was issued. SQLSTATE=57019

蓝咒 提交于 2019-12-07 03:28:52
问题 I am new to DB2 and I have installed DB2 9.7. I created an instance which is shown below [sathish@oc3855733574 ~]$ db2ilist sathish Settings of /etc/services is shown below DB2_sathish 60000/tcp DB2_sathish_1 60001/tcp DB2_sathish_2 60002/tcp DB2_sathish_END 60003/tcp DB2_TMINST 50000/tcp But, when I start using 'db2start' it throws the following error 07/31/2015 10:26:20 0 0 SQL1042C An unexpected system error occurred. SQL1032N No start database manager command was issued. SQLSTATE=57019 I

RESULT_CACHE RELIES_ON (NLS_SESSION_PARAMETERS)

只谈情不闲聊 提交于 2019-12-06 08:47:15
Why below function is not returning fresh param value every time I am altering session to set new NLS_DATE_FORMAT FUNCTION get_param(p_parameter IN VARCHAR2) RETURN VARCHAR2 RESULT_CACHE relies_on(nls_session_parameters) IS l_value nls_session_parameters.value%TYPE; BEGIN dbg('Entered Fn_Get_nls_session_Parameter_frc to cache details for .. ' || p_parameter); SELECT SYS_CONTEXT('USERENV', p_parameter) INTO l_value FROM dual; RETURN l_value; EXCEPTION WHEN NO_DATA_FOUND THEN dbg('In NDF : Gng to return value as null.. '); l_value := NULL; RETURN l_value; END get_param; Well... I would say the

Oracle specific timestamp format 'DD-MON-RR HH.MI.SSXFF AM'

廉价感情. 提交于 2019-12-06 05:54:20
问题 I have a problem with Oracle 11g specific timestamp format. This is what I have: select to_timestamp('21-OCT-15 08.24.30.000000000 PM','DD-MON-RR HH.MI.SSXFF AM') from dual; Response from database: ORA-01855: AM/A.M. or PM/P.M. required 01855. 00000 - "AM/A.M. or PM/P.M. required" I have also tried to alter session settings with several commands and still nothing. alter session set NLS_LANGUAGE='ENGLISH'; alter session set NLS_DATE_LANGUAGE='ENGLISH'; alter session set NLS_TIMESTAMP_FORMAT =

how to move a mysql database to another mount point

雨燕双飞 提交于 2019-12-06 04:24:04
问题 I have a MySQL database, it is getting larger and larger and I want to move the whole database to another mount point, where I have enough storage. I want my current data to be transferred, and that new data get saved to the new position. software stack: MySQL 5 running on FreeBSD 6 回答1: Of course other answers are valid. But if you want to keep the default configuration, do following: stop mysqld mv /var/lib/mysql /var/lib/mysql.backup mount your new partition under /var/lib/mysql cp -r /var

Delete tables from database Oracle 10g

ⅰ亾dé卋堺 提交于 2019-12-05 18:45:40
I have deleted some tables from an Oracle 10g database using the drop command. When I list the tables using select * from cat; I get the following : Are the tables deleted or not? Why do I have these BIN$... things? How can I remove them or the tables once and for all? Thanks! They are entries in the Recycle Bin, created by the deletion of a table. They can be purged if required. http://docs.oracle.com/cd/B28359_01/server.111/b28310/tables011.htm The tables prefixed with BIN$ are tables placed in the recycle bin for easy recovery. You can completely remove them by purging it. Either

Oracle - Zombie Table

别说谁变了你拦得住时间么 提交于 2019-12-05 10:25:22
I'm having this odd problem since yesterday. I've tried several options and I actually reinstalled ORACLE and the DB itself. Here's the problem: I have this table that is somekind of zombie. Here are the symptoms: SELECT TABLE_NAME FROM USER_TABLES WHERE TABLE_NAME='MYTABLE' Returns a record, meaning that the table exists. SELECT COLUMN_NAME FROM USER_TAB_COLUMNS WHERE TABLE_NAME = 'MYTABLE' Returns all the columns of MYTABLE. So far so good, the table exists. SELECT * FROM MYTABLE Returns ORA-00942: table or view does not exist . At this point I'm quite confused: the table seems to exist on