Tag Info

New answers tagged

1

My colleague ended up finding an article about what he was referring to: http://www.nigelrivett.net/SQLAdmin/AlterTableProblems.html. After reading this and realizing our year end reporting was coming up, we decided to not make the alterations to the column types and will revisit this in the next couple months. I think after reading the article, I may just ...


0

Split above current maximum value, drop the empty MAXVALUE partition, then convert to interval partitioning: alter table parttest4 split partition p_max at (2030) into (partition p_2030, partition p_max) update global indexes; alter table parttest4 drop partition p_max; alter table parttest4 set interval (10);


1

It's a foreign key error (Error: 1025 | errno: 150) you can find out using perror: root@onare:/home/onare# perror 1025 MySQL error code 1025 (ER_ERROR_ON_RENAME): Error on rename of '%-.210s' to '%-.210s' (errno: %d) root@onare:/home/onare# perror 150 MySQL error code 150: Foreign key constraint is incorrectly formed You can get more details about what ...


1

Be careful with the drop and recreate option: this can leave sys.depends in an odd state and cause problems for cached plans where the ordering or type of columns is changing. You will also need to take steps to maintain any object level permissions, as these will be lost in the DROP and not automatically recreated with the subsequent CREATE. ALTER TABLE ...


6

I recently did this in my organization wherein we wanted to handle a table with billion + rows. All the credit for the idea goes to Aaron Bertrand and is from his blog post Trick Shots : Schema Switch-A-Roo Test below process on a small table and get your self comfortable before doing it in PROD. create 2 schemas fake and shadow with authorization dbo. ...


3

Here is the way I see it. Pros for #1 Because you are using a separate table your production table stays in use until you are done. No locks on it (beyond those needed to read the data). This also goes with what @AaronBertrand said: you can do it piecemeal, test etc You can change column order at need Pros for #2 It is an all or nothing operation. ...


0

You cannot get around this with MySQL RDS, ... EVER !!! Can we disable binary logging for one specific session or user in AWS RDS MySQL Documentation says it requires SUPER even at the session level The Scale-Out Blog: Replicating from MySQL to Amazon RDS says We will take a recent replicator build that contains the RDS changes, which are documented ...



Top 50 recent answers are included