Beispiel #1
0
        internal static string SetDatabaseOptionsScript(SqlVersion sqlVersion, string databaseName)
        {
            if (sqlVersion < SqlVersion.Sql9)
            {
                return(string.Empty);
            }
            SqlDdlBuilder sqlDdlBuilder = new SqlDdlBuilder();

            sqlDdlBuilder.AppendSql("if serverproperty('EngineEdition') <> 5 execute sp_executesql ");
            sqlDdlBuilder.AppendStringLiteral(SqlDdlBuilder.SetReadCommittedSnapshotScript(databaseName));
            return(sqlDdlBuilder.unencodedStringBuilder.ToString());
        }