我正在将数据库从sql server 2008迁移到teradata

编程入门 行业动态 更新时间:2024-10-26 04:23:18
本文介绍了我正在将数据库从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

本文发布于:2023-10-16 10:17:37,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1497287.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:数据库   sql   server   teradata

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!