MAGIC Telephone Hybrid System - SQL Migration - using the example Wolfgang Peters 1
Overview of the SQL Migration Requirements Remarks for Windows 7 Users Hardware requirements SQL-Server Software requirements SQL-Server Update to the Release 5.x MAGIC SCREENER Installation Update of the Database tables Microsoft SQL Server 2008 R2 Express Installation of the SQL Servers Server-Network Configuration SQL Server Migration Assistant for Access SSMA Installation First start of the SSMA Execute the SQL Migration SQL Server Management Studio Create User List of the Database Role Names Installation SQL Native Client Configuration MAGIC TOUCH/ADMIN Create Admin user List of the Server Roles Content 2
Update MAGIC TOUCH/ADMIN Update MAGIC SCREENER Update database tables Installation SQL Server Configuration SQL Server Migrate Caller.mdb to SQL Create SQL User Installation SQL Native Client Configuration MAGIC TOUCH Overview of the SQL Migration 3
The migration procedure described in this documentation should be only performed by a user who has significant knowledge of the configuration of the following software packages: MAGIC TOUCH or MAGIC TOUCH ADMIN MAGIC TOUCH LAN MAGIC SCREENER The user must have administrative rights on each PC to install the software If an existing SQL Server is used for the migration of the database, the user needs to have administrative access rights for the SQL Server The DVD MAGIC TOUCH/ADMIN Updates with SQL Tools is available The fee-based SQL Extension option is enabled for the Telephone Hybrid Master Requirements 4
Windows 7 is a bit different from Windows XP in terms of the administrator rights Even if the user is logged into the system as administrator, the software is not installed as administrator by default This is only done if the software is installed via the context menu Run as Administrator Otherwise all registry entries are stored in the so-called Virtual Store of the current user (HKCU) If another user logs in afterwards, he will not be able to access the configuration of the administrator Therefore, please always install the MAGIC TOUCH and MAGIC SCREENER Software via the context menu Execute as administrator Remarks for Windows 7 Users 5
Processor At least Pentium III Recommended: 2,0 GHz or faster Main storage RAM: Recommended: at least 1,024 GB Hard disk space: Depending on the version: 5 GB DVD drive Hardware requirements SQL Server 6
Supported operating systems Windows XP SP3 Professional Windows Server 2003 SP2 Windows Server 2008 SP2 Windows 7 Windows Server 2008 R2 Software requirements SQL Server 7
Installation of the new 5.x Release with SQL support as usual: The software can be found in the Software directory on the DVD The first step is the update/installation of the MAGIC TOUCH/MAGIC TOUCH ADMIN PC Software If required: Update of the firmware (IFE and S0) Please do not exit the software after the update The configuration to connect with the SQL Server will be done later under Configuration MAGIC TOUCH/ADMIN Update to the 5.x Release 8
To migrate an existing caller.mdb database to an SQL Server, it must be updated with the help of MAGIC SCREENER Execute the setup.exe file in the Software\MAGIC Screener Database DVD directory If MS Access 2000 Runtime is installed on the PC, it can be uninstalled if it is not required by another program MAGIC SCREENER 5.x requires MS Access 2007 Runtime which is automatically installed by the MAGIC SCREENER Setup Available updates are also automatically installed Remark: MS Access 2010 Runtime is currently not supposed to be used MAGIC SCREENER Installation 9
The real installation of the MAGIC SCREENER Software starts after the runtime installation If you installed the MAGIC SCREENER Software for the first time (no update), the setup can be exit now without starting software In this case the migration can be continued with Microsoft SQL Server 2008 R2 Express Update database tables (1) 10
If a caller database already exists, first the tables must be prepared to be conform with SQL Start MAGIC SCREENER The database path is distributed automatically for an existing system The tables are now updated automatically Afterwards MAGIC SCREENER can be closed Update database tables (2) 11
All necessary components for the SQL Server installation are available on the DVD (for 32- and 64-bit operating systems, German and English).NET Framework 3.5 SP1 Windows Installer 4.5 Windows PowerShell 2.0 included in Windows Management-Frameworks Windows Imaging Component (WIC) 1.0 Microsoft SQL Server 2008 R2 Express with management tools for Server PC Microsoft SQL Server 2008 R2 Native Client for Client PCs Microsoft SQL Server 2008 R2 Express 12
Installation using the example operating system: Windows XP SP3 Preparations: The SQL Server is installed e.g. on the Server PC on which MAGIC TOUCH or MAGIC TOUCH ADMIN is running All necessary components for the installation are available on the DVD in the \Software\SQL Tools directory NET Framework 3.5 SP1 dotnetfx35.exe Windows Installer 4.5 WindowsXP-KB942288-v3-x86.exe Windows PowerShell 2.0 WindowsXP-KB968930-x86-ENG.exe Windows Imaging Component (WIC) 1.0 wic_x86_enu.exe Installation SQL Server 13
SQL Server New Installation DVD directory: \Software\SQL Tools\SQL Server Express 2008 R2 SQLEXPRWT_x86_ENU.exe Microsoft SQL Server 2008 R2 Express with management tools Setup: New Installation 14
Accept license terms Setup: License Terms 15
No error: This window is skipped If an error occurs: Install requested setup (see status) and press Rerun afterwards The installation can now be continued without errors Setup: Setup Support Rules 16
All options under Feature Selection must be selected Setup: Feature Selection 17
No error: This window is skipped If an error occurs: Solve the problem (see status) and press Re-run afterwards The installation can now be continued without errors Setup: Installation Rules 18
Enter Named instance Standard: SQLEXPRESS Please keep the name in mind; it is required later on Enter Instance ID Same name as under Named instance Keep the Instance root directory or select any directory of your choice Setup: Instance Configuration 19
No error: This window is skipped If an error occurs: Provide required disk space Setup: Disk Space Requirements 20
Change the Startup Type for SQL Server Browser to Automatic Without this setting the Client PCs do not receive the configuration information from the SQL Server Enter Account Name and Password with administrator rights for the following service SQL Server Database Engine To keep it simple all services can be managed with the same account Setup: Server Configuration 21
Change authentication mode to Mixed Mode Assign a safe password for the SQL Server system administrator account SA The password is required for the login later on Enter at least one SQL Server Administrator By default the current user is entered Setup: Database Engine Configuration 22
Select if Error Reports are to be sent to Microsoft or not Setup: Error Reporting 23
No error: This window is skipped If an error occurs: Solve the problem (see status) and press Re-run afterwards The installation can now be continued without errors Setup: Configuration Rules 24
After the entry of all parameters the installation is executed and finished Afterwards the PC must be restarted Setup: Installation and Complete 25
If the SQL Server PC is connected with the internet, you should search for product updates Open SQL Server Installation Center under: START Programs Microsoft SQL Server 2008 R2 Configuration Tools SQL Server Installation Center Restart the PC afterwards Setup: Product updates 26
Start SQL Server Configuration Manager with START Programs Microsoft SQL Server 2008 R2 Configuration Tools SQL Server Configuration Manager Select Protocols for SQLEXPRESS Server-Network Configuration (1) 27
Double-click on the protocol name Named Pipes and set Enabled to Yes Click on protocol name TCP/IP and set Enabled to Yes Server-Network Configuration (2) 28
Select SQL Server Services Select SQL Server Browser service Open the context menu with the right mouse key and click on Restart Server-Network Configuration (3) 29
Under the Protocols for SQLEXPRESS entry the protocols Shared Memory Named Pipes TCP/IP are supposed to be enabled now Server-Network Configuration (4) 30
An existing caller.mdb database can be migrated to the SQL Server with the so-called SQL Server Migration Assistant for Access (SSMA) An SQL conform conversion of the access database has been already performed under Update of the database tables If no caller.mdb exists so far, the callersqldemo.mdb database, which can be found in the \Software\SQL Tools\SSMA for Access DVD directory, must be used for the migration SQL Server Migration Assistant for Access 31
Installing the SQL Server Migration Assistant (SSMA) DVD directory \Software\SQL Tools\SSMA for Access Execute SSMA 2008 for Access.4.0.Install.exe If the error message Required Component Missed is displayed, cancel the installation with Cancel and execute the AccessDatabaseEngine.exe file in the \Software\SQL Tools\Access Database Engine DVD directory Afterwards start the SSMA 2008 for Access.4.0.Install.exe file again SSMA Installation (1) 32
Accept license agreement SSMA Installation (2) 33
Select setup type Typical Start and finish installation SSMA Installation (3) 34
When the SQL Server Migration Assistant is started for the first time under Start Programs Microsoft SQL Server Migration Assistant 2008 for Access you need to register which requires a Windows Live ID The registration is only possible if you have access to the internet After the registration the access-ssma.license file must be downloaded and copied into a directory of your choice Now enter the directory path under License directory and press Refresh License afterwards Alternatively, a license file named accessssma.license, which is registered on AVT can be found in the \Software\SQL Tools\SSMA for Access DVD directory; this license file can be used without registration First start of the SSMA 35
The migration is supported by the Migration Wizard and is done in few steps: Create a new project Select any name for your project e.g. Caller Select the directory of your choice where you want to save the project Execute SQL Migration (1) 36
Select the database which is to be migrated via Add Databases Select the objects which are to be migrated By default all tables are already selected so that no changes are necessary Execute SQL Migration (2) 37
Establish the connection to the SQL Server To log in enter the following parameters: Server name: <computer name>/<sql Instance> Server port: [default] Database: <database name> The database will be migrated under this name to the SQL Server Authentication: SQL Server Authentication User name: sa Password: see Setup: Database Engine Configuration Execute SQL Migration (3) 38
An error message is displayed saying that the <Database> does not yet exist. To create the database click on Yes The Link Tables option is not required here since the linking is done directly by the MAGIC applications Execute SQL Migration(4) 39
The synchronization of the database can be skipped since it is read in only once Afterwards the actual migration process is started Errors must not occur, warnings can be ignored If errors occur, the details can be displayed via the Report function. Execute SQL Migration (5) 40
The Migration Assistant can now be closed The settings can be saved in the project by clicking on Yes It is not necessary to save the metadata of the project for the database; this step can be skipped with Save without selecting the database Execute SQL Migration (6) 41
The SQL Server is managed via the SQL Server Management Studio START Programs Microsoft SQL Server 2008 R2 SQL Server Management Studio To log in enter the following parameters: Server type: Database Engine Server name: <Computer name>/<sql Instance> Authentication: SQL Server Authentication Login: sa Password: see Setup: Database Engine Configuration SQL Server Management Studio 42
Select Security Logins Open the context menu with the right mouse key and click on New Login Create User (1) 43
Since all Clients receive the so-called ODBC- Connection-String from the MAGIC TOUCH Server, all Clients use the same user log in e.g. ScreenerUser Select page General Enter Login name ScreenerUser Activate SQL Server authentication Enter a Password of your choice which you need to remember Login name and password are required later on for the MAGIC TOUCH Server Deactivate the option Enforce password policy A default database can be selected Create User (2) 44
Select page User Mapping Select the database(s) to which you want to allow the user ScreenerUser to have access Set the following options for the selected database under Database role membership for Caller: db_datawriter db_datareader The option public is always selected Create User (3) 45
db_owner Members can perform all activities necessary for configuration and maintenance of the database and can also delete the database db_securityadmin Members can change the role membership and manage user rights. If principals are added to this role, the privileges might be extended unintentionally db_accessadmin Members can add or delete the access right to the database for Windows logins, Windows groups and SQL Server logins db_backupoperator Members can perform a backup of the database db_ddladmin Members can execute all DDL commands (Data Definition Language) in a database db_datawriter Members can add, delete or edit data in all user tables db_datareader Members can read the data of all user tables db_denydatawriter Members cannot add, edit or delete data in the user tables db_denydatareader Members cannot read the data of the user tables List of the Database Role Names 46
To get access to the SQL database, each PC with MAGIC TOUCH MAGIC TOUCH ADMIN MAGIC TOUCH LAN MAGIC SCREENER needs to have the SQL Native Client installed DVD directory \Software\SQL Tools\SQL Client 200x Please make sure you select the Client which matches the SQL Server (2005 or 2008) Installation SQL Native Client
The configuration in the MAGIC TOUCH or the MAGIC TOUCH ADMIN Software, respectively, is made under Configuration System Edit on the page Database Activate Database Support Select Microsoft SQL Server Open the editor via Edi to create the connection string Configuration MAGIC TOUCH/ADMIN (1) 48
Select e.g. {SQL Server Native Client 10.0} under Driver This setting depends on the SQL Server that is used Enter the computer name and the indicated SQL Server instance (see Setup: Instance Configuration) under Server Enter the user name under User and under Password the correct password (see Create User) Select or enter the desired database, which was created in the SQL Server, under Database If all entries are correct, the telephone book can be used as usual MAGIC TOUCH LAN and MAGIC SCREENER recognize automatically which database is used. A configuration is not necessary. Configuration MAGIC TOUCH/ADMIN (2) 49
Updates may require an adjustment of the database tables The normal user (in our example: ScreenerUser) cannot perform these administrative tasks because of the rights assignment In the following a user with administrative rights will be created. This user needs to be entered in MAGIC TOUCH/MAGIC TOUCH ADMIN to do Software Updates Start the SQL Server Management Studio and log in (see SQL Server Management Studio) Create Admin User (1) 50
Select Security Logins Open the context menu with the right mouse key and click on New Login Create Admin User (2) 51
Select page General Enter the Login name ScreenerAdmin Enable SQL Server authentication Assign a password of your choice which you need to remember Login name and password are required later for the MAGIC TOUCH Server Deactivate the option Enforce password policy Create Admin User (3) 52
The user ScreenerAdmin needs to have rights for two functions by default: Manage data (read, write, create, delete) Add table fields at table updates These rights are assigned via socalled Server Roles Go to the page Server Roles Enable the Server Role sysadmin (the role public is always selected) Create Admin User (4) 53
bulkadmin Members can perform the BULK INSERT command dbcreator Members can create, edit, delete or restore any database diskadmin Members can manage data carrier files processadmin Members can stop processes which are run by an instance of the Database Engine serveradmin Members can change server-wide configuration options and shut down the Server securityadmin Members can manage logins and their properties. They have GRANT, DENY and REVOKE rights to assign rights on the Server level. They have also GRANT, DENY and REVOKE rights to assign rights on the Database level. They can reset passwords for SQL Server logins setupadmin Members can add and delete connection servers and they can execute some stored system procedures sysadmin Members can perform any activity in the Database Engine. By default, all members of the Windows group PREDEFINED\Administrators (the local administrator group) are members of the fixed Server Role sysadmin List of the Server Roles 54