我正在将数据库从sql server 2008迁移到teradata [英] i am migrtaing database from sql server 2008 to teradata

查看:86
本文介绍了我正在将数据库从sql server 2008迁移到teradata的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将数据库从Sql Server 2008迁移到Teradata
,并且遇到了一个问题:



在Sql Server中,表列的ddl中的定义如下:

  [rowguid] uniqueidentifier ROWGUIDCOL NOT NULL约束[DF_Address_rowguid]默认(NEWID())

如果用户未提供,此列将使用newid()函数生成并在[rowguid]列中插入随机varchar值任何输入。



Teradata中没有类似的函数可以生成该值。



可以代替什么为Teradata创建类似的表ddls时,Sql Server的NEWID()函数的作用? Teradata中的/ UUID。 Teradata确实提供了IDENTITY列来提供自动递增列。 IDENTITY列并非没有细微差别,我鼓励您阅读第5章-创建表 .cfm?itemid = 102320036 rel = nofollow> SQL数据定义语言-详细主题,其中有一节解释了身份列。



从SQL Server迁移到Teradata的一部分,您将需要了解如何通过表的主索引在Teradata中分发数据的概念。这可能需要您检查现有的数据模型并重新设计它在Teradata中的物理实现方式。


I am migrating a database from Sql Server 2008 to Teradata and I am facing a problem:

In Sql Server in the ddl of a table column is defined as follows:

[rowguid] uniqueidentifier ROWGUIDCOL NOT NULL CONSTRAINT [DF_Address_rowguid] DEFAULT (NEWID())

This column uses newid() function to generate and insert random varchar value in the column [rowguid] if the user doesnt provide any input.

There is no similar function in Teradata to generate this value.

What can be used instead of of NEWID() function of Sql Server while creating similar table ddls for Teradata?

解决方案

There is no native equivalent for a GUID/UUID in Teradata. Teradata does offer an IDENTITY column to provide an auto-incrementing column. The IDENTITY column does not come without its own nuances and I would encourage you to read the Chapter 5 - Create Table in the SQL Data Definition Language - Detailed Topics which has a section explaining Identity Columns.

However, as part of your migration from SQL Server to Teradata you will need to understand the concept of how data is distributed in Teradata by means of the table's primary index. This may require that you review your existing data model and re-engineer how it is physically implemented in Teradata.

这篇关于我正在将数据库从sql server 2008迁移到teradata的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆