Cancel
Showing results for 
Search instead for 
Did you mean: 

Naming rule skipping numbers

Creator
Creator

hellor everyone

 

I have TC 11.4  and naming rule for ECN and ECR is skipping numbers.

 

I saw this problem in GTAC but I don't know how to solved 

 

https://solutions.industrysoftware.automation.siemens.com/view.php?sort=desc&pd=teamcenter&file_type...

 

help me pelase

5 REPLIES 5

Re: Naming rule skipping numbers

Solution Partner Honored Contributor Solution Partner Honored Contributor
Solution Partner Honored Contributor
I assume you are using Oracle as your DB software. As stated in the PR you need to reduce the "chunk" of numbers that Oracle pulls at one time from 20 to 1.

You start by creating the file seq_nocache.sql:
SET HEADING OFF;
SET ECHO OFF;
SET VERIFY OFF;
SET FEEDBACK OFF;
SET WRAP OFF;
SET LINESIZE 300;
SET SQLP "REM SQL"

spool update_sequences.sql
SELECT 'ALTER SEQUENCE ' || SEQUENCE_NAME || ' NOCACHE;' FROM USER_SEQUENCES;
spool off

@update_sequences.sql

SELECT 'All sequences updated.' FROM DUAL;
SET SQLP "SQL>"

Now login to sqlplus as the TC database user and run the script.
@seq_nocache.sql

Then validate it was successful by running:
select SEQUENCE_NAME, CACHE_SIZE, LAST_NUMBER from user_sequences;
Where CACHE_SIZE should now be 0.

Randy Ellsworth, Teamcenter Architect, Applied CAx, LLC
NX 11 | SW 2016 | Creo 4 | TcUA 11.4
Evaluating: AW 3.4

Re: Naming rule skipping numbers

Creator
Creator

thank's Randy!

Re: Naming rule skipping numbers

Solution Partner Pioneer Solution Partner Pioneer
Solution Partner Pioneer

Hello Randy,

how is possible to know which sequence is for what ItemType? there is not corresponding MAX / MIN value with BMIDE seting for NamingRule?

 

thank you.

 

 

Re: Naming rule skipping numbers

Solution Partner Honored Contributor Solution Partner Honored Contributor
Solution Partner Honored Contributor
I can tell you an old way to do it but I can't guarantee that it still works (dated) since I haven't run Oracle in ages...

select PNAME, PNEXT_ID
from PIMANNEXTID
where PNAME like 'CI_%'
or PNAME = 'DB Counter'
order by PNAME;

Where CI_ is the prefix you add to your counters. If you don't add a prefix then you'll just need to use the wildcard '%' instead and sort through them all. The output should resemble something like...

PNAME PNEXT_ID
-------------------------------- ----------
CI_cus 1000
CI_dwgbc 718
CI_dwgs 22437
CI_dwgsk 8278
CI_dwgss 1111
CI_eco 1416753
CI_erp 23680
CI_exp 6045413
CI_sel 32209
CI_sizeGen 30420
DB Counter 13564

Randy Ellsworth, Teamcenter Architect, Applied CAx, LLC
NX 11 | SW 2016 | Creo 4 | TcUA 11.4
Evaluating: AW 3.4

Re: Naming rule skipping numbers

Solution Partner Pioneer Solution Partner Pioneer
Solution Partner Pioneer

Hello Randy,

 

it is helpfull! Thank you.