<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=134816313595691&amp;ev=PageView&amp;noscript=1">

RemoteRelief BLOG

Let's talk business technology...

All Posts
Reading Time: 2 minutes
 
Published on 3/30/20 9:44 AM

SQL Server Database Maintenance using SQL Script.

Introduction

Database maintenance is a critical function of a Database Administrator’s role. For example, retail environments require databases to be up and running 24/7. Many Companies require their corporate database teams to maintain these store level databases on daily basis, regardless if you have a DBA on your store systems team or not.

One hurdle to overcome is the need to figure out the maintenance job’s execution on your Point of Sale devices when they are dependent on the SQL Server’s database (after installing the SQL Server’s Express Edition only.)

Your DBA will need to setup a command line process using either Window’s Scheduler Tasks, or another third party tool to run the jobs remotely.

Window’s Scheduler Tasks option is free but can be difficult to maintain when managing hundreds of devices, whereas some third party tools can cost a lot.  

Being a RemoteRelief Inc. customer, you’re covered. We have created a process to run the maintenance sessions on your SQL Server databases.

What do you need?

RemoteRelief will provide you with tools on your RemoteLink server to setup a session that will execute a few customized scripts on your Point of Sale (Windows PC) system. Some companies may already have a list of maintenance tasks that they want performed on their POS devices. If you do not have a set list here is what we recommended:

Backup - All Databases Full Backup (daily)

Check database integrity (daily)

Reorganize index (daily)

Update statistics (Weekly)

Rebuild index (weekly)

Maintenance cleanup (daily)

These PowerShell scripts will be running most of the SQL Server maintenance scripts against either one or all databases.  Whether it’s scheduled or ran on-demand, the RemoteLink session will be able to execute the maintenance process as needed.

Put simply, your enterprise will need a list of tasks and PowerShell scripts and RemoteLink sessions configured to execute the scripts on each POS device.

Process

Remote Relief will create and customize the PowerShell script to suit to your environment. (It’s always a good measure to  backup the databases on each device, rebuild indexes, database cleanup, or check database space usage.) Whether the scripts are scheduled or ran on-demand, the RemoteLink session will run the maintenance job for your enterprise on all devices.

To accomplish this, RemoteLink requires appropriate access to service accounts of your database instance on each POS.

I’s also good practice to ensure the scripts are fully tested before sending them to all devices via RemoteLink server. 

Need Help?

RemoteRelief has SQL, SQL Database, and RemoteLink subject matter experts (SME), who aid clients in setting up and automating these types of processes. If you would like more information, subscribe to our tech blogs. If you are interested in a demonstration or learning more about operational data movement, RemoteLink features, automation and reporting capabilities click here to speak with an SQL SME.

 

Enjoy this article? Don't forget to share.

 
Neeraj Mehta
Author: Neeraj Mehta
Senior Database Consultant at RemoteRelief: Enthusiastic technology team player with sound business acumen of retail and point of sale processes. Plan, develop, and implement IT solutions using SQL Server to deliver best experience for end-users.

Related Posts

Simplifying Operational Data Delivery

RemoteLink is an ideal replacement for operational data transfer solutions, including RemoteWare. RemoteL...
Bryan Afonso Reading Time: 2 minutes

Managing the Remote Workforce

Businesses across industries are moving from simply supporting remote work to becoming truly distributed....
Bryan Afonso Reading Time: 2 minutes

Key Benefits of Workspace ONE's Unified Endpoint Management System

Workspace One UEM delivers next generation level of device management. Whether your workforce is working ...
Bryan Afonso Reading Time: 2 minutes