none
Can scripts be run with database is in use? RRS feed

  • Question

  • Can this script be run while the database is in use?  Any down side?

    Jeff

    USE [SecretDatabase]
    GO
    
    UPDATE client
    SET ns1_sign = 0, ns2_sign = 0
    
    
    ALTER TABLE [dbo].[client] ADD  CONSTRAINT [DF_Client_NS1_sign]  DEFAULT ((0)) FOR [ns1_sign] 
    GO
    ALTER TABLE  [client] ALTER COLUMN [ns1_sign] BIT NOT NULL
    GO
    
    ALTER TABLE [dbo].[client] ADD  CONSTRAINT [DF_Client_NS2_sign]  DEFAULT ((0)) FOR [ns2_sign] 
    GO
    ALTER TABLE  [client] ALTER COLUMN [ns2_sign] BIT NOT NULL
    GO
    


    ISV using VB.net and SQL Server

    Friday, November 6, 2020 10:21 PM

Answers

All replies