Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

changing the order sequence

user520824Oct 4 2007 — edited Oct 5 2007
Hello,

i have a table test contains these data.

group sequence value
1 1 100
1 2 200
1 3 300
1 4 400
1 5 500
1 6 600


Now i want to change the sequence. ie, eg change the sequence of 2nd record to 5th.
ie moving the 2nd record to 5th and re arrange the sequence. so the records get rearranged
with new sequence.


3 becomes ==> 2
4 becomes ==> 3
5 becomes ==> 4


so the records should looks like

1 1 100
1 2 300
1 3 400
1 4 500
1 5 200 --> 2nd record moved to 5th
1 6 600


how can i achieve this?

Comments

BalazsT

Hi,

I have the same issue but only when I try to add an instance to my existing cluster, I have already an SR open with Oracle let's see what they reply.

If you have access to the Oracle Support site you will be able find a document how to setup an InnoDB Cluster from scratch.

Basically you can create 3 empty databases, make sure that no transactions are running or logged:

SET sql_log_bin = OFF;

CREATE USER clusteradmin@'%' IDENTIFIED BY 'xxx';

GRANT ALL PRIVILEGES ON mysql_innodb_cluster_metadata.* TO clusteradmin@'%' WITH GRANT OPTION;

GRANT SELECT, RELOAD, SHUTDOWN, PROCESS, FILE, SUPER, REPLICATION SLAVE, REPLICATION CLIENT, CREATE USER ON *.* TO clusteradmin@'%' WITH GRANT OPTION;

GRANT INSERT, UPDATE, DELETE ON mysql.* TO clusteradmin@'%' WITH GRANT OPTION;

SET sql_log_bin = ON;

RESET MASTER;

SELECT @@global.gtid_executed;   --this must return no rows

Then you can use mysqlsh to setup the cluster.

Alexandre Almeida

Hi there,

Could you share all the config/option files? (my.cnf)

1 - 2
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Nov 2 2007
Added on Oct 4 2007
14 comments
2,295 views