how to drop partition without dropping data in MySQL?
ALTER TABLE tbl REMOVE PARTITIONING; Source: ALTER TABLE Statement in MySQL Reference Manual
ALTER TABLE tbl REMOVE PARTITIONING; Source: ALTER TABLE Statement in MySQL Reference Manual
Have you tried Squirrel SQL? http://squirrel-sql.sourceforge.net/
Liquibase liquibase.org: it understands hibernate definitions. it generates better schema update sql than hibernate it logs which upgrades have been made to a database it handles two-step changes (i.e. delete a column “foo” and then rename a different column to “foo”) it handles the concept of conditional upgrades the developer actually listens to the community … Read more
As the error states – the database is not open – it was previously shut down, and someone left it in the middle of the startup process. They may either be intentional, or unintentional (i.e., it was supposed to be open, but failed to do so). Assuming that’s nothing wrong with the database itself, you … Read more
Each object has a list of rules DENYing and GRANTing access. REVOKE is an operation that removes a rule from the list of access rules.
Doing a dump and restore in the manner described will mean MySQL has to completely rebuild indexes as the data is imported. It also has to parse the data each time. It would be much more efficient if you could copy data files in a format MySQL already understands. A good way of doing this … Read more
select v.SQL_TEXT, v.PARSING_SCHEMA_NAME, v.FIRST_LOAD_TIME, v.DISK_READS, v.ROWS_PROCESSED, v.ELAPSED_TIME, v.service from v$sql v where to_date(v.FIRST_LOAD_TIME,’YYYY-MM-DD hh24:mi:ss’)>ADD_MONTHS(trunc(sysdate,’MM’),-2) where clause is optional. You can sort the results according to FIRST_LOAD_TIME and find the records up to 2 months ago.
I like SQuirreL SQL Client, and NetBeans is very useful; but more often, I just fire up the built-in org.h2.tools.Server and browse port 8082: $ java -cp /opt/h2/bin/h2.jar org.h2.tools.Server -help Starts the H2 Console (web-) server, TCP, and PG server. Usage: java org.h2.tools.Server When running without options, -tcp, -web, -browser and -pg are started. Options … Read more
DROP USER (or DROP ROLE, same thing) cannot proceed while the role still owns anything or has any granted privileges on other objects. Get rid of all privileges with DROP OWNED (which isn’t too obvious from the wording). The manual: […] Any privileges granted to the given roles on objects in the current database and … Read more
It’s this easy: update my_table set path = replace(path, ‘oldstring’, ‘newstring’)