Technical Article

Generate "CREATE...FOR ATTACH" stmt. dynamically

In instances where you have over 16 data files, or you need to move data files to a new location when you are moving a database you must use a CREATE...FOR ATTACH statement.  This script will generate the CREATE...FOR ATTACH statement dynamically given a database name.  It will take into consideration the file sizes, growths […]

You rated this post out of 5. Change rating

2003-05-07

220 reads

Blogs

The Community is YOU, Not Any Organization

By

As I type this, we’re leaving behind spring, and all the amazing events that...

Polyglot Persistence

By

I’ve seen the term polyglot persistence floating around Redgate a bit recently in the...

Six Months!

By

Oh good gosh. Six months without a single blog post. Most important information: I’m...

Read the latest Blogs

Forums

increase in database size

By vsamantha35

Hi All, We have a 2 TB disk to stored of the sql database...

indexes cleanup

By vsamantha35

Hi All, Recently we are having issues with disk space requirements. After monitoring db...

Dropping a Logon Trigger

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Dropping a Logon Trigger

Visit the forum

Question of the Day

Dropping a Logon Trigger

I created this trigger for testing on SQL Server 2022:

CREATE TRIGGER checksteve
ON ALL SERVER 
FOR LOGON  
AS  
BEGIN  
IF ORIGINAL_LOGIN()= N'ARISTOTLE\Steve'
 PRINT 'Steve logged in'
END;  
GO
Now I want to drop it. What do I run?

See possible answers