Getting error while creating database

  • Getting error while creating database.

    "

    SELECT failed because the following SET options have incorrect settings: 'QUOTED_IDENTIFIER'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or query notifications and/or xml data type methods. (Microsoft SQL Server, Error: 1934)

    "

    Thanks,

  • What command are you using to create the database? If you're using the GUI, please use the Script button to generate the script that gets run behind the scenes to create the database.

    John

  • i am using

    create database [databasename]

  • If you are using script use

    SET QUOTED_IDENTIFIER ON

    Go

    Create database <DBName>

  • Thanks murali for reply,

    i have tried with below commands and got the same error.

    SET QUOTED_IDENTIFIER ON

    Go

    Create database <DBName>

  • Do you have a DDL trigger implemented that fires for create database statements?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Thanks for reply,

    Can you please tell me know ..

    How to find the DDL trigger implemented that fires for create database statements

  • Speak to your DBA. If there is one, he'd have had to implement it.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • I am SA permission on that and we have not implemented ddl trigers on it

    thank u

  • Then someone has likely implemeted a DDL trigger without your permission. Check under server triggers in management studio.

    Reason is, create database does not run any select statements but your error refers to a select statement.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • You can view possible suspects in the view sys.server_triggers. Beside being created manually, server triggers can also be added by Policy-Based Management.

    Although, I would place my bets on that this is an incorrectly created DDL trigger. There is a flaw in SSMS, so it scripts DDL triggers with incorrect SET commands.

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]

Viewing 11 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic. Login to reply