Upload
kumarreddypatil
View
217
Download
0
Embed Size (px)
Citation preview
8/10/2019 Store Remediation
http://slidepdf.com/reader/full/store-remediation 1/4
Project ID: 1000047610 Ver: 1.0
Release ID: QTIM-DBRB.doc/ 1.0 / 09.05.2013 C3: Protected
Loblaw Infra Support MS SQL Server Database
Administration
Store Remediation Steps
Prepared By / ID
Reviewed by
Approved By
Name
Rajendra K V/raprasa Terence Antony Manager Delivery
Role
Asst Operations Manager Manager
Delivery
Database Manager
Signature
RP TA
Date
09-05-2013 09-05-2013
8/10/2019 Store Remediation
http://slidepdf.com/reader/full/store-remediation 2/4
Project ID: 1000047610 Ver: 1.0
Release ID: QTIM-DBRB.doc/ 1.0 / 09.05.2013 C3: Protected
Store Remediation Scripts
Below is the list of items which needs to be checked and deployed before the SQL Store goes live. Theseare done to ensure that the SQL server is stabilized and runs smoothly once it’s live. Database team will
be providing the required scripts for stabilizing the environment.
1. Check the patching level on Store Server.
Latest patch must be applied on store servers, this patch is Microsoft recommended ones and is applied
to ensure that database server is functioning as expected.
IT IS Database team will be applying these patches coordinating with IT Release team. Store Build Team
needs NO action on this Item.
2. Verify location of Data and Log files
For any new database created, ensure that all the data and log files are created in respective mount
points in F drive. In past, Database team had noticed that these were pointed and created on drive E.
These are mainly found on SAP instances, an updated script has been shared with concerned team and
new databases will now point to right drive. Database team will however cross verify it before the server
goes live.
3. Maintenance Plans
All the Store servers should have maintenance jobs created on them in order to ensure that the Indexes
are optimized and updated on regular basis; this will make sure DML and DDL statements on SQL server
to perform better and have faster responses to application queries. Below is the list of maintenance
activities which needs to be done on each store server. These will be done by creating an SQL Agent Job
on SQL Server.
Index Rebuild
Index Re-Organize
Update Statistics
Database Integrity Check.
Store Build team will be creating these jobs as part of then build of any Store server, using the
attached scripts.
8/10/2019 Store Remediation
http://slidepdf.com/reader/full/store-remediation 3/4
Project ID: 1000047610 Ver: 1.0
Release ID: QTIM-DBRB.doc/ 1.0 / 09.05.2013 C3: Protected
a)
MX_Store_DailyIndexMaintenanceJob_DBA
This is index maintenance job which run daily and rebuild/reorg index based on fragmentation levels, if
fragmentation is beyond 30% then do rebuild else reorg. After rebuild activity it does update statistics.
For any queries about this job consult [email protected] team
b)
MX_Store_WeeklyCheckDBMaintenanceJob_DBA
This is Database integrity maintenance job which run weekly once and check database integrity. For any
queries about this job consult [email protected] team
Steps to follow to create these maintenance plans
i)
Login to Store server which is been just built.
ii)
Go to Start -> All Programs ->MS SQL Server 2008R2->SQL Server Management Studio
iii)
Provide the server name to login to e.g. VWPRXXXXXSQLPR01\A1B and click Connect
iv)
Once logged in Click on New Query on top left corner of the window.
v)
Simply open or Copy and Paste the script and click on execute.
vi)
The jobs now will be created successfully, this can be verified under
SQL Server Agent -> Jobs Column
NOTE: Same steps needs to be repeated on all instances. Since SAP has 3 instances, above query has to
be executed thrice, once on each instance.
If any errors or failures while creating Jobs, Please contact [email protected]
8/10/2019 Store Remediation
http://slidepdf.com/reader/full/store-remediation 4/4
Project ID: 1000047610 Ver: 1.0
Release ID: QTIM-DBRB.doc/ 1.0 / 09.05.2013 C3: Protected
4. Max Memory settings
SQL server max memory settings should be set to max memory of 2GB and min memory to 1MB, this isalready been done as part of Store Build process, Database has to cross check it again before Go-Live of
the Store Server. If this has been missed out by Store Build team, below script can be used to make this
setting.
sp_configure 'show advanced options', 1; RECONFIGURE
GO
sp_configure 'min server memory', 1;GOsp_configure 'max server memory', 2048;
GOsp_configure 'show advanced options', 0; RECONFIGURE;
5. Database Auto Growth Parameter
Database auto growth is set to expand only 1MB when full, which is not recommended, standard 10%
growth, must be made when the DB is full. This will make less overhead on SQL server, else server will
be busy most of times in expanding the database growth by 1MB each time when it is full, since 1MB is
very less expanding the database size will be on frequent basis on the server.
Store Build team will have to execute this script on newly built server to enable this option. Similarly SAP
team will have to use this same script and run it on SAP instances of server to make the autogrowth of
database to 10%. Use below attached script to enable this option on all databases at once.
NOTE: Follow the same steps mentioned in Step 3 to execute the above SQL script.
If any errors or failures while executing above script, Please contact [email protected]
Conclusion:
Implementing above mentioned steps will ensure that Store servers are stabilized and all prerequisites
are completed before the store is live.