Open SSMS(SQL Server Management Studio)
Check DB Log job exists and create new one if not exists.
Job Name is: “NVLT - 05:00 AM - Remove DB Log”
Job naming rule: NVLT – [scheduled run time] – [job description]
Steps to create “Remove DB Log” job
Select “New Job…” from SQL Server Agent >> Jobs popup menu
In General Tab
Name: NVLT - 10:00 AM - Remove DB Log
In main database, this job usually run at 05:00 AM.
However, show laptops are not running on night time. So, job need to be scheduled to run at day time.
Owner: sa
In Steps tab, Click “New…” and set:
Step name: remove log
Type: Transact-SQL script(T-SQL)
Database: N41 database name
DB name is different in each company. It could be [company name], [NVLT], [N41]
Copy below script in Command window after changing [DB Name] in two locations with real N41 database name
-- Truncate the log by changing the database recovery model to SIMPLE.
ALTER DATABASE [DB Name]
SET RECOVERY SIMPLE;
GO
-- Shrink the truncated log file to 1 MB.
DBCC SHRINKFILE( NVLT2_Log, 1);
GO
-- Reset the database recovery model.
ALTER DATABASE [DB Name]
SET RECOVERY FULL;
GO
In Schedules tab, click “New...”, and set:
Name: DAILY 10:00 AM (Frequency and time)
Schedule type: Recurring
Set “Enabled” checked
Frequency, Occurs: Daily
Recurs every: 1 day
Daily frequency, occurs once at: “10:00:00 AM”