Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7185547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:26:21+00:00 2026-05-28T18:26:21+00:00

When you use SQL Server Management Studio to generate a script for creating a

  • 0

When you use SQL Server Management Studio to generate a script for creating a table, the last thing it does is set ansi_padding off.

I’ve run into a problem where this statement is causing an issue further down the line when working with xml.

The error message implies that the ansi_padding must be on when using the XQuery features, and googling confirms. However, I’d really like to see some official documentation stating this as a requirement, to make sure there isn’t anything else we’re taking for granted.

I understand the implications of this option and have since removed the statement, but I still want to know:

Is ansi_padding ‘on’ officially required for working with xml columns in SQL Server?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T18:26:22+00:00Added an answer on May 28, 2026 at 6:26 pm

    Yes, it is officially required.

    http://msdn.microsoft.com/en-us/library/ms188285.aspx

    Quoted from above link:

    When querying xml type columns or variables using xml data type
    methods, the following options must be set as shown.

    SET Options

    Required Values

    ANSI_NULLS

    ON

    ANSI_PADDING

    ON

    ANSI_WARNINGS

    ON

    ARITHABORT

    ON

    CONCAT_NULL_YIELDS_NULL

    ON

    NUMERIC_ROUNDABORT

    OFF

    QUOTED_IDENTIFIER

    ON

    If the options are not set as shown, queries and modifications on xml
    data type methods will fail.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When generating code/scripts, why does SQL Server Management Studio generate code using square brackets
I usually do not use Sql Server Management Studio, I usually use Linqpad to
I can use the sql server management studio to open a sqlserver 2000 database,
I use Microsoft SQL Server Management Studio a lot. Every time I'm starting the
I use the following connection string in SQL Server Management Studio. It failed to
Can i use the sql server 2008 r2 management studio to connect to a
Is there a way to use SQL Server Management Studio Express together with a
I use SQL Server 2005. I have a simple logging table that my web
I've been using Microsoft SQL Server Management Studio for multiple manual SQL queries for
Almost every time I close SQL Server Management Studio I get a prompt that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.