N41​​ Database​​ for​​ show​​ laptop:​​ create​​ a​​ DB​​ job​​ to​​ truncate​​ transaction​​ log​​ file​​

N41​​ Database​​ for​​ show​​ laptop:​​ create​​ a​​ DB​​ job​​ to​​ truncate​​ transaction​​ log​​ file​​

  • 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”

 

    • Related Articles

    • Database​​ Replication​​ for​​ Tradeshow

      1. Install SQL Server 2012 or 2014 Create data folders (Data, Log, Backup) in appropriate disk in MSSQL root folder Installation > new SQL Server stand-alone installation ... SQL Server Feature installation Select only two options: SQL Server ...
    • Sync​​ Tradeshow​​ Server​​ Laptop

      How to connect the VPN at the Laptop Server * If you have different VPN other than SonicWALL, please consult with your IT . * If you do not have VPN, you can ignore VPN section. 1) Open Sonic WALL Global VPN Client by double-clicking 2) Check the ...
    • How restore Database connection

      When your network connection gets interrupted, N41 loses connection to the database. You can restore database connection by going to File, Restore Connection to DB The short cut key is Ctrl + R
    • How to create a “New Style”

      How to create a “New Style”. 1 1 Create a New Style. 1 2 How to add colors. 2 3 How to apply to other color. 2 4 How to duplicate a style. 3 Appendix. Column Lists on Style Master. 4 1 Create a New Style Creating this crucial list is the backbone of ...
    • EDI​​ File​​ Type

      810 - Invoice The EDI 810 Invoice transaction set is the electronic version of the paper-based invoice document. It is typically sent in response to an EDI 850 Purchase Order as a request for payment once the goods have shipped or services are ...