Oracle1

 

1.2      INFORMIX

1.2.1        查询sequence信息

可以根据下面的语句,获得sequence的当前值:

select seq_numservice.nextval   from systables where tabname = 'seq_numservice';

select seq_customer.nextval     from systables where tabname = 'seq_customer';

select seq_subscriber.nextval   from systables where tabname = 'seq_subscriber';

select seq_account.nextval      from systables where tabname = 'seq_account';

select seq_productorder.nextval from systables where tabname = 'seq_productorder';

select seq_tb_mobileno.nextval  from systables where tabname = 'seq_tb_mobileno';

 

1.2.2    备份sequences

以文本格式上传Backup.sh至BMP(SYSDB)用户根目录下,执行一下命令:

chmod u+x Backup.sh

./Backup.sh

该操作只备份了本次修改涉及的sequences,备份文件为:sys_seq.unl

 

1.2.3    重建上面的sequence,更改restart的值;(maxvalue创建后自动生成,同时必须重启服务)

alter SEQUENCE seq_numservice  restart with 300000000;

alter SEQUENCE seq_customer   restart with 300000000;

alter SEQUENCE seq_subscriber restart with 300000000;

alter SEQUENCE seq_account restart with 300000000;

alter SEQUENCE seq_tc_account_balance restart with 300000000;

alter SEQUENCE seq_productorder restart with 300000000;

标红的300000000为需要修改的序列号开始值,请根据实际需要修改该值;

1.2.4        恢复sequence

只有需要回滚恢复sequence时才操作此步骤!

参考修改部分,起始值为修改前备份的取值;

转载于:https://www.cnblogs.com/JPAORM/archive/2011/09/15/2510317.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值