Symptom
Even if the table does not contain any text, ntext, or image columns, when SQL Enterprise Manager runs the "generate SQL script" tool, SQL Server generates the textimage _ on clause (DDL) in the table and table definition) create a script. This makes the script execution impossible due to the following errors:
Server: Message 1709, level 16, status 1, Row 1
Textimage _ on cannot be used when the table does not have text, ntext, or image columns.
Cause
The text, ntext, or image Column exists once in the table. It can be used to delete an Enterprise Manager by using the altertable command or SQL.
Alternative Method
The solution is to delete this clause from the table definition and run the script.
Status
Microsoft has confirmed that this is an issue in this article listing Microsoft products.
More information
The following is a simple script to illustrate the problem:
Create Table mytable (
Myint int,
Mytext text
)
Go
Alter table mytable drop column mytext
Go
--- Running the "generate SQL scripts" tool will generate:
If exists (select * From sysobjects where id =
Object_id (n' [DBO]. [mytable] ') and objectproperty (ID, n'isusertable') = 1)
Drop table [DBO]. [mytable]
Go
Create Table [DBO]. [mytable] (
[Myint] [int] Null
) On [primary] textimage_on [primary]
Go
Textimage _ on primarykey] [It should not be part of the table definition. Delete it and execute the script.