ConfigurationSana Commerce SQL Jobs

Sana Commerce SQL Jobs

Sana Commerce 8.1
Your provider

Configure Sana Commerce SQL Jobs

To keep the Sana Commerce clean and fast, a SQL job should be created which will clean up unused baskets older than one day from the Sana Commerce SQL database. 
 
The SQL Server 2005 Express does not contain a SQL Server Agent service, so that job scheduling is not possible. There is a solution to realize scheduling without using free or commercial 3rd party products. This solution is only based on the Express version of the SQL Server and uses the SQL Server Service Broker. Please read this article for more information.

Step 1: Open the SQL Management Studio and connect to the SQL server instance to use and expand the 'SQL Server Agent'.

Step 2: Click right on the jobs folder and select a 'New job'. The 'New job' window appears:

 
Creating a New SQL Job 

Step 3: Enter an appropriate name for the SQL job on the general tab and choose an owner who has the rights to access the Sana Commerce SQL database.

Step 4: Open the 'Steps' tab and click the 'New' button at the bottom of the window to create a new step.

Step 5: Enter 'Cleanup baskets' as name for the step and keep the type as 'Transact-SQL script'. Then select the Sana Commerce SQL database in the database dropdown and enter 'EXEC dbo.CleanupBaskets' as command.

Step 6: Click 'OK' to save the job step:

 
Creating a Job Step 

Step 7: Open the 'Schedules' tab and click the 'New' button at the bottom of the window.

Step 8: Enter 'Clean up baskets' as name, select 'Recurring' as schedule type and specify the frequency of performing the job: 

 
Setting Job Schedule 

Step 9: Click 'OK' to save the job schedule.

Step 10: Click 'OK' in the 'Job' properties window to save the entire job.

ConfigurationSana Commerce SQL Jobs