Vous êtes sur la page 1sur 76

SQL Server health check

Scope:  This activity is to be done on Daily basis to check all the SQL server, database,
CPU utilization, Memory etc.
Roles:  IT support team

Prerequisites:  Appropriate permission required to access the server


Inputs:  This is Daily activity
Controls:  NA
Outputs: - Take appropriate action if/any issue on the server or contact appropriate team.
- Send the status to Oleg and DBA team with the details about the issue with
action taken and current status.

Steps: -
 Login on all the production server one by one.
 Right click task bar -> Task Manager
 Check memory utilization, CPU utilization etc.
 Open SQL server Management studio.
 Login with credential
 Explore the database and see all database in online and running.

Daily SQL Job Monitoring

Scope:  This activity is to be done on daily basis to check all the SQL jobs completed
successfully.

Roles:  IT support team

Prerequisites:  Appropriate permission is required on the server.


 Server should be up and running
 SQL agent is enabled

1
Inputs:  This is daily activity
Controls:  NA
Outputs:  Fixed the failed job which is under control on DBA (like Backup,
Optimization etc.) and send to Oleg all the status
 Contact with service owner and Oleg with the details of failed job.
 Send the all server’s job to Oleg on daily basis of all production server.

Steps:

 In Object Explorer -> Expand Server Name


 Expand SQL Server Agent -> Jobs ->Open Job Activity Monitor

1. The dialogue box shows the status of all the jobs, whether they are ran
successfully or not on the time scheduled.

2
2. If any job has failed, then right click-> View History
3. The detailed reason of job failure and step number of failure is mentioned.
4. The job can be re-executed or it can be reported to the person concerned.

SQL Error Log check

Scope:  This activity is done on daily basis to check the error log

Roles:  IT support team

Prerequisites:  Appropriate permission is required to check.


 Server should be up and running
Inputs:  This activity is done on daily basis.
Controls:  NA
Outputs: Send the email to Oleg if/any error found with the action taken.

Steps: -

3
1. In Object Explorer -> expand a server
-> expand Management -> expand SQL
Server Logs.

2. Right-click a log and click View SQL


Server Log.

4
Database status check

Scope:  To check all database are online and running.

Roles:  IT support team

Prerequisites:  Server should be up


Inputs:  Appropriate permission is required to check.
 Server should be up and running
Controls:  NA
Outputs: Resolve the issue or/and notify to Oleg with status if there was any issue.

Steps

1. Execute the query to identify the current state of all the Database in your Instance.

Use master
GO

SELECT
@@SERVERNAME AS [Server Name]
,NAME AS [Database Name]
,DATABASEPROPERTYEX(NAME, 'Recovery') AS [Recovery Model]
,DATABASEPROPERTYEX(NAME, 'Status') AS [Database Status]
FROM dbo.sysdatabases
ORDER BY NAME ASC
GO

2. This Query will show status of all the databases in the server

5
Disk space check

Scope:  To check the disk space on all production server.

Roles:  IT support team

Prerequisites:  Appropriate credential is required


 Server should be accessible.
Inputs:  This activity is done on daily basis.
Controls:  NA
Outputs: Communication emails sent to the requester/Oleg in case if there is any disc full or
send email to Appropriate team if addition disc space is required.

Steps:

1. Login to the production database server one by one.


2. Check the disc space one by one. Or we can check with below
query as well.
3. EXEC MASTER..xp_fixeddrives

Daily Backup of all production server (Automated)

Scope:  Backup of all production sever to be automatic on daily basis.

6
Roles:  Requestor
 IT support team
Prerequisites:  Appropriate credential is required
 Server should be accessible.
Inputs:  All inputs are received by emails. With the details about server, databases
to include in Backup plan and types of backup,
 Request should be authored by Oleg.
Controls:  NA
Outputs: Communication emails sent to the requester with the details of Types of plan,
Scheduled time etc.

Steps: -

For all the servers, backup is automated to by creating backup maintenance plan.

• Steps to create full backup job

• In Object Explorer expand ->


Management tab
• Right Click on Maintenance Plan
• Click New Maintenance Plan
• Add Name to it
• Then you can add SubPlans to the
backup plan.
• Now on Subplan_1
• Use toolbox -> drag and drop-> Backup
database task

• • Double click the Backup database


task you added to set the properties
• Set Backup type.

7
• Select the Databases whose backup is to be taken. (viz select -> All Databases to take
backup of all the user and system databases) select as required
• Set Backup up to disk
• Select -> Create a backup file for every database
• Checkmark selected on -> Create a sub-directory for each database
• Folder -> Mention the location where database should be stored
• Mention backup file extension for every backup type (viz you can add .fbak for full
backup file)
• Click OK
• Backup plan is set. It needs to be scheduled.

8
9
Ad-hoc backup request

Scope:  Request through email raised for Backup of production database and restore it on
Prod/UAT/Test or Dev environment
 This SOP to be followed for email request for backup and restoration from Oleg
or development team
This SOP is not to be used when the request comes for the restoration of
database from Tape.

Roles:  Requestor
 IT support team
Prerequisites:  Authorized email request comes from development team and Oleg.
 Availability of free space on source and destination servers for the
successful completion.
Inputs:  All inputs are received by emails. With the details about server, databases,
source and destination. .
Controls:  NA
Outputs: Communication emails sent to the requester asking for confirmation of successfully
completion of Backup and restore.

 Steps
1. In Object Explorer -> Databases
2. Right click Database Name of whose backup is to be taken
3. Click Tasks -> Backup

10
4. Window like above will popup

5. Select database to be backed up


6. Select the backup type, as requested
7. Select COPY ONLY DATABASE (this is important, while taking backups manually)
8. Add the destination where the backup is to be stored.

9. Click OK.

11
Ad-hoc restore request

Scope:  Request through email raised for Backup of production database and restore it
on Prod/UAT/Test or Dev environment
 This SOP to be followed for email request for backup and restoration from Oleg
or development team
This SOP is not to be used when the request comes for the restoration of
database from Tape.

Roles:  Requestor
 IT support team
Prerequisites:  Authorized email request comes from development team and Oleg.
 Availability of free space on source and destination servers for the
successful completion.
Inputs:  All inputs are received by emails. With the details about server, databases,
source and destination. .
Controls:  NA
Outputs: Communication emails sent to the requester asking for confirmation of successfully
completion of Backup and restore.

Steps:
1. Right click Databases in object explorer.
2. Select Restore files and filegroups

3. In general tab -> Select the database to which restore is to be done.

12
4. In source for restore -> From device
5. Select the path where the full backup is stored.
6. Once the file to be restored is added.
7. Select checkbox in front of the filename
8. In Options tab -> In recovery state
9. Select the radio button for RESTORE WITH NONRECOVERY.
10. And click ok.
11. Continue similar steps for differential backup and transaction log backup file also.(except
the last file to be restored)
12. For the last log backup file select recovery mode as RESTORE WITH RECOVERY -> OK.

13
SQL Backup Plan

Scope:  Request through email raised for to create new backup plan.
 This SOP to be followed for email request for to create new backup plan when
database server is build
Roles:  Requestor
 IT support team
Prerequisites:  Authorized email request comes from Oleg.
 Server should be accessible and online
 User database is there to add the database in backup plan.

Inputs:  All inputs are received by emails. With the details of server, databases,
frequency and types of backup to create the backup plan. .
Controls:  NA
Outputs: Communication emails sent to the requester for confirmation of successfully
configuration of backup plan.

• Steps

1. In Object Explorer expand ->


Management tab
2. Right Click on Maintenance Plan
3. Click New Maintenance Plan
4. Add Name to it
5. Then you can add SubPlans to the
backup plan.
6. Now on Subplan_1
7. Use toolbox -> drag and drop-> Backup
database task

14
8. Double click the Backup database task
you added to set the properties
9. Set Backup type = Full
10. Select the Databases whose backup is
to be taken...(viz select -> All Databases
to take backup of all the user and
system databases) select as required
11. Set Backup up to disk
12. Select -> Create a backup file for every database
13. Checkmark selected on -> Create a sub-directory for each database
14. Folder -> Mention the location where database should be stored
15. Mention backup file extension for every backup type (viz you can add .fbak for full
backup file)
16. Click OK
17. Backup plan is set. It needs to be scheduled.

15
Scheduling the backup plan created

16
 Steps:
1. Near the Sub plan details -> Under Schedule tab ->it would be Not Scheduled (On
Demand) change it
2. Set Schedule type ->Recurring
3. Set Frequency -> Daily/Weekly/Monthly
4. Set Days accordingly and-> Frequency occurs as required
5. Select Start Date and End Date accordingly (it is date from when backup task
created should occur)
6. Click ->OK.

Optimization Plan

Scope:  Request through email raised for to create database Optimization plan.
 This SOP to be followed for email request for to create new database
optimization plan.
Roles:  Requestor
 IT support team
Prerequisites:  Authorized email request comes from Oleg.
 Server should be accessible and online

Inputs:  All inputs are received by emails. With the details of server, databases,
frequency and types of backup to create the backup plan. .
Controls:  NA
Outputs: Communication emails sent to the requester for confirmation of successfully
configuration of optimization plan.

Maintenance Clean-up task


1. The maintenance cleanup task is dragged and dropped from toolbox
2. The arrow from cleanup task or vice versa depending which task is to be executed first.

17
3. Double click maintenance cleanup task to set properties

18
4. Set delete files of following type to -> Backup files
5. File location -> Search folder and delete files based on an extension (as in fig)
6. Select folder name where backup files are stored
7. And set extension (fbak/dbak/trn) depending on which file type to be deleted
automatically.
8. File age -> select as necessary
9. Click OK.

19
REBUILDING INDEXES

 Drop and recreate the index.


 The index are fragmented over a period of time due to modifications performed on the
database.
 This removes fragmentation, reclaims disk space by compacting the pages; based on the
existing fill factor setting, and reorders the index rows in contiguous pages.
 Steps to rebuild indexes:
1. In object explorer -> expand database whose table’s index are to be rebuilt.
2. Expand the table-> expand indexes folder
3. Right-click the index of which you want to check the fragmentation and select
Properties.
4. Right click index ->rebuild index and OK

Roles and Permission (Provide role and appropriate permission as per request)

Scope:  Request through email raised for to Provide permission


 This SOP to be followed for email request to provide appropriate permission on
database or database objects
Roles:  Requestor
 IT support team
Prerequisites:  Authorized email request comes from Oleg.
 Server should be accessible and online
Inputs:  All inputs are received by emails. With the details of server, databases,
frequency and types of backup to create the backup plan. .
Controls:  NA
Outputs: Communication emails sent to the requester for confirmation of successfully
configuration of optimization plan.

Steps:

20
1. Object Explorer-> Expand Security-> Expand Logins. Right-click on the login to open the
Properties dialog.

2. Click the Securables tab on the left of the screen to open the securables configuration.

3. Click the Search button. The dialog allows you to browse all objects, only objects of a specific
type, or only objects belonging to a specific schema. You could locate the table using any of
these techniques. Select “All Objects of the Types…” and click OK.

4. This dialog allows you to select the type of object you want to secure. Note that this list will
be different depending on the scope of the principal. Select the Table checkbox and click OK.
This will populate the securables list with tables.

21
5. Locate the Person.Person table in the list and select it. This will activate the bottom pane with
permissions for that table. Click the box to grant SELECT permission.

6. Click OK to close the dialog. The permission is now set.

Create new login.

Scope:  Request through email raised for to create new user


 This SOP to be followed for email request to create new login.
Roles:  Requestor
 IT support team
Prerequisites:  Request should be authorized.
 Server should be accessible and online.
 User should be available in NA account.

Inputs:  All inputs are received by emails. With the details of server and User
Controls:  NA
Outputs: Communication emails sent to the requester for create the user login

Steps:
1. In object explorer -> Under Server name -> Expand Security tab -> Right click login folder ->
Select new login

2. The dialog box as shown appears

22
3. In General tab -> add user name -> select SQL Server authentication -> add password to the
new login.
4. In User mapping tab -> select database name of which permissions are to be granted.
5. Add required permissions for each database
6. Click OK.

23
Backup Plan and Restore

Scope:  Request through email raised for Backup of production database and restore it on
Prod/UAT/Test or Dev environment
 This SOP to be followed for email request for backup and restoration from Oleg
or development team
This SOP is not to be used when the request comes for the restoration of
database from Tape.
Roles:  Requestor
 IT support team
Prerequisites:  Authorized email request comes from development team and Oleg.
 Availability of free space on source and destination servers for the
successful completion.
Inputs:  All inputs are received by emails. With the details about server, databases,
source and destination. .
Controls:  NA
Outputs: Communication emails sent to the requester asking for confirmation of successfully
completion of Backup and restore.

Steps (for Backup):


1. In Object Explorer -> Databases
2. Right click Database Name of whose backup is to be taken
3. Click Tasks -> Backup
4. Window like below will popup.

5. Select database to be backed up


6. Select the backup type, as requested
7. Select COPY ONLY DATABASE (this is important, while taking backups manually)
8. Add the destination where the backup is to be stored.

9. Click OK.

24
Steps (for Restore):

1. Right click Databases in object explorer.


2. Select Restore files and filegroups
3. In general tab -> Select the database to which restore is to be done.
4. In source for restore -> From device
5. Select the path where the full backup is stored.
6. Once the file to be restored is added.
7. Select checkbox in front of the filename
8. In Options tab -> In recovery state
9. Select the radio button for RESTORE WITH NONRECOVERY.
10. And click ok.

25
11. Continue similar steps for differential backup and transaction log backup file also.
(except the last file to be restored)
12. For the last log backup file select recovery mode as RESTORE WITH RECOVERY -> OK.

26
SQL Server installation, Configuration

Scope:  Request through email raised for new SQL server installation on new server
 This SOP to be followed for email request for the new SQL server installation.

Roles:  Requestor
 IT support team
Prerequisites:  Request should be approved by Oleg.
 Server should be compatible OS, Hardware with enough resource for the
installation of SQL server.
Inputs:  All inputs are received by emails with the details about server, Installation
SQL version. etc.
Controls:  NA
Outputs:  Communication emails sent to the requester asking for confirmation of
successfully completed the new SQL server Installation and configuration.

Steps: -
To install SQL Server, follow the steps below
1: Download Microsoft SQL Server 2008 Management Studio Express and select either
SQLManagementStudio_x64_ENU.exe or SQLManagementStudio_x86_ENU.exe depending on
your machine’s OS bit-ness.
2: Make sure you’re logged in as an administrator of the machine then right-click on the exe you
downloaded and select “Run as Administrator”.

27
3: You should now see the “SQL Server Installation Center” window.

28
4: Select the “Installation” tab. Select “New SQL Server stand-alone installation or add features
to an existing installation”.

29
5: It will then run a rule check. Make sure there are no failures and then click OK.

6: In Setup Support files Click “Install”.

7: Another rule check. Click Next.

30
8: Next you get the Product Key window.

9: Accept the License Terms and click next.

31
10: Feature Selection. Check off “Management Tools – Basic” and then click Next.

11:Verify Instance details. Click Next.

32
12: Verify your disk space requirements and click Next.

33
13: You can select mode as Windows Authentication or SQL Server Authentication mode. Can
also select mixed mode. Create password for SQL Server mode.

34
12: Help Microsoft improve SQL Server features and services by selecting to send usage and
error reports to them (or not). Click Next.

35
13: Another quick rule check runs. Click Next.

36
14: Click the Install button.

15: Once the installation completes, click the Next button again.

37
16: Complete! Click the Close button and you should be all set.

38
39
17: Fire up SQL Server Management Studio! You should now see it in your Programs under
Microsoft SQL Server 2008. Make sure you run it as an administrator for access to all the
features.

40
41
SQL Server Upgradation

Scope:  Request through email raised for Upgrade the SQL server from lower version to
higher version
 This SOP to be followed for email request for the Upgrade the existing SQL server.
Roles:  Requestor
 IT support team
Prerequisites:  Request should be authorized by Oleg.
 Server should be compatible OS and with enough resource for the
installation of SQL server.
 Exiting SQL Server version should be compatible with higher version to
upgrade.
Inputs:  All inputs are received by emails about the server details and the details
about the SQL version.
Controls:  NA
Outputs: Communication emails sent to the requester asking for confirmation of successfully
completed the upgrade the existing SQL version to New version.

Steps: -

To change the edition of SQL Server to the higher edition Upgradation is done.
1: Launch the SQL Server Installation Center

42
2: Click on Maintenance tab. Launch the “Edition Upgrade” Wizard.

3. After the Wizard launches, on the “Product Key” dialog, enter the new product key.

43
4. Now accept the License Terms for the new edition.

5. Now select the instance that you want to upgrade the edition.

44
6. Continue on the “Edition Upgrade Rules” dialog, if all run pass.
If there is a failure, investigate the reason for failure.

7. Click next on the “Read to upgrade edition” dialog to start the process.

45
7. After a short time (a few seconds to a couple of minutes), the edition upgrade process
completes.

46
SQL Server migration.

Scope:  Request through email raised for migration of SQL server from lower version
server to higher version of SQL server or migrate to similar version.
 This SOP to be followed for email request for the Migrate the existing database to
different SQL server box.
Roles:  Requestor
 IT support team
Prerequisites:  Request should be authorized by Oleg.
 Destination SQL server should be compatible to migrate of existing
database
Inputs:  All inputs are received by emails about the server details and the details
about the SQL version.

47
Controls:  NA
Outputs: Communication emails sent to the requester asking for confirmation of successfully
completed of database migration the existing SQL version to New version.

Data Base Migration.

Scope:  Request through email raised for migration of SQL server from lower version
server to higher version of SQL server or migrate to similar version.
 This SOP to be followed for email request for the Migrate the existing database to
different SQL server box.
Roles:  Requestor
 IT support team
Prerequisites:  Request should be authorized by Oleg.
 Destination SQL server should be compatible to migrate of existing
database
Inputs:  All inputs are received by emails about the server details and the details
about the SQL version.
Controls:  NA
Outputs:
Communication emails sent to the requester asking for confirmation of successfully
completed of database migration the existing SQL version to New version.

Steps: -

The databases are to be moved from one server instance to another.


There are 2 possible methods to migrate databases.
METHOD 1: Take backup on first instance and restore on second instance.
Steps are as follows:
10. In Object Explorer -> Databases
11. Right click Database Name of whose backup is to be taken

48
12. Click Tasks -> Backup
13. Window like above will popup
14. Select all the databases to be backed up
15. Select the backup type, as full.
16. Select COPY ONLY DATABASE (this is important, while taking backups manually)
17. Add the destination where the backup is to be stored.
18. Click OK.
19. Now to restore on other instance move that backup file to local drive on that
computer.
20. Open ssms.
21. Right click Databases in object explorer.
22. Select Restore files and filegroups

23. In general tab -> Select the database to which restore is to be done.

24. In source for restore -> From device


25. Select the path where the full backup is stored.
26. Once the file to be restored is added.
49
27. Select checkbox in front of the filename
28. In Options tab -> In recovery state
29. Select the radio button for RESTORE WITH NONRECOVERY.
30. And click ok.
31. Continue similar steps for differential backup and transaction log backup file also.
(except the last file to be restored)
32. For the last log backup file select recovery mode as RESTORE WITH RECOVERY ->
OK.

50
METHOD 2: Using .mdf and .ldf files

1. Detach the database on the source server.


a. In SQL Server Management Studio -> Object Explorer -> Expand Databases ->
select the name of the user database you want to detach. You cannot detach a
database with active connections.
b. Right-click the database name -> point to Tasks -> Detach.
2. Now copy the .mdf and .ldf files that are associated with the database from the source
server to the destination server in new location.
3. Attach the database.
a. In SQL Server Management Studio -> Object Explorer, connect to an instance of
the SQL Server Database Engine -> expand that instance.
b. Right-click Databases and click Attach.
c. In the Attach Databases dialog box -> click Add-> in Locate Database Files dialog
box -> select the disk drive where the database resides -> select the .mdf file of
the database

Website deployment

Scope:  Service requests and tickets raised for the deployment of website (Prod/Support
or UAT).
 This SOP is applicable for tickets where IT support team has:
o Deployed the code on web server
OR
o Asked the user for additional information
This SOP is not applicable to ad-hoc request or quick fix.

Roles:  Requestor
 IT support team

51
Prerequisites:  IT team or requester assigned the Ticket to support engineer
 Ticket has been assigned to the support engineer
 Ticket has been analyzed / worked upon and can ask for additional
information is awaited from the requester in case any thing is missing.
 Ticket has been updated and actions taken
Inputs:  Service Desk ticket raised and assigned to DBA Team
Controls:  Tickets SLAs
Outputs:  Updates in the ticket
 Communication emails sent to the user using the comments section of the
service desk asking for confirmation of resolution / requesting additional
information (communication should be done through service now ticket
updates and is the preferred method. We also communicated with user
through email
 Once email requesting update has been sent to the user via comments
section in service now ticket, save the ticket update

Steps: -
 Login to webserver (Prod/UAT/Support)
 On we server open IIS server.
 Go to website
 Go to virtual directory for UAT/Prod/Support
 Go to properties of virtual directory.
 Go to home directory.
 Copy the path.
 Go to run and paste the path
 Open the location.
 Copy all files.
 Backup the website : - Paste it to c:\Website\Folder with website name and current time
stamp(E.g. DTSUS_July10_2016)
 Not stop the website (UAT/Prod/Support)
 Go to the location where deployment web code is copied by the developer.
 Copy all web files and paste it to web server on website location
 Start the website.

SSRS deployment.

52
Scope:  Service requests and tickets raised for the deployment of SSRS reports on SSRS
server. (Prod/Support or UAT).
 This SOP is applicable for tickets where IT support team has:
o Deployed the SSRS on SSRS server
OR
o Asked the user for additional information
This SOP is not applicable to ad-hoc request or quick fix.

Roles:  Requestor
 IT support team
Prerequisites:  IT team or requester assigned the Ticket to support engineer
 Ticket has been assigned to the support engineer
 Ticket has been analyzed / worked upon and can ask for additional
information is awaited from the requester in case any thing is missing.
 Ticket has been updated and actions taken
Inputs:  Service Desk ticket raised and assigned to DBA Team
Controls:  Tickets SLAs
Outputs:  Updates in the ticket
 Communication emails sent to the user using the comments section of the
service desk asking for confirmation of resolution / requesting additional
information (communication should be done through service now ticket
updates and is the preferred method. We also communicated with user
through email
 Once email requesting update has been sent to the user via comments
section in service now ticket, save the ticket update

Steps: -
 Open the SSRS URL in any of the browser
 Go to the report folder (e.g. DTS Reports)
 Download the reports one by one in case report is already exist
 GO to the reports one by one which ever we have to deployed (On in case
report is already exist, This step is not applicable if reports are new)

53
SSIS deployment.
Scope:  Service requests and tickets raised for the deployment of SSIS on Database server
and schedule it on SQL server job.
 This SOP is applicable for tickets where IT support team has:
o Deployed the SSRS on SSRS server
OR
o Asked the user for additional information
This SOP is not applicable to ad-hoc request or quick fix.

Roles:  Requestor
 IT support team
Prerequisites:  IT team or requester assigned the Ticket to support engineer
 Ticket has been assigned to the support engineer
 Ticket has been analyzed / worked upon and can ask for additional
information is awaited from the requester in case any thing is missing.
 Ticket has been updated and actions taken
Inputs:  Service Desk ticket raised and assigned to DBA Team
Controls:  Tickets SLAs
Outputs:  Updates in the ticket
 Communication emails sent to the user using the comments section of the
service desk asking for confirmation of resolution / requesting additional
information (communication should be done through service now ticket
updates and is the preferred method. We also communicated with user
through email
 Once email requesting update has been sent to the user via comments
section in service now ticket, save the ticket update

SQL Script deployment.

54
Scope:  Service requests and tickets raised for the deployment of SQL script on Database
server.
 This SOP is applicable for tickets where IT support team has:
o Deployed the SSRS on SSRS server
OR
o Asked the user for additional information
This SOP is not applicable to ad-hoc request or quick fix.

Roles:  Requestor
 IT support team
Prerequisites:  IT team or requester assigned the Ticket to support engineer
 Ticket has been assigned to the support engineer
 Ticket has been analyzed / worked upon and can ask for additional
information is awaited from the requester in case any thing is missing.
 Ticket has been updated and actions taken
Inputs:  Service Desk ticket raised and assigned to DBA Team
Controls:  Tickets SLAs
Outputs:  Updates in the ticket
 Communication emails sent to the user using the comments section of the
service desk asking for confirmation of resolution / requesting additional
information (communication should be done through service now ticket
updates and is the preferred method. We also communicated with user
through email
 Once email requesting update has been sent to the user via comments
section in service now ticket, save the ticket update

Steps: -
 Login to SQL server box with valid credential.
 Open SQL server Management studio.
 Explore the Database.
 Select database where we want to deploy the code.
 Open Query window.
 Open the script from location where team has put the script for delayed.
 Copy the script one by one and paste it to query editor and execute it.

55
Crystal report deployment

Scope:  Service requests and tickets raised for the deployment of Crystal reports on
Database server.
 This SOP is applicable for tickets where IT support team has:
o Deployed the SSRS on SSRS server
OR
o Asked the user for additional information
This SOP is not applicable to ad-hoc request or quick fix.

Roles:  Requestor
 IT support team
Prerequisites:  IT team or requester assigned the Ticket to support engineer
 Ticket has been assigned to the support engineer
 Ticket has been analyzed / worked upon and can ask for additional
information is awaited from the requester in case any thing is missing.
 Ticket has been updated and actions taken
Inputs:  Service Desk ticket raised and assigned to DBA Team
Controls:  Tickets SLAs
Outputs:  Updates in the ticket
 Communication emails sent to the user using the comments section of the
service desk asking for confirmation of resolution / requesting additional
information (communication should be done through service now ticket
updates and is the preferred method. We also communicated with user
through email
 Once email requesting update has been sent to the user via comments
section in service now ticket, save the ticket update

Steps: -
 Open SSRS URL in any browser.
 Login with valid credential
 Got to the reports.
 Go to appropriate reports folder where we want to upload the reports.
 Click browse
 Choose the reports from location.

56
 Click OK.
 Add .rpt n extension.
 Save it.

NPS Report Spreadsheet encryption and FTP upload.

Scope:  Encrypt and upload NPS report to FTP on 1 st


working date of every month.
Roles:  IT support team

Prerequisites:  Database server should be accessible to create the reports.


 Valid ftp credential is required.
Inputs:  This is scheduled activity done on 1st date of every month
Controls:  NA
Outputs: Communication emails sent to the requester with the details of file.

 Open SQL server management studio.


 Execute stored procedure to get the data.
 Copy the data and paste it on predefined excel template.
 Save and rename it.(e.g NPSSurveyCanadaMay2016.xlsx)
 Now encrypt the file using encryption tool installed on the server.
 Open FTP location with ftp credential.
 Copy the file on ftp and logout from ftp server.
 Email send to user saying that encrypted file is uploaded on the server.

Yardi oLogin page creation

Scope:  To create oLogin page for yardi on Prod / Test server.


Roles:  Requestor
 IT support team

57
Prerequisites:  OLgin URL should be accessible.
 Appropriate permission on the Yardi database server.
 Appropriate credential is required on Database server
 Server should be accessible.
Inputs:  All inputs are received by emails with the attachment of excel file which
included all the details to be done.
Controls:  NA
Outputs: Communication emails sent to the requester with the details.

1. Open the xls file from mail.


2. Enter the password.(Please remember the Password)
3. You can see file like below.

4. Yellow colored row to REMOVE Drop the database (In this case we have to drop
database TCMNusa_20150130)
5. Green colored row to ADD: - Get the backup and restore it on given server. In this case
we have to get the backup of (xls column name: - NEW TEST Database FROM .bak of)
i.e. cmnydb01\CMNusa_live (Server cmnydb01 and database CMNusa_live) and restore
this backup on Server CMNYDB0 1(xls column name : - SERVER) and name of new
database will be TCMNusa_20150402 (xls column name : NEW SQL SERVER DB Name)
6. After restore the database open the query window after click on new query.
7. USE <NEW DATABASE NAME> in this case type use TCMNusa_20150402 and execute.
58
8. On New database execute below stored procedure
9. YardiSecurity 'Server Name',<UserName>',<'Password> (i.e.in xls column name is Yardi
DBO Name for YardiSecurity for UserName and Yardi DBO Password for YardiSecurity
for Password)
Use CMYDB01 if restored database on Production or USE CMNYDEVDB01 if restored
database name is development.
E.g. Production Examples.
YardiSecurity 'CMNYDB01', colliersusaUsername', colliersusaUserPassword

2-Apr-15 cmnydb01\CMNusa_live CMNYDB01

Development examples
YardiSecurity ‘CMNYDEVDB01’, colliersusaTestUsername', colliersusaUsaTestPassword

2-Apr-15 cmnydb01\cmninput_live CMNYDEVDB01 TS_CMNinput_20150402

10. Use below link


11. http://cmnyweb03/voyager60/pages/logingen60.asp Change the server name as per
requirement to create the oLogin page. This will always mentioned on xls file.

Yardi database FTP upload

Scope:  Yardi Database to be upload on the Yardi database server.


Roles:  Requestor
 IT support team
Prerequisites:  Authorize email comes from Daryl or Oleg. .
 Appropriate permission on the Yardi database server.
 Appropriate credential is required on Database server
 Server should be accessible.
Inputs:  All inputs are received by emails with the details of database and server
and FTP credential.
Controls:  NA

59
Outputs: Communication emails sent to the requester with the details.

 Login to the database server.


 Get full Backup of requested database
 Wnizip the database and split the backup files using winrar.
 Upload the backup files on ftp.
 After successful completion of all database email to requester.

Performance tuning
Improve SQL Server application performance by optimizing the queries used.

Stored procedure tuning


Using stored procedure instead of a script or embedded Transact-SQL reduces network traffic
and latency, boosts application performance; also stored procedures can be reused.
SQL script tuning
Improving the SQL script to reduce the time and memory needed in execution.
Server tuning
While installing SQL Server add only the needed features. And to optimize Server later,
configure Server properties.

CATE and Re-Port user creation and permission.

Scope:  To create new user for CATE and Re-Port Port User and grant permission
Roles:  Requestor
 IT support team
Prerequisites:  Appropriate permission on the Re-Port and CATE server.
 Server should be accessible.
Inputs:  All inputs are received by emails. With the details of User,
Controls:  NA

60
Outputs: Communication emails sent to the requester for confirmation of successfully Added
user to CATE and re-port system

Steps:

1. Open Internet Explorer or any browser


2. Enter www.collierscs.com like below image and then Click on RE-Port

3. Login with Administrator account.(Image below)

61
4. After Login we can see below screen

5. Click on Administrator Link :-

62
6. Click Add button : - (Image Below)

7. Enter First Name, Last Name and User name


8. Click Add (Scree below)

63
9. Click Update (Scree below)

64
10. Click GROUPS (Image below)

11. Choose Administrator or any other and then click User Group (Image below)

65
12. Choose Username and then Click ADD (Image below)

13. Open Lotus notes with the use of Login details. Click Once RE-Port data conversion on
cmncas01 and then Action -> Run on the server
14. It will take to few minutes to complete till then wait.after compltes close the Lotus
notes.

SMTP mail configuration

66
Scope:  To configure Database SMTP email on the database Server.
Roles:  Requestor
 IT support team
Prerequisites:  Request should be authorized/approved
 Appropriate permission on the database server.
 Server should be accessible.
Inputs:  All inputs are received by emails. With the details of Server,
Controls:  NA
Outputs: Communication emails sent to the requester for confirmation of successfully
configuration of d SMTP Database email

Steps:

Right-Click on Database Mail and choose Configure Database Mail.

1. This starts the Database Mail Configuration Wizard. Click Next.

2. In the Select Configuration Task screen, choose “Set up Database Mail by performing the
following tasks:” and click “Next”.

67
3. Now, you will be required to enter a Profile Name. This can be any Arbitrary Name that will help
you identify the Profile. You might also want to add a Description. Now, click on Add.

68
4. Now, you are prompted to create a New Database Mail Account. Enter any Account
Name and Description. The other parameters are as follows:

o For configuring Windows Live Mail:

Email address: Your Live e-mail ID


Display name: Your name
Reply e-mail: Any reply-to email account
Server name: smtp.live.com
Port number: 25
this server requires a secure connection (SSL): Checked ON

In the next section, choose Basic Authentication and enter the following information:
User name: Your Live e-mail ID
Password: Password for your Live e-mail ID
Confirm password: Password for your Live e-mail ID

The configuration should look like the screenshot below. Now, click OK.

69
o For configuring Google Mail (Gmail):

Email address: Your Gmail ID


Display name: Your name
Reply e-mail: Any reply-to email account
Server name: smtp.gmail.com
Port number: 587
this server requires a secure connection (SSL): Checked ON

In the next section, choose Basic Authentication and enter the following information:
User name: Your Gmail ID
Password: Password for your Gmail ID
Confirm password: Password for your Gmail ID

The configuration should look like the screenshot below. Now, click OK.

70
5. Back on the New Profile screen, click next. The next Manage Profile Security screen allows you
to set the Public Profiles, the Private Profiles and the Default Profiles for each of
the Public and Private Profiles.

71
6. Click Next. This will move us to the Configure System Parameters screen. You may want to tweak
the parameters; however, for demonstration purposes, we will keep these as default. Now,
click next.

72
7. In the Complete the Wizard screen, review the parameters and click Finish. Ensure that all the 5
Actions succeed and then click Close.

73
8. Your DB Mail should now be configured successfully and you should be all setup to send emails
using DB Mail. But before we confirm success, we will like to send a test email and confirm
receipt. To do that, right-click on Database Mail and choose Send Test E-Mail…

9. Enter to: email id and click Send Test E-Mail.

74
10. You should receive the email in a few seconds. If you have received the email, you have been
able to configure DB Mail successfully, and you can now start using DB Mail.

Quarterly Restore process.

Scope:  This activity is to restore few financial database in every quarter for audit.
Roles:  Requestor
 IT support team (Wintel Team & DBA Support team)
Prerequisites:
 Appropriate permission on the database server.
 Server should be accessible.
Inputs:  This is predefined activity and will do in each quarter. Wintel team initiate the
request and DBA team will do the database restoration.
Controls:  NA
Outputs: Communication emails sent to the requester and all tem member with attachment of
log details of database restoration.

75
 Wintel team initiate the request on email and he also raise the ticket on service now.to assign on
wintel team.
 DBA team provide the backup name of all databases with the server details.
 Wintel Team download / copy the database from Tape of any dates of last quarter and copy the
database backups file on all individual server and send the details to DBA team.
 DBA team restore the database one by one and create excel log file with details of Server,
Application, restore_history_id, restore_date, destination_database_name, user_name,
backup_set_id and send to everyone who is in email trail .
 Oleg verified log file and send us confirmation to close the ticket.
 Wintel team will close the ticket.

76