SQL statement is executed but not executed
Website with SQL 2012 Database:
ALTER TABLE is executed to add a column. The website is configured to use a SQL account (we will call it myAccount), and this account is db_owner.
Statement
ALTER TABLE [ItemType_Website_Settings] ADD [myNumber] INT NULL DEFAULT(0)
The ALTER TABLE statement is registered with SQL Profiler with BatchCompleted . But when updating the table, the column was not created.
Besides
SELECT t.name AS table_name,
SCHEMA_NAME(schema_id) AS schema_name,
c.name AS column_name
FROM sys.tables AS t
INNER JOIN sys.columns c ON t.OBJECT_ID = c.OBJECT_ID
WHERE c.name LIKE 'myNumber'
ORDER BY schema_name, table_name;
does not give any entries.
BUT: By going to SQL Management Studio using the above "myAccount" SQL account and doing the same ALTER TABLE the column is created just fine.?
Any hints? I am completely lost here.
Thanx in advance for input.
- RESOLVED - The profiler received a packet, but it was never committed.
Best regards Morten Snederk
+3
source to share