What Is Textimage_On [Primary]?

I worked on many tables and all had this thing:

CREATE TABLE Persons(
    [id] [int] IDENTITY(1,1) NOT NULL,
    [modified_on] [datetime] NULL,
    [modified_by] [varchar](200) NULL,
) 
ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

What is TEXTIMAGE_ON [PRIMARY] in SQL Server/Transact-SQL?

1

3 Answers

Given that the format is:

CREATE TABLE TableName(...) TEXTIMAGE_ON { filegroup | "default" }

TEXTIMAGE refers to all big/unlimited-size field types: text, ntext, image, xml, varchar(max), nvarchar(max), varbinary(max), and CLR user-defined type columns (including geometry and geography).

Then, you need to know what Files and FileGroups are. From the MSDN entry on Database Files and Filegroups:

File

At a minimum, every SQL Server database has two operating system files: a data file and a log file. Data files contain data and objects such as tables, indexes, stored procedures, and views. Log files contain the information that is required to recover all transactions in the database. Data files can be grouped together in filegroups for allocation and administration purposes.

James H. Sterling

James H. Sterling

Environmental Science & Climate Journalist

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.