ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 修改工单号码的流水号

修改工单号码的流水号

原创 Linux操作系统 作者:sudn 时间:2010-01-11 19:20:36 0 删除 编辑


The job number is defined by sequence WIP_JOB_NUMBER_S in the database.
The WIP numbering also uses the prefix defined in the profile option "WIP:Discrete Job Prefix" and concatenates this prefix with a value from the sequence WIP_JOB_NUMBER_S to create a default discrete job name.

To find the sequence statement run the following script.:

1. Modify profile option WIP:Discrete Job Prefix=’ TJ1-2009’ and save.

2. Log into Database with wip/wip, and process the following :
SQL> SELECT sequence_owner, sequence_name, min_value , max_value, increment_by,
last_number, cycle_flag, order_flag, cache_size
FROM all_sequences
where sequence_name = 'WIP_JOB_NUMBER_S';

3. To change this number, drop and recreate the sequence.

To drop the sequence: command:
"drop sequence wip_job_number_s"

To recreate sequence: command:
"create sequence wip_job_number_s increment by 1 start with [a number of your choice] maxvalue 2147483647 NOCYCLE nocache NOORDER;".

4. Grant the alter and select to APPS schema.
GRANT ALTER, SELECT ON WIP.WIP_JOB_NUMBER_S TO APPS WITH GRANT OPTION;

5. Now, go to instance, create a new discrete job, and test, check if the job number is changed or not


Caution:
Be sure to change the sequence only for job name.
Donot change the sequence for wip_entity_id since those are existing jobs.

 

修改工單號碼的流水號

1.      說明,目前工單號碼的編碼結構:TJ1-2009-88888,其中“TJ1-2009-”表示前綴,可通過Profile更新,WIP:Discrete Job Prefix=’TJ1-2010’.

“88888”表示流水號,是通過標準的sequences WIP_JOB_NUMBER_S 自動生成的,系統最大可達2147483647。目前正式環境已達到87768。

由於目前的工單號專用章流水號只有5位,如果工單號碼流水號位數超過5位,此章將不能滿足實際需求,會影響工單正常下線作業。

 

詢Oracle工程師,可通過以下方法,修改工單號碼的流水號。

 

2.      登陸DB,用戶/密碼 wip/wip,查詢并記錄現有的WIP_JOB_NUMBER_S的基礎設置

SELECT sequence_owner, sequence_name, min_value , max_value, increment_by,
last_number, cycle_flag, order_flag, cache_size
FROM all_sequences
where sequence_name = 'WIP_JOB_NUMBER_S';

 

--此步驟主要是記錄SEQUENCE_OWNER 、CACHE_SIZE的值。

 

3.      drop and recreate the sequence。

第一步,drop現有的WIP_JOB_NUMBER_S ,Command:

        drop sequence wip_job_number_s;

第二步,recreate WIP_JOB_NUMBER_S ,Command:

         CREATE SEQUENCE WIP.WIP_JOB_NUMBER_S
  START WITH
1
  MAXVALUE
2147483647  --系統可生成的最大值
  MINVALUE
1    --工單號碼的起始值
  NOCYCLE
  CACHE
100      --與標準值一致(也可将其置空)
  NOORDER;

4.      Grant the alter and select to APPS schema,Command:

GRANT ALTER, SELECT ON WIP.WIP_JOB_NUMBER_S TO APPS WITH GRANT OPTION;

 

5.      以上步驟完成后,即可到WIP模組,開立工單驗證工單流水號是否符合要求。

(在http://tjap.tjpcb.com:8007環境測試OK)

 

6.      建議後續在每年年初修改工單號碼的前綴時,一并修改工單號碼的流水號。

7.   如果流水號碼未能連續產生,可將CACHE置0,Command:

      ALTER sequence WIP.WIP_JOB_NUMBER_S nocache。

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/16860121/viewspace-624833/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: 修改表字段
请登录后发表评论 登录
全部评论

注册时间:2008-12-20

  • 博文量
    73
  • 访问量
    162427