How to implement an account that has not been logged in for three months, automatically deletes it from the database.

xiaoxiao2021-03-06  57

- Working method:

Enterprise Manager - Administration - SQL Server Agent - Right-click Job - Enter Job Name in "General" - "Step" - New - New - "Step Name" Enter the step name - "Type" Select "Transact-SQL Script (TSQL)" - "Database" Select the Database of the Execute Command - "Command" Enter the statement you want to perform: Delete from table Where login date

Then start the SQL Agent service and set to automatically start, otherwise your job will not be executed.

Setting method: My Computer - Control Panel - Administrative Tools - Services - Right-Right-Right-Right-Right-Right-Start Type-Select Auto Start-OK.

转载请注明原文地址:https://www.9cbs.com/read-90171.html

New Post(0)