activant prophet 21 - erpcustomer.epicor.com
TRANSCRIPT
![Page 1: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/1.jpg)
Activant Prophet 21
SQL Server Management
SQL Server Administration suite Class 3 of 4
![Page 2: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/2.jpg)
This class is designed for…• Beginner SQL/Prophet 21 Users who
are responsible for SQL Administration as it relates to Prophet 21
• Completed the following classes in this suite– “Introduction to SQL Server 2000:
Installation and Implementation”– “SQL Server Data Storage”
![Page 3: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/3.jpg)
Objectives• Perform backups• Perform restores• Maintenance Plans• Create and maintain SQL and
Prophet 21 logins
![Page 4: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/4.jpg)
This course will NOT cover…
• Windows Navigation• Installation of SQL Server• SQL Server Data Storage• Data Manipulation
![Page 5: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/5.jpg)
Implementing an Maintenance Plan
• Benefits– Protection– Data Integrity– Guards against system failures
![Page 6: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/6.jpg)
Implementing an Maintenance Plan
• Typical Tasks– Regular and frequent backups of
database and transaction log– Data Consistency checking– Index Rebuilding
![Page 7: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/7.jpg)
Implementing an Maintenance Plan
• Accomplished through– SQL Enterprise Manager– Transact-SQL statements
![Page 8: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/8.jpg)
Regular and Frequent Backups• Databases are typically large• Backup entire database when all
users are off the system– Time consuming– Maintain data integrity
• Utilize the transaction log– Backup changes since last backup– Saves time
![Page 9: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/9.jpg)
Differential Backups• Database backup• Backs up changes since last full
database backup• Must already have a full database
backup
![Page 10: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/10.jpg)
Backup StrategySun Mon Tues Wed Thurs Fri SatFull
database
backup
Transaction Log backs up every hour.Transaction Log backs up every hour.
FAILURE - PM
Downtime = 9 hours
FAILURE - PM
Downtime = 9 hours
Production database = 50GB
Max performance 4 AM to 2 AM weekdays
Full database backup takes 5 hours
![Page 11: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/11.jpg)
Backup Strategy with DifferentialSun Mon Tues Wed Thurs Fri SatFull
database backup
Transaction Log backs up every hour.Transaction Log backs up every hour.
FAILURE - PM
Downtime = 6 ½ hours
FAILURE - PM
Downtime = 6 ½ hours
Differential backups every night.Differential backups every night.
Production database = 50GB
Max performance 4 AM to 2 AM weekdays
Full database backup takes 5 hours
![Page 12: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/12.jpg)
Performing Backups• Expand Database• Right-click• Choose All Tasks• Backup Database
![Page 13: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/13.jpg)
General
![Page 14: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/14.jpg)
Backup Destination
![Page 15: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/15.jpg)
Backup Device
![Page 16: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/16.jpg)
New Device
![Page 17: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/17.jpg)
Performing Backups - General
![Page 18: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/18.jpg)
Performing Backups - Options
![Page 19: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/19.jpg)
Backup Commands• Backing up a Database
– BACKUP DATABASE {database name}TO {backup device name}WITH {(DIFFERENTIAL) | (options)}
• Backing up a Transaction Log– BACKUP LOG {database name}
TO {backup device name}WITH {options}
![Page 20: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/20.jpg)
Restore
![Page 21: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/21.jpg)
Restore
![Page 22: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/22.jpg)
Restore Commands• Restoring a Full or Differential Database
Backup– RESTORE DATABASE {database name}
TO {backup device name}WITH {options}
• Restoring a Transaction Log Backup– RESTORE LOG {database name}
TO {backup device name}WITH {options}
![Page 23: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/23.jpg)
Backup Verification• RESTORE VERIFY ONLY FROM
<backup device>• Verifies that all files in the backup set
are complete and readable– Bad track– Bad tape– Bad sector on a disk
• Does NOT verify the structure of the data
![Page 24: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/24.jpg)
Database Maintenance Wizard
• Setup ALL administrative actions
• Creates scheduled jobs for you
![Page 25: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/25.jpg)
Data Consistency Checking (DBCC)• Corrupt data in database = Corrupt
data in backup• Must be run from Query Analyzer• Off Hours is best to run• 3 Commands
– DBCC CHECKDB– DBCC CHECKALLOC– DBCC CHECKCATALOG
![Page 26: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/26.jpg)
Data Consistency Checking (DBCC)• DBCC CHECKDB
[(database name [,NOINDEX])]• DBCC CHECKALLOC
[(database name [,NOINDEX])]• DBCC CHECKCATALOG
[(database name)]
![Page 27: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/27.jpg)
Index Rebuilding• Index pages fill up to their 8k limit• New extent is allocated to insert a
pointer• Page Splitting can occur
(Index fragment)
![Page 28: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/28.jpg)
Index Rebuilding• DBCC DBREINDEX
(<table_name>, <index_name>,FillFactor)
• Rebuilds indexes one at a time
![Page 29: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/29.jpg)
Index Statistics• Updated every time a query is run• Index fragmentations are recorded in
statistics• Query Optimizer determines the most
efficient way to run a query based upon statistics
• UPDATE STATISTICS <table_name>
![Page 30: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/30.jpg)
Operators• Setup to tell SQL Server who is
taking care of server• How and when to notify them
![Page 31: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/31.jpg)
Operators
![Page 32: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/32.jpg)
Operators
![Page 33: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/33.jpg)
Operators
![Page 34: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/34.jpg)
New Alert – General Tab
![Page 35: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/35.jpg)
New Alert – Response Tab
![Page 36: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/36.jpg)
Scheduled Jobs• Composed of steps• Run in specified order• Break down tasks• Log each separate part
![Page 37: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/37.jpg)
Scheduled Jobs• Send output of any task to a log file
– Simplifies debugging• How to proceed if a task fails
![Page 38: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/38.jpg)
Scheduled Jobs
![Page 39: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/39.jpg)
Scheduled Jobs – General Tab
![Page 40: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/40.jpg)
Scheduled Jobs – Steps Tab
![Page 41: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/41.jpg)
Scheduled JobsNew Step – General Tab
![Page 42: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/42.jpg)
Scheduled JobsNew Step – Advanced Tab
![Page 43: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/43.jpg)
Scheduled Jobs – Schedules Tab
![Page 44: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/44.jpg)
Scheduled Jobs - New Schedule
![Page 45: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/45.jpg)
Scheduled Jobs – Notifications Tab
![Page 46: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/46.jpg)
SQL Agent Mail• SQL Server has access to a MAPI
compliant mail server• SQL Server Agent Service must be
running under a domain user account
• Domain user account must have a mail profile set up on SQL Server
• Mail client must be configured on SQL Server
![Page 47: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/47.jpg)
Managing Database Loginsand Permissions
• User management• Database server logins• Database users• Database permissions• Managing logins for Prophet 21
![Page 48: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/48.jpg)
User Management• Two levels
– Database Server Logins• Allows users to login to the database server• Passwords are kept at server level
– Database Users• Must be user on specified database• No additional passwords are required
![Page 49: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/49.jpg)
User Management• Managed in two ways
– Creates server login for user– Maps this login to a database user
• Permissions are applied at the server level and database level– Statement permissions
• User performs database level operations– Proper permissions
• Access and/or modify tables
![Page 50: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/50.jpg)
Database Server Logins
![Page 51: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/51.jpg)
Add New Login
![Page 52: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/52.jpg)
New Login - General
![Page 53: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/53.jpg)
New Login – Server Roles
![Page 54: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/54.jpg)
New Login – Database Access
![Page 55: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/55.jpg)
Fixed Server RolesRole PermissionSysadmin Perform any activityDbcreator Create and alter databases
Diskadmin Manage Disk Files
Processadmin Manage SQL Server processes
Serveradmin Configure server-wide settings
Setupadmin Install replication
Securityadmin Manage and audit server logins
![Page 56: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/56.jpg)
Fixed Database RolesRole Permission
Public Maintain all default permissionsDb_owner Perform any database role activity Db_accessadmin Add or remove database users,
groups, and roles Db_ddladmin Add, modify, or drop database objects Db_securityadmin Assign statement and object
permissions
![Page 57: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/57.jpg)
Fixed Database Roles (cont’d)Role Permission
Db_backupoperator Backup and restore databases Db_datareader Read data from any table Db_datawriter Add, change, or delete from all tables Db_denydatareader Cannot read data from any table Db_denydatawriter Cannot change data in any table
![Page 58: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/58.jpg)
Database Permissions• Assigned using
– SQL Enterprise Manager– Transact-SQL GRANT statement
![Page 59: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/59.jpg)
Database PermissionsUsing SQL Statement
• Statement Permissions– GRANT {ALL | statement_list} TO
{PUBLIC | name_list}• Object Permissions
– GRANT {ALL | permission_list}ON {table_name [(column_list)] | view_name [(column_list)] |stored_procedure_name | extended_stored_procedure_name}TO {PUBLIC | name_list}
![Page 60: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/60.jpg)
Database PermissionsUsing SQL EnterpriseDatabase PermissionsUsing SQL Enterprise
• In the Server Manager window, right-click the database on which you want to grant permissions
• Select Properties• Click the
Permissions tab• Choose options
![Page 61: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/61.jpg)
Grant Object Level Permissions
• Drill down to the object on which you want to grant permissions
• Right-click the object, point to All Tasks, and then select Manage Permissions
• Grant permissions to the objects or database roles you want
![Page 62: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/62.jpg)
Managing Logins for Prophet 21 (CommerceCenter)
Users are created in System Setup
![Page 63: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/63.jpg)
Additional Administrationand Debugging Tools
SQL Server ProfilerSQL Query Analyzer
![Page 64: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/64.jpg)
Summary• Perform backups and restorations• Create Maintenance Plan• Create and maintain SQL and
Prophet 21 logins
![Page 65: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/65.jpg)
• Visit Activant on the web: distribution.activant.com–View Educational Services Training course offerings
• Microsoft SQL Server – 3 day Classroom training
–Browse Documentation
–Search the Solutions database
–Submit a Support case
• Email Professional Services Sales: [email protected]
![Page 66: Activant Prophet 21 - erpcustomer.epicor.com](https://reader030.vdocuments.site/reader030/viewer/2022012507/6183a6901698ba3c36242718/html5/thumbnails/66.jpg)
SQL Administration suite• Basic Data Manipulation
– Running stored procedures– Select statements