
sql server - Unable to alter CDC tables - Database Administrators …
Nov 18, 2024 · I have an issue with being unable to alter a CDC table that previously caused us no issue. We run alter statements on our cdc tables to add a column to the tables that we now …
sql server - Permission to grant SELECT, UPDATE, DELETE, ALTER …
Sep 12, 2022 · In SQL Server 2019, I have created a user defined database role MyDbRole. Now I want to grant following permissions to MyDbRole for all tables in the database. CREATE, …
sql server - Can I change table structure in a transaction and then ...
Yes, it is possible to use many ALTER TABLE statements in one transaction with ROLLBACK and COMMIT. Here is a scaffold for your script (following MS guidelines with improvements): …
sql server - How dangerous is granting the ALTER TABLE …
Apr 14, 2018 · SQL Permission to Truncate Table; SQL Server TRUNCATE TABLE permissions; The difference between those two answers is the permission granted to the signature-based …
sql server - Altering Multiple Tables - Database Administrators …
Apr 1, 2014 · ALTER COLUMN DDL that should be the T-SQL text to make the column alteration. It sounds like this may be a non-production environment/database, but it is worth saying that …
sql server - Why does simple ALTER TABLE command take so long …
In SQL Server 2012+, the operation is much faster, see Online non-NULL with values column add in SQL Server 11 as it only updates the metadata of the table and does not actually update …
sql server - How To change the column order? - Database …
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE; BEGIN TRANSACTION; ALTER TABLE dbo.Employee ADD Nametmp NVARCHAR(255); UPDATE dbo.Employee SET …
Altering nullability of column in SQL Server
ALTER TABLE ALTER COLUMN field2 failed because one or more objects access this column. Also, I cannot change field1 back to not null. However, I can add and then drop check …
sql server - What is a WITH CHECK CHECK CONSTRAINT?
The MSDN documentattion page about ALTER TABLE explains these: ALTER TABLE: modify the table's structure (and some of the possible actions/modifications are): CHECK CONSTRAINT …
sql server - Add DEFAULT to existing column - Database …
Jun 11, 2012 · ALTER TABLE yourTable ADD CONSTRAINT constraintName DEFAULT ('XYZ') FOR [YourColumn] To change the default, drop the constraint and re-add it with the new …