Professional Documents
Culture Documents
5618.siemens Teamcenter Oracle To SQL ServerMigration Guide
5618.siemens Teamcenter Oracle To SQL ServerMigration Guide
Abstract
This white paper outlines a best practices methodology to use when migrating from a Siemens
Teamcenter Oracle installation to Siemens Teamcenter running on the Microsoft SQL Server 2008
database platform.
Copyright Information
The information contained in this document represents the current view of Microsoft Corporation on the issues
discussed as of the date of publication. Because Microsoft must respond to changing market conditions, it should
not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of
any information presented after the date of publication. This white paper is for informational purposes only.
MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED, OR STATUTORY, AS TO THE INFORMATION IN THIS
DOCUMENT.
Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under
copyright, no part of this document may be reproduced, stored in, or introduced into a retrieval system, or
transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for
any purpose, without the express written permission of Microsoft Corporation.
Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights
covering subject matter in this document. Except as expressly provided in any written license agreement from
Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights,
or other intellectual property.
2010 Microsoft Corporation. All rights reserved.
Microsoft, SQL Server, and Windows are trademarks of the Microsoft group of companies. All other trademarks are
property of their respective owners.
Table of Contents
Siemens Teamcenter Oracle-to-SQL Server 2008 Migration Guide ....................................................... 1
About This Guide .......................................................................................................................................... 5
Overview of the Teamcenter Oracle-to-SQL Server Migration Process ..................................................... 5
Creating the Migration Plan for a Teamcenter Migration .......................................................................... 6
Installing the Teamcenter SQL Server Database ......................................................................................... 6
Installing the Oracle Client ......................................................................................................................... 10
Creating a Linked Server ............................................................................................................................ 19
Installing SQL Server Migration Assistant for Oracle V4.0 ........................................................................ 22
Determining Teamcenter Customizations ................................................................................................. 37
Migrating the Data into the Teamcenter Database .................................................................................. 47
Performing Post-Migration Tasks .............................................................................................................. 62
Validating the Migration Through Teamcenter Use Cases ....................................................................... 64
Appendix A: Basic Data Type Conversions .................................................................................................. 65
Appendix B: Sample Teamcenter Table Creation Scripts............................................................................ 68
Appendix C: Links for Further Information ................................................................................................. 73
Related Documentation
The following documentation may be helpful in learning more about implementing Teamcenter on SQL
Server:
Siemens PLM-Related Documents
o Installation on Windows Servers Guide
o Business Modeler IDE Guide
o Best Practices for Running Siemens Teamcenter on SQL Server
12. Migrate the data from the Oracle database to the staging database using T-SQL scripts through
the linked server.
13. Create a backup of the staging database.
14. Create a database snapshot of the staging database.
15. Execute object and column rename scripts against the staging database.
16. Migrate the data from the staging database to the production database using T-SQL scripts.
17. Perform post-migration tasks using the supplied scripts and SQL Server Management Studio.
18. Validate the success of the migration with use-case scenarios.
19. Back up both the production SQL Server database.
Teamcenter with a SQL Server database as described in the Siemens Teamcenter 8 Installation on
Windows Server Guide. Any additional requirements are listed in the following sections of this white
paper.
If you know the customizations you have made to your Oracle database and can recreate those
customizations in your SQL Server database, you should do so before the migration process to speed the
process and reduce its complexity.
After installing SQL Server and creating the database for the migration, you need to change the recovery
model of the SQL Server Teamcenter database to Simple for the migration process. After the migration
process, you will need to set the recovery model back to Full.
1. To change the recovery model, open SQL Server Management Studio (SSMS) by going to Start,
All Programs, Microsoft SQL Server 2008, SQL Server Management Studio.
2. Connect to your instance.
3. In the Object Explorer, expand the instance and then expand the Databases folder.
5. Change to the Options Page on the right, and use the Recovery model drop-down box to
change the recovery model to Simple.
After changing the database to the Simple recovery model, right-click the database again and select
Tasks. Select Back Up and create a backup of your database. You should also Export your Oracle
database at this time.
Next, you should create a SQL Server staging database called INFODBA, which will allow you to make any
needed schema changes and test those changes before migrating the changed schema and data to your
actual database:
CREATE DATABASE INFODBA
Note: The above CREATE DATABASE script uses the model database to create a simple database. You
will need to adjust the script to create a database on different directories than the model for your own
installations. Or you can use SSMS to create the database.
You also need to set the recovery model of the staging database to the Simple recovery model:
After you create your SQL Server staging database, you need to capture the PPOM_CLASS and
PPOM_ATTRIBUTES tables from your production database into your staging database in order to
rename tables and columns later in the migration process. Simply execute the following script against
your SQL Server database to save a copy of these tables in your staging database:
USE INFODBA -- Change to your staging database
GO
SELECT * INTO PPOM_CLASS_saved
FROM tc..PPOM_CLASS
SELECT * INTO PPOM_ATTRIBUTE_saved
FROM tc..PPOM_ATTRIBUTE
After the two needed tables, you need to empty any pre-populated tables in the production SQL Server
database. You can accomplish by truncating all tables that contain data. Simply execute the following
script against your SQL Server database to build the table truncate statements and then execute the
results of the scripts:
USE tc -- Change to your production database
GO
DECLARE @loop INT
DECLARE @command NVARCHAR(4000)
BEGIN TRY
DROP TABLE #commands
END TRY
BEGIN CATCH
END CATCH
CREATE TABLE #commands
(
colid INT IDENTITY(1,1)
,command NVARCHAR(4000)
)
INSERT INTO #commands (command)
SELECT 'TRUNCATE TABLE dbo.' + so.name
FROM sys.partitions sp
INNER JOIN sys.objects so
ON sp.object_id = so.object_id
WHERE sp.rows > 0
AND so.is_ms_shipped = 0
AND so.type = 'u'
AND sp.index_id IN (0,1)
ORDER BY so.name
SET @loop = @@ROWCOUNT
WHILE @loop > 0
BEGIN
SELECT @command = command FROM #commands WHERE colid = @loop
exec dbo.sp_executesql @command
SET @loop -= 1
END
(Note: DO NOT delete any data in your existing Oracle production database.)
10
11
3. Unzip the saved file and execute Setup.exe to start the installation.
12
13
5. Enter the Home Destination details, which specify the name for the installation and the path
where you want the client installed, and click Next.
14
15
16
17
18
19
5. Click the Security Tab and input the login and password you will use to connect to the Oracle
database. (This example recreates the infodba login on SQL Server to use for the linked server:
infodba with password of infodba. This login should be made a member of the dbo_owners
group.)
6. Click OK, and then Test your new linked server by expanding the tables of the linked server.
20
21
22
4. Determine if you want to send a Usage Report to Microsoft and then click Next.
23
6. Click Install.
24
8. Youre not ready to install the Extension Pack by unzipping the downloaded file and doubleclicking the SSMA installer called SSMA 2008 for Oracle Extension Pack.4.0.Install.exe.
25
26
27
28
13. When the first step of the installation is complete, click Next to install SQL scripts on the
instances you specify.
29
14. Choose the SQL Server database instance (your instance name will be different from the
example) and click Next.
30
15. Enter the connection information required to connect to your SQL Server database instance and
click Next.
31
16. At the screen that asks whether you would like to install the Extension Pack Utilities Database
on your instance, leave at the default settings to install them and click Next.
32
18. After the installation is finished, click No; you do not want to install the Utilities Database on
another instance.
33
34
2. Obtain the License Key by using the provided license registration page link.
Note: You will need to register with Microsoft to obtain the license key. This registration is used to
help provide support for SSMA and notify you of SSMA updates and fixes.
3.
35
4. Change the directory to the location where you placed the downloaded license key and refresh
the license.
36
location.
37
38
39
7. Edit the following mappings as noted by highlighting the data type and clicking Edit.
Source Type
Float
Number
Numeric
Real
Target Type
Float
Float
Float
Float
40
8. Click OK and repeat for each data type in the above table.
9. Now connect to the SQL Server database.
41
15. When the analysis is finished, you will see that the output shows both errors and warnings. The
23 errors are for function-based indexes, and the warnings are for loss of precision. The indexes
42
have been accounted for in the production schema, and we are not using SSMA to migrate the
data. You can ignore these errors and warnings.
Note: Your exact output may be different depending on the amount of customizations you have
to your Oracle Teamcenter installation.
16. Once the conversion is finished, you need to synchronize the SQL Server database with the
Oracle database by right-clicking the SQL Server database and selecting Synchronize with
Database.
43
18. Because the INFODBA database is a staging database, the indexes are not needed. To speed the
data migration process, you should drop all indexes in the staging database. Execute the
following script in SSMS to create your index drop statements, and then execute the results of
the script to drop the indexes:
USE INFODBA
GO
DECLARE @commandtable TABLE(colid INT IDENTITY(1,1),commandstr
VARCHAR(2000))
DECLARE @command NVARCHAR(2000)
DECLARE @loop_count INT
INSERT INTO @commandtable (commandstr)
SELECT 'DROP INDEX ' + si.name + ' ON ' + so.name
FROM sys.indexes si
INNER JOIN sys.objects so
ON si.object_id = so.object_id
WHERE so.is_ms_shipped = 0
AND si.index_id > 0
SET @loop_count = @@ROWCOUNT
WHILE @loop_count > 0
BEGIN
SELECT @command = commandstr FROM @commandtable WHERE colid =
@loop_count
44
BEGIN TRY
EXEC dbo.sp_executesql @command
END TRY
BEGIN CATCH
END CATCH
SET @loop_count -= 1
END
Execute the results of the above script to identify tables that you will need to create.
Once you have a list of tables that are missing from the SQL Server database, you need to connect to
Oracle to describe the tables so that you can recreate them in SQL Server. Do not use the schema
created by SSMA to recreate the missing tables; use the Oracle schema.
In Oracle
For each table in the output from the above script, describe the table and create a T-SQL table creation
script for the table. For example, lets say that the PCOUNTER_TAGS_1 table was not found in SQL
Server. To get the description, execute the following:
desc PCOUNTER_TAGS_1;
Note: Use the SQL Server-to-Oracle data type conversion table in Appendix A to correctly map the data
types from Oracle to SQL Server.
BEGIN TRY
DROP TABLE PCOUNTER_TAGS_1
END TRY
BEGIN CATCH
END CATCH
CREATE TABLE PCOUNTER_TAGS_1
(
puid
NVARCHAR(15) NOT NULL
,pseq
FLOAT
NOT NULL
,pvalu_0
NVARCHAR(15)
,pvalc_0
FLOAT
)
GO
Note: You can find sample CREATE TABLE scripts in Appendix B for creating tables missing from base
installations.
In SQL Server
Execute the CREATE TABLE statements you created for each missing Oracle table in your production
database.
46
ORDER BY TABLE_NAME;
Now you can create those missing constraints on your tables in your production SQL Server production
database:
-- Change to your production database
USE tc
GO
CREATE UNIQUE NONCLUSTERED INDEX SYS_C009756 ON
SYS_IMPORT_SCHEMA_01(PROCESS_ORDER,DUPLICATE)
@table_count BIGINT
@table_name VARCHAR(255)
@strsql nvarchar(4000)
@strsql2 VARCHAR(4000)
BEGIN TRY
DROP TABLE #tables
END TRY
BEGIN CATCH
END CATCH
CREATE TABLE #tables
(
colid INT IDENTITY(1,1)
,table_name VARCHAR(255)
)
BEGIN TRY
DROP TABLE #columns
END TRY
BEGIN CATCH
47
END CATCH
CREATE TABLE #columns
(
colid INT IDENTITY(1,1)
,column_name VARCHAR(255)
,system_type_id INT
)
INSERT INTO #tables (table_name)
SELECT TABLE_NAME FROM ORACLETC..SYS.USER_TABLES
WHERE TABLE_NAME <> 'PLAN_TABLE'
SET @table_count = @@ROWCOUNT
WHILE @table_count > 0
BEGIN
TRUNCATE TABLE #columns
SELECT @table_name = table_name FROM #tables WHERE colid =
@table_count
SET @strsql = 'INSERT INTO #columns (column_name,system_type_id)
SELECT name, system_type_id FROM sys.columns WHERE object_id =
OBJECT_ID('''
+ @table_name + ''')'
EXEC dbo.sp_executesql @strsql
UPDATE #columns
SET column_name = 'CAST(' + column_name + ' AS VARCHAR(1000))'
WHERE system_type_id IN (108)
SET @strsql2 = ''
SELECT @strsql2 = @strsql2 + column_name + ','
FROM #columns
SET @strsql2 = @strsql2 + '|' --take care of trailing comma
SET @strsql2 = REPLACE (@strsql2,',|',' ')
SET @strsql = 'INSERT INTO ' + @table_name
+ ' SELECT * FROM OPENQUERY(ORACLETC,''SELECT ' + @strsql2 + '
FROM INFODBA.'
+ @table_name + ''') AS ROWSET_1'
BEGIN TRY
EXEC dbo.sp_executesql @strsql
END TRY
BEGIN CATCH
SELECT @strSQL
END CATCH
SET @table_count -= 1
END
2. Verify that the rows in the Oracle database and the SQL Server staging database are consistent:
48
USE INFODBA
GO
SET NOCOUNT ON
BEGIN TRY
DROP TABLE #ora_tables
END TRY
BEGIN CATCH
END CATCH
CREATE TABLE #ora_tables (
colid INT IDENTITY(1,1)
,table_name VARCHAR(255)
,row_count BIGINT
)
BEGIN TRY
DROP TABLE #sql_tables
END TRY
BEGIN CATCH
END CATCH
CREATE TABLE #sql_tables (
colid INT IDENTITY(1,1)
,table_name VARCHAR(255)
,row_count BIGINT
)
DECLARE
DECLARE
DECLARE
DECLARE
@ora_table_count INT
@sql_table_count INT
@table_name VARCHAR(255)
@strSQL NVARCHAR(4000)
49
@ora_table_count INT
@loop INT
@table_name VARCHAR(255)
@column_name VARCHAR(255)
@strSQL NVARCHAR(4000)
SET @loop = 1
INSERT INTO #ora_tables(table_name,column_name)
SELECT TABLE_NAME, COLUMN_NAME
FROM ORACLETC..SYS.USER_TAB_COLUMNS
WHERE DATA_TYPE = 'FLOAT'
AND DATA_PRECISION = 126
SET @ora_table_count = @@ROWCOUNT
50
Note: You may have to manually correct any data precision issues by changing the data types of
the production SQL Server database.
4. After migrating the data from the Oracle database into your staging database, create a backup
of the staging database.
5. After the backup completes, you will need to create a snapshot database of the database for
easier rollback to the migrated staging database in case of errors or issues during the migration
to the production database.
USE master
GO
--Determine file names
SELECT name, physical_name FROM sys.master_files
WHERE database_id = DB_ID('INFODBA')
CREATE DATABASE INFODBA_snapshot
ON
--You will need to change the path to your SQL Server directory.
51
( NAME = INFODBA
, FILENAME =
'C:\Program Files\Microsoft SQL
Server\MSSQL10.MSSQLSERVER\MSSQL\Data\INFODBA.ss' )
AS SNAPSHOT OF INFODBA;
GO
6. After creating a snapshot of the staging database for rollback purposes, you will now need to
rename several tables in the staging database schema to match the production database
schema.
--Rename tables in staging to match production
USE INFODBA
GO
SET NOCOUNT ON
DECLARE @loop INT
DECLARE @loop_1 INT
DECLARE @rowcount INT
DECLARE @command_1 NVARCHAR(4000)
DECLARE @command_2 NVARCHAR(4000)
--There will be one set of commands for temporary names
--There will be another set of commands for final names
SET @loop_1 = 2
--Table to hold rename commands
BEGIN TRY
DROP TABLE #PLOVP
END TRY
BEGIN CATCH
END CATCH
CREATE TABLE #PLOVP
(
colid INT IDENTITY(1,1)
,command_1 NVARCHAR(4000)
,command_2 NVARCHAR(4000)
)
COLLATE Latin1_General_BIN
COLLATE Latin1_General_BIN
52
7. After creating a snapshot of the staging database for rollback purposes, you will now need to
rename several columns in the staging database schema to match the production database
schema.
--Rename columns in staging to match production
USE INFODBA
GO
SET NOCOUNT ON
DECLARE @rowcount INT
DECLARE @command_1 NVARCHAR(4000)
--Table to hold rename commands
53
BEGIN TRY
DROP TABLE #PLOVP
END TRY
BEGIN CATCH
END CATCH
CREATE TABLE #PLOVP
(
colid INT IDENTITY(1,1)
,command_1 NVARCHAR(4000)
)
COLLATE Latin1_General_BIN
54
8.
10. Once you are satisfied that everything is correct and have performed all use-case testing from
your migration plan, migrate the data into the production database:
USE tc
GO
SET NOCOUNT ON
DECLARE
DECLARE
DECLARE
DECLARE
@table_count BIGINT
@table_name VARCHAR(255)
@strsql nvarchar(4000)
@strsql2 VARCHAR(4000)
BEGIN TRY
DROP TABLE #row_count
END TRY
BEGIN CATCH
END CATCH
CREATE TABLE #row_count
(
colid INT IDENTITY(1,1)
,table_name VARCHAR(255)
,row_count BIGINT
)
55
BEGIN TRY
DROP TABLE #tables
END TRY
BEGIN CATCH
END CATCH
CREATE TABLE #tables
(
colid INT IDENTITY(1,1)
,table_name VARCHAR(255)
)
BEGIN TRY
DROP TABLE #columns
END TRY
BEGIN CATCH
END CATCH
CREATE TABLE #columns
(
colid INT IDENTITY(1,1)
,column_name VARCHAR(255)
,system_type_id INT
)
DECLARE @row_count INT
INSERT INTO #row_count(table_name)
SELECT name FROM INFODBA.sys.objects
WHERE is_ms_shipped = 0
AND type = 'U'
SET @row_count = @@ROWCOUNT
WHILE @row_count > 0
BEGIN
SELECT @table_name = table_name FROM #row_count WHERE colid =
@row_count
SET @strSQL = 'UPDATE #row_count SET row_count = (SELECT COUNT(*) FROM
INFODBA.dbo.' + @table_name + ' WITH (NOLOCK))
WHERE colid = ' + CAST(@row_count AS VARCHAR(20))
EXEC sp_executesql @strSQL
SET @row_count -= 1
END
INSERT INTO #tables (table_name)
SELECT so.name
FROM tc.sys.objects so
WHERE so.is_ms_shipped = 0
AND so.type = 'U'
SET @table_count = @@ROWCOUNT
WHILE @table_count > 0
BEGIN
TRUNCATE TABLE #columns
SET @row_count = 0
56
11. The script above will produce a listing of tables that did not have data into them due to column
differences between the staging and production databases. You may have to manually create
some table insert statements to overcome these column differences, as in these examples:
USE tc
GO
--Column names different
INSERT INTO PPOM_SITE_CONFIG(puid,LS_13_2,pindex )
SELECT puid,LS_388_1,pindex FROM INFODBA.dbo.PPOM_SITE_CONFIG
--Column names different
INSERT INTO PTC_PREFERENCES(puid,LS_330_2,robject_tagu,robject_tagc )
SELECT puid,LS_473_1,robject_tagu,robject_tagc FROM
INFODBA.dbo.PTC_PREFERENCES
57
58
SELECT
site_id,[schema],[path],site_state,cpid,[version],scan_state,scan_name,
scan_class,info,can_edit_schema FROM INFODBA.dbo.POM_ROOT
--Columns PIPWORKSPACEOBJ_0_0 and PIPWORKSPACEOBJ_1_0 not in SQL Server
table
INSERT INTO
PWORKSPACEOBJECT(puid,pobject_name,pobject_desc,pobject_type,pobject_ap
plication,VLA_484_7,pip_classification,VLA_484_10,pgov_classification,V
LA_484_13,VLA_484_16,pactive_seq,prevision_number,rwso_threadu,rwso_thr
eadc,rowning_organizationu,rowning_organizationc,prevision_limit,rownin
g_projectu,rowning_projectc,pdate_released )
SELECT
puid,pobject_name,pobject_desc,pobject_type,pobject_application,VLA_484
_7,pip_classification,VLA_484_10,pgov_classification,VLA_484_13,VLA_484
_16,pactive_seq,prevision_number,rwso_threadu,rwso_threadc,rowning_orga
nizationu,rowning_organizationc,prevision_limit,rowning_projectu,rownin
g_projectc,pdate_released FROM INFODBA.dbo.PWORKSPACEOBJECT
12. Verify the row counts between the staging and production SQL Server databases:
USE INFODBA
GO
SET NOCOUNT ON
BEGIN TRY
DROP TABLE #sql_tables_staging
END TRY
BEGIN CATCH
END CATCH
CREATE TABLE #sql_tables_staging
(
colid INT IDENTITY(1,1)
,table_name VARCHAR(255)
,row_count BIGINT
)
BEGIN TRY
DROP TABLE #sql_tables_final
END TRY
BEGIN CATCH
END CATCH
CREATE TABLE #sql_tables_final
(
colid INT IDENTITY(1,1)
,table_name VARCHAR(255)
,row_count BIGINT
)
DECLARE
DECLARE
DECLARE
DECLARE
@stage_table_count INT
@final_table_count INT
@table_name VARCHAR(255)
@strSQL NVARCHAR(4000)
59
60
@staging_table_count INT
@loop INT
@table_name VARCHAR(255)
@column_name VARCHAR(255)
@strSQL NVARCHAR(4000)
SET @loop = 1
INSERT INTO #staging_tables(table_name,column_name)
SELECT TABLE_NAME, COLUMN_NAME
FROM ORACLETC..SYS.USER_TAB_COLUMNS
WHERE DATA_TYPE = 'FLOAT'
AND DATA_PRECISION = 126
SET @staging_table_count = @@ROWCOUNT
SET @loop = @staging_table_count
WHILE @loop > 0
BEGIN
SELECT @table_name = table_name, @column_name = column_name
FROM #staging_tables WHERE colid = @loop
SET @strSQL = 'UPDATE #staging_tables SET staging_data_length =
(SELECT ISNULL(MAX(LEN(' + @column_name + ')),0) FROM
INFODBA.dbo.' + @table_name + ' WITH (NOLOCK))
WHERE colid = ' + CAST(@loop AS VARCHAR(20))
EXEC sp_executesql @strSQL
SET @loop -= 1
END
SET @loop = @staging_table_count
WHILE @loop > 0
BEGIN
SELECT @table_name = table_name, @column_name =LOWER(column_name)
FROM #staging_tables WHERE colid = @loop
--You will have to change production database name
BEGIN TRY
SET @strSQL = 'UPDATE #staging_tables SET final_data_length
= (SELECT ISNULL(MAX(LEN(' + @column_name COLLATE
Latin1_General_BIN + ')),0) FROM tc.dbo.' + @table_name +
' WITH (NOLOCK))
WHERE colid = ' + CAST(@loop AS VARCHAR(20))
EXEC sp_executesql @strSQL
END TRY
BEGIN CATCH
61
Note; You may have to manually correct any data precision issues.
14. Drop the staging database snapshot:
USE MASTER
GO
DROP DATABASE INFODBA_snapshot
GO
SELECT OBJECT_NAME(object_id),
index_id,
page_count,
index_type_desc,
avg_fragmentation_in_percent,
fragment_count
FROM sys.dm_db_index_physical_stats(db_id(),NULL,NULL,NULL,'LIMITED')
To identify the indexes by name, you can join against the sys.indexes system view.
Similar information is also available in the Standard Reports in SSMS. To view this report, right-click the
Teamcenter database, select Reports, Standard Reports, and then select the Index Physical Statistics
report on the fly-out menu.
The rule-of-thumb in the following table indicates how to interpret the avg_fragmentation_in_percent
value.
Fragmentation
< 5%
5% to 30%
> 50%
Recommended Action
Do nothing
Reorganize with
ALTER INDEX REORGANIZE
Rebuild with
ALTER INDEX REBUILD WITH (ONLINE=ON)
or
CREATE INDEX with DROP_EXISTING=ON
Reorganizing an index does not block user access to the index while underway. Rebuilding or recreating
the index, however, does prevent user access to the index. The exception to this is if the ALTER INDEX
REBUILD statement is used with the ONLINE = ON option. Note that online index rebuild requires the
Enterprise Edition of SQL Server 2008.
Periodically checking index fragmentation and taking any necessary corrective action is important to
maintaining the performance of your Teamcenter deployment. The rate at which fragmentation may
occur depends on user activity, but as a general rule Siemens recommends checking index
fragmentation at least monthly.
database, index_verifier will have no knowledge of them and it will be your responsibility to ensure that
those indexes are carried forward and maintained.
You can find full documentation of these utilities in the Teamcenter Utilities Reference Manual available
on the Siemens Teamcenter GTAC Support Site.
64
SQL Server
Number(19,0)
BigInt
Int or Number(10,0)
Int
SmallInt or Number(6,0)
SmallInt
Number(3,0)
TinyInt
Number(p,0)
Decimal(p,s)
Number(p,0)
Numeric(p,s)
Float
Number(1)
Bit
Number(19,4)
Money
Number(10,4)
SmallMoney
SQL Server
Size in bytes
Data Type
Number of
Chars
Size in bytes
65
Char
1 to 2000
Char
1 to 8000
1 to 8000 fixed
NChar
NChar
1 to 4000
2 to 8000 fixed
Varchar
1 to 4000
Varchar
Varchar(max)
1 to 8000
1 to 231-1
0 to 8000
0 to 2GB
NVarchar
NVarchar
NVarchar(max)
1 to 4000
1 to 230-1
0 to 8000
0 to 2GB
Varchar2
1 to 4000
NVarchar2
LONG
1 to 231
Text,
Varchar(max)
1 to 231-1
0 to 2GB
CLOB
1 to 232
Text,
Varchar(max)
1 to 231-1
0 to 2GB
NCLOB
1 to 232
Ntext,
Nvarchar(max)
1 to 230-1
0 to 2GB
SQL Server
Data Type
Values
Data Type
Values
Date
SmallDateTime
DateTime
Calendar
DateTime2 (DT2)
Timestamp (TS)
Timestamp with
time zone (TSTZ)
66
Timestamp with
local time zone
(TSLTZ)
DateTimeOffset
Calendar Julian
Calendar
Gregorian
Daylight Saving
Time Support
Yes
Daylight Saving
Time Support
No
DATE
TIME
SQL Server
BLOB
Image, Varbinary(max)
Raw
Image, Varbinary(max)
Long Raw
Image, Varbinary(max)
BFile
Similar to
Varbinary(max) Filestream
BLOB/Raw(n)
Binary(n)
BLOB/Raw(n)
Varbinary(n), Varbinary(max)
67
NULL
NULL
68
,SIZE_ESTIMATE
FLOAT NULL
,OBJECT_ROW FLOAT NULL
,PROCESSING_STATE CHAR(1)
NULL
,PROCESSING_STATUS
CHAR(1)
,BASE_PROCESS_ORDER
FLOAT NULL
,BASE_OBJECT_TYPE VARCHAR(30) NULL
,BASE_OBJECT_NAME VARCHAR(30) NULL
,BASE_OBJECT_SCHEMA
VARCHAR(30)
,ANCESTOR_PROCESS_ORDER FLOAT NULL
,DOMAIN_PROCESS_ORDER
FLOAT NULL
,PARALLELIZATION FLOAT NULL
,UNLOAD_METHOD
FLOAT NULL
,GRANULES
FLOAT NULL
,SCN FLOAT NULL
,GRANTOR
VARCHAR(30) NULL
,XML_CLOB
VARCHAR(MAX)
NULL
,NAME VARCHAR(30) NULL
,VALUE_T
VARCHAR(4000)
NULL
,VALUE_N
FLOAT NULL
,IS_DEFAULT FLOAT NULL
,FILE_TYPE FLOAT NULL
,USER_DIRECTORY
VARCHAR(4000)
,USER_FILE_NAME
VARCHAR(4000)
,FILE_NAME VARCHAR(4000)
NULL
,EXTEND_SIZE
FLOAT NULL
,FILE_MAX_SIZE
FLOAT NULL
,PROCESS_NAME
VARCHAR(30) NULL
,LAST_UPDATE
DATE NULL
,WORK_ITEM VARCHAR(30) NULL
,OBJECT_NUMBER
FLOAT NULL
,COMPLETED_BYTES FLOAT NULL
,TOTAL_BYTES
FLOAT NULL
,METADATA_IO
FLOAT NULL
,DATA_IO
FLOAT NULL
,CUMULATIVE_TIME FLOAT NULL
,PACKET_NUMBER
FLOAT NULL
,OLD_VALUE VARCHAR(4000)
NULL
,SEED FLOAT NULL
,LAST_FILE FLOAT NULL
,USER_NAME VARCHAR(30) NULL
,OPERATION VARCHAR(30) NULL
,JOB_MODE
VARCHAR(30) NULL
,CONTROL_QUEUE
VARCHAR(30) NULL
,STATUS_QUEUE
VARCHAR(30) NULL
,REMOTE_LINK
VARCHAR(4000)
,VERSION
FLOAT NULL
,DB_VERSION VARCHAR(30) NULL
,TIMEZONE
VARCHAR(64) NULL
,STATE
VARCHAR(30) NULL
,PHASE
FLOAT NULL
,GUID VARBINARY(16)
NULL
,START_TIME DATE NULL
,BLOCK_SIZE FLOAT NULL
,METADATA_BUFFER_SIZE
FLOAT NULL
,DATA_BUFFER_SIZE FLOAT NULL
,DEGREE
FLOAT NULL
,PLATFORM
VARCHAR(101)
NULL
NULL
NULL
NULL
NULL
NULL
69
70
,pvis_id
)
GO
VARCHAR(64) NULL
BEGIN TRY
DROP TABLE PVISMANAGEDDOCUMENT
END TRY
BEGIN CATCH
END CATCH
CREATE TABLE PVISMANAGEDDOCUMENT
(
puid
VARCHAR(30) NOT NULL
,pvis_id
VARCHAR(64) NULL
)
GO
BEGIN TRY
DROP TABLE PPATTERN_0
END TRY
BEGIN CATCH
END CATCH
CREATE TABLE PPATTERN_0
(
puid
,pseq
,pval_0
)
GO
BEGIN TRY
DROP TABLE POCCURRENCE_LIST
END TRY
BEGIN CATCH
END CATCH
CREATE TABLE POCCURRENCE_LIST
(
puid
VARCHAR(30) NOT NULL
,pseq
FLOAT NOT NULL
,pvall
FLOAT NULL
,pval
VARCHAR(MAX) NULL
)
GO
BEGIN TRY
DROP TABLE PVISSTRUCTURECONTEXT
END TRY
BEGIN CATCH
END CATCH
CREATE TABLE PVISSTRUCTURECONTEXT
(
puid
VARCHAR(30) NOT NULL
,vla_847_2
FLOAT NULL
,rstatic_structure_fileu VARCHAR(30) NULL
71
72
74