当我从一台服务器生成一个数据库的脚本时,我试图在另一台服务器上创建该数据库,但它显示错误“无法找到数据类型dbo.DBFLT8” 。 我在谷歌搜索了很多,但无法解决这个问题。 如何解决这个问题?
CREATE TABLE [dbo].[AWControl]( [LastRetrievalTime] [datetime] NULL, [LastRetrievalKey] [dbo].[DBFLT8] NOT NULL, [ControllerConfigChangeTime] [datetime] NULL, [ControllerConfigChangeKey] [dbo].[DBFLT8] NOT NULL, [ConfigChangedBySystemName] [dbo].[VNAME32] NULL, [ConfigChangedByUserName] [varchar](64) NULL, [HDSPropertyEnabled] [dbo].[DBCHAR] NOT NULL, [AWType] INT NOT NULL )When I generated a script of one database from one server and I tried to create that database in another server but it showing the error 'Cannot find data type dbo.DBFLT8'. I searched a lot in Google but not able to fix this issue. How to fix this issue?
CREATE TABLE [dbo].[AWControl]( [LastRetrievalTime] [datetime] NULL, [LastRetrievalKey] [dbo].[DBFLT8] NOT NULL, [ControllerConfigChangeTime] [datetime] NULL, [ControllerConfigChangeKey] [dbo].[DBFLT8] NOT NULL, [ConfigChangedBySystemName] [dbo].[VNAME32] NULL, [ConfigChangedByUserName] [varchar](64) NULL, [HDSPropertyEnabled] [dbo].[DBCHAR] NOT NULL, [AWType] INT NOT NULL )最满意答案
看起来您尝试运行CREATE TABLE脚本的服务器中缺少用户定义的数据类型。
运行查询以确认 - select * from sys.types where name = 'DBFLT8' and is_user_defined = 1 - 如果这不会返回任何行,那么在迁移您在数据类型上遗漏的对象脚本时。
因此,下一步是从旧服务器生成数据类型的脚本,然后在新服务器中运行相同的脚本,然后运行CREATE TABLE脚本。 希望能帮助到你。
Looks like the user-defined datatype is missing from your server where you are trying to run the CREATE TABLE script.
Run the query to confirm - select * from sys.types where name = 'DBFLT8' and is_user_defined = 1 - if this doesn't return any row then while migrating the object scripts you had missed on the datatype.
So the next step would be generate the script for the datatype from old server and then run the same in new server and then run the CREATE TABLE script. Hope it helps.
更多推荐
发布评论