在 2008 R2 上恢复 SQL Server 2000 数据库正在创建一个新的逻辑文件
我有一个SQL Server 2000上的数据库。PRIMARY文件组中只有两个逻辑文件:数据文件和日志文件。但是,将数据库恢复到 SQL Server 2008 R2 时,现在出现一个名为 ftrow_Table1Field1
的新逻辑文件,文件名为 ftrow_Table1Field1{GUID}.ndf
。 (为简单起见,我已替换了实际的表、字段名称和 GUID。) .ndf 文件的路径为 MSSQL10_50.MSSQLSERVER\MSSQL\FTData\
。
我没有创建这个逻辑文件,也没有在数据库上启用全文搜索。 Field1
最初是 SQL Server 2000 中的 TEXT
数据类型,我已通过 T-SQL 将其更改为 VARCHAR(MAX)
列。这也不是我从 TEXT
转换为 VARCHAR(MAX)
的唯一列。
谁能解释一下这里发生的事情吗?
编辑:我进行了另一次恢复,但没有为下一个软件版本运行大量 T-SQL 脚本。它直接从 SQL Server 2000 备份创建此文件。查看 SSMS 中该字段的属性,它显示全文为 False。数据类型为TEXT
。这不是数据库中唯一的 TEXT
字段。
I have a database on SQL Server 2000. There are only two logical files in the PRIMARY file group: the data file and the log file. However, when restoring the database to SQL Server 2008 R2, there is now a new logical file named ftrow_Table1Field1
with a file name ftrow_Table1Field1{GUID}.ndf
. (I've replaced the actual table, field name, and GUID for simplicity.) The path to the .ndf file is MSSQL10_50.MSSQLSERVER\MSSQL\FTData\
.
I did not create this logical file, nor did I enable full-text search on the database. Field1
was originally a TEXT
data type in SQL Server 2000, which I've changed via T-SQL to a VARCHAR(MAX)
column. This is also not the only column I've converted from TEXT
to VARCHAR(MAX)
.
Can anyone shed some light on what is going on here?
EDIT: I did another restore without running my massive T-SQL scripts for the next software release. Direct from the SQL Server 2000 backup, it creates this file. Looking at the Properties of the field in SSMS, it says Full Text is False. The data type is TEXT
. This is not the only TEXT
field in the database.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的。我想通了。 SQL 2000 数据库认为该字段启用了全文索引,但实际上并未启用。这在恢复期间延续到 SQL 2008 R2,因为 R2 在 SQL 2000 兼容模式下恢复并保留了假定的 .NDF。我刚刚从文件组中删除了该文件,一切都很好。此外,R2 将在 .MDF 本身中创建全文索引,而不是创建 .NDF。
Okay. I figured it out. The SQL 2000 database thought there was a full-text index enabled on the field, but it wasn't really enabled. This carried over to SQL 2008 R2 during the restore, because R2 restored in SQL 2000 compatibility mode and preserved the presumed .NDF. I just removed that file from the file group, and it's good. Also, R2 will create full-text indexes in the .MDF itself, as opposed to creating an .NDF.