Setup Instructions for SQL Server 2008 R2...

27
Product of Maximum Solutions Inc. Setup Instructions for SQL Server 2008 R2 Express General Instructions (Important Please Read) At the time of writing, SQL Server 2008 R2 Express was the latest version available. If for some reason, you are using SQL Server 2008 Express, the links and instructions in this document may be a bit different. You are encouraged to use R2 unless you have reasons to stay with the original 2008 Express edition. ** Disclaimer Microsoft Responsibility ** Since Microsoft is the owner of SQL Server 2008 R2 Express, they have the ultimate responsibility for providing the most up-to-date tools and installation. The scope of this document will be limited to the procedures we used at time of writing to install and connect the Max Enterprise application to the SQL Server 2008 R2 Express. If errors occur, you may need to search online for Microsoft’s latest downloads or instructions for issues unique to your configuration. ** Disclaimer Client Responsibility ** Maximum Solutions provides this document outlining the steps we took to do our installation, and information on how to link to the SQL tables once setup is complete, but the ultimate responsibility for management and usage of Microsoft SQL Server and SQL Server Express lies with the client. Throughout this document, anytime “[Year]” is encountered, replace it with the release year of the Max Enterprise (ME) software you are installing (for instance, if installing ME 2009, replace “MEdat [Year]” with “MEdat2009”) This document combines the instructions used for both the “Server” and each “Workstationconnecting to the server. Find the part of the document that pertains to your installation. Server - If you are installing SQL Server 2008 R2 Express on your machine, you will be considered the “Server” and should follow all instructions for Server. Workstations - If you are installing MaxEnterprise on a workstation that will connect to a SQL Server Express database on another machine, only follow instructions that are labeled for Workstations.

Transcript of Setup Instructions for SQL Server 2008 R2...

  • Product of Maximum Solutions Inc.

    Setup Instructions for SQL Server 2008 R2 Express

    General Instructions (Important – Please Read)

    At the time of writing, SQL Server 2008 R2 Express was the latest version available. If for some reason, you are using SQL Server 2008 Express, the links and instructions in this document may be a

    bit different. You are encouraged to use R2 unless you have reasons to stay with the original 2008

    Express edition.

    ** Disclaimer – Microsoft Responsibility ** Since Microsoft is the owner of SQL Server 2008 R2 Express, they have the ultimate responsibility for

    providing the most up-to-date tools and installation. The scope of this document will be limited to the

    procedures we used at time of writing to install and connect the Max Enterprise application to the SQL

    Server 2008 R2 Express. If errors occur, you may need to search online for Microsoft’s latest

    downloads or instructions for issues unique to your configuration.

    ** Disclaimer – Client Responsibility ** Maximum Solutions provides this document outlining the steps we took to do our installation, and

    information on how to link to the SQL tables once setup is complete, but the ultimate responsibility for

    management and usage of Microsoft SQL Server and SQL Server Express lies with the client.

    Throughout this document, anytime “[Year]” is encountered, replace it with the release year of the Max Enterprise (ME) software you are installing (for instance, if installing ME 2009, replace “MEdat[Year]” with “MEdat2009”)

    This document combines the instructions used for both the “Server” and each “Workstation” connecting to the server. Find the part of the document that pertains to your installation.

    Server - If you are installing SQL Server 2008 R2 Express on your machine, you will be considered the “Server” and should follow all instructions for Server.

    Workstations - If you are installing MaxEnterprise on a workstation that will connect to a SQL Server Express database on another machine, only follow instructions that are labeled for Workstations.

  • Page 2 of 27

    I. Server To connect to SQL Server 2008 R2 Express (SQL Server authentication):

    A) Must Meet Minimum Requirements Make sure all machines on which SQL Server Express will be installed meet Microsoft’s specified hardware and

    software requirements. The following link contains installation requirements and instructions:

    http://msdn.microsoft.com/en-us/library/ms143506.aspx

    B) Download and install the necessary software on each machine per Microsoft recommendations.

    This is the link you’ll use to install the necessary components. Follow their instructions in order given.

    If you are viewing this as a printed document, type this address into your browser:

    http://www.microsoft.com/express/Database/Default.aspx

    You may click on the Installation Options tab if you want to explore other options. But for most new users,

    the highlighted button below should be adequate.

    1. Uninstall beta versions If you’ve got any Beta versions of the SQL Server 2008 Express family installed on your machine; make

    sure you delete them before continuing. However, if you’ve already installed SQL Server 2008 Express,

    it is possible for SQL Server 2008 Express to co-exist on the same machine with SQL Server 2008 R2

    Express. But that is your decision on whether to keep both on your machine.

    http://msdn.microsoft.com/en-us/library/ms143506.aspxhttp://msdn.microsoft.com/en-us/library/ms143506.aspx#Express32http://www.microsoft.com/express/Database/Default.aspxhttp://www.microsoft.com/express/Database/Default.aspx

  • Page 3 of 27

    2. If you receive the message shown below, click to install the Download Manager from Akamai Technologies.

    3. You will see the progress as it downloads:

  • Page 4 of 27

    4. Click the Launch Button after the download completes.

    5. If you receive this message, click the link to load the Microsoft Windows Installer 4.5.

    Note: This may require you to restart your machine. Then you’ll have to restart the SQL Server

    installation file you downloaded.

  • Page 5 of 27

    6. Run the Installation File (*.exe) you saved from above.

    Click New Installation

  • Page 6 of 27

    7. Instance Configuration: You can choose the default but I chose to name the instance as follows:

    Click Next to continue on to Server Configuration.

  • Page 7 of 27

    8. Server Configuration: You may use the settings below and then click Next.

  • Page 8 of 27

    9. Database Engine Configuration: We want to use Mixed Mode because we’ll be specifying an ME user name later in the process.

  • Page 9 of 27

    10. Error Reporting: Go ahead and check the box if you want to send info to Microsoft.

  • Page 10 of 27

    11. Installation of SQL Server Express is complete.

  • Page 11 of 27

    12. After you click the Close button, the SQL Server Installation Center will still be open. You may explore the other resources at your disposal. Click the Resources link in the left pane as shown:

  • Page 12 of 27

    13. Verify Your SQL Server Express Instance Launch Microsoft SQL Server Management Studio from the Start menu.

    Click the Connect button and enter the Server name followed by the Instance name you set up during

    installation (step 7).

  • Page 13 of 27

    C) Run client configuration utility (Cliconfg.exe from Start/Run) and do the following:

    1. General Tab - Enable TCP/IP.

    2. Alias Tab Click the Alias tab to define an alias, using Named Pipes that points to the server containing the database

    to which you wish to connect.

    Clicking on the Add… button brings up this screen:

  • Page 14 of 27

    Type in the Server alias and the other two boxes will be filled in automatically.

    D) Configure the server. 1. Run ‘SQL Server Configuration Manager’ from Start/Microsoft SQL Server 2008 R2/Configuration

    Tools.

    2. Select ‘SQL Server 2008 R2 Services’ (in the left pane) - right-click on ‘SQL Server (SQLEXPRESS)’ (in the right pane) and select ‘Properties’ from the pop-up

    menu,

    - select the ‘Service’ tab,

    - locate the ‘Start Mode’ setting and set it to ‘Automatic’, then click ‘OK’.

  • Page 15 of 27

    Note: You can also start/stop SQL Server via Computer Management/Services and Applications/SQL

    Server Configuration Manager.

    3. When back on the main configuration manager screen, if it indicates that SQL Server is not running, right-click on ‘SQL Server’ the click on ‘Start’ in the pop-up menu.

    4. In the left pane, expand ‘SQL Server 2008 R2 Network Configuration’ - then select ‘Protocols for SQLEXPRESS’ (or whatever you named your instance of SQL Server). In the

    right pane, make sure Named Pipes and TCP/IP are both enabled, if not, right-click on each and select

    ‘Enable’ from the pop-up menu for each.

  • Page 16 of 27

    5. In the left pane, expand ‘SQL Native Client Configuration’, and again, in the right pane, make sure

    Named Pipes and TCP/IP are both enabled.

    6. Restart SQL Server by selecting ‘SQL Server Services’ (in the left pane), right-click on ‘SQL Server’ (in the right pane) and select ‘Restart’ from the pop-up menu.

    E) Attach the MEdat[YEAR] database 1. Create a folder named ‘MaxE[YEAR]SqlData’ on the server, in a location that will be easy to back up, to

    store the SQL database files for ME.

    Note: This folder cannot be a compressed folder or you will not be able to attach the database.

    2. Obtain the zip file containing the MEdat[YEAR] SQL database and extract the contents into the ‘MaxE[YEAR]SqlData’ folder.

  • Page 17 of 27

    3. Run application ‘SQL Server Management Studio Express’ Start | Microsoft SQL Server 2008 R2 | SQL Server Management Studio

    Log in using window authentication, making sure that the current Windows user has full administrative

    rights.

    a) On the ‘Object Explorer’ pane, right-click on ‘Databases’ and select ‘Attach’

    b) On the ‘Attach Databases’ screen, click the ‘Add’ button c) On the ‘Locate Database Files’ screen, locate and select file ‘MEdat[YEAR]_Data.MDF’ then

    click the OK button.

    d) Once the data base is attached, locate User ME_User under Security/Users. Right-click on user ME_User and select Properties, to open the Login Properties screen.

    Note: Add user ME_User if it does not exist by:

    - right-clicking on the ‘Logins’ container,

    - select ‘New Login’,

    - specify ‘ME_User’ for the ‘Login name’,

    - ‘x’ (lower case) for the ‘Password’,

    - uncheck ‘Enforce password expiration’,

    - select ‘MEdat[YEAR]’ for the ‘Default database’, then proceed with the following steps.

  • Page 18 of 27

  • Page 19 of 27

    e) Click on ‘User Mapping’, in the ‘Select a Page’ panel. In the ‘Users mapped to this login’ section, check the box for the database(s) to which you want to grant access. In the ‘Database

    role membership for: MEdat[Year]’, check the checkboxes as shown below and click OK.

    f) Close SQL Server Management Studio Express

    F) Configure Firewall to Allow Access to Others

    (Click here for further reference: http://msdn.microsoft.com/en-us/library/cc646023.aspx )

    You only need to follow these instruction if you answer “YES” to the following two questions:

    - On the machine where SQL Server Express was installed, do you use a firewall?

    - Will other users need to connect to this instance of SQL Express?

    If you answered YES to these two questions, you need to configure your firewall to enable the SQL Server

    Express to run through it. The instructions below pertain to Microsoft Windows Firewall. But if you use another

    software vendor’s firewall software, the concept should be similar.

    http://msdn.microsoft.com/en-us/library/cc646023.aspx

  • Page 20 of 27

    1. Get SQL Server Express Instance ID Start | All Programs | Microsoft SQL Server 2008 R2 | Configuration Tools | SQL Server

    Configuration Manager.

    a) In “SQL Server Configuration Manager”, click the SQL Server Browser service in the right pane, right-click the instance name in the main window, and then click Properties.

    b) On the “SQL Server Browser Properties” page, click the Advanced tab, locate the instance ID in the property list and remember it for the next step.

    c) Click OK button.

    2. Create an exception for SQL Server 2008 R2 Express in (Windows) Firewall.

    a) Click on Start button, the click on Run and type firewall.cpl, and then click OK. For Windows Vista, type firewall.cpl in Start Search box and press Enter key, then click on

    Allow a program through Windows Firewall link on left tasks pane.

  • Page 21 of 27

    b) In “Windows Firewall”, click the Exceptions tab, and then click Add Program.

    c) In the “Add a Program” window, click Browse button. d) Click the C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\Binn\sqlservr.exe

    executable program, click Open button. MSSQL.2 is a placeholder for the instance ID that is

    obtained from previous procedure. Note that the path may be different depending on where

    SQL Server 2008 R2 is installed.

    e) Click OK button. f) Repeat steps 1 through 5 for each instance of SQL Server 2008 R2 that needs an exception. g) For SQL Server Browser service, locate the C:\Program Files\Microsoft SQL

    Server\90\Shared\sqlbrowser.exe executable program, and click Open button.

    h) Click OK button.

    For additional information, see: http://msdn.microsoft.com/en-us/library/cc646023.aspx

    G) Assuming this Server will also function as a client or workstation to run the ME application, jump to section 7 above and complete the remainder of the Workstation setup.

    http://msdn.microsoft.com/en-us/library/cc646023.aspx

  • Page 22 of 27

    II. Workstations

    To connect to SQL Server 2008 R2 Express (SQL Server authentication):

    A) Meet Minimum Requirements Make sure all machines that must connect to the SQL Server 2008 R2 Express meet minimum requirements.

    Chances are that if your machine is up-to-date with all operating system updates, you should have everything you

    need. http://www.update.microsoft.com/microsoftupdate/v6/default.aspx?ln=en-us

    B) Download and install the necessary software on each machine per Microsoft recommendations.

    1. Microsoft .NET Framework Version 3.5 You need to have at least v3.5 of Microsoft .NET Framework.

    How can I tell if I already have .Net Framework 3.5?

    Go to Programs and Features (Vista) or Add or Remove Programs (XP) in your Control Panel. Scroll

    down the list of installed applications until you find Microsoft .NET Framework the version will be listed

    next to the name

    If your machine does not already have the .NET framework, you may download it here.

    http://www.microsoft.com/downloads/details.aspx?FamilyId=333325FD-AE52-4E35-B531-

    508D977D32A6&displaylang=en

    2. SQL Native Client SQL Native Client is the native client side data access library for Microsoft SQL Server, version 2005

    onwards. It natively implements support for the SQL Server features including the Tabular Data Stream

    implementation, support for mirrored SQL Server databases, full support for all data types supported by SQL

    Server, asynchronous operations, query notifications, encryption support, as well as receiving multiple result

    sets in a single database session. SQL Native Client is used under the hood by SQL Server plug-ins for other

    data access technologies, including ADO or OLE DB. The SQL Native Client can also be directly used,

    bypassing the generic data access layers.

    How can I determine if my machine already has this driver? Open a file browser (i.e. Start My Documents) and click Search Files and Folders Search for files

    named such as “sqlncli*.dll” in the folder C:\Windows\System32.

    If your machine does not already have the SQL Native Client Driver, you may download it here:

    http://www.microsoft.com/downloads/en/details.aspx?FamilyId=50b97994-8453-4998-8226-

    fa42ec403d17&DisplayLang=en (Once on this page, EditFind: “Native Client”)

    When trying to install sqlncli.msi after downloading, you may get the message that:

    ”You do not have permission…”

    If so, do the following:

    - Right-click on the file,

    - Choose properties.

    - At the bottom of the screen there should be a "Un-Block" button that you can click that will

    force the system to allow the install

    - Now Right-Click on the file and choose "Install"

    C) Run client configuration utility (Cliconfg.exe from Start/Run) and do the following:

    1. General Tab – Enable both Named Pipes and TCP/IP, making sure Named Pipes is first in the order.

    http://www.update.microsoft.com/microsoftupdate/v6/default.aspx?ln=en-ushttp://www.microsoft.com/downloads/details.aspx?FamilyId=333325FD-AE52-4E35-B531-508D977D32A6&displaylang=enhttp://www.microsoft.com/downloads/details.aspx?FamilyId=333325FD-AE52-4E35-B531-508D977D32A6&displaylang=enhttp://www.microsoft.com/downloads/details.aspx?FamilyId=333325FD-AE52-4E35-B531-508D977D32A6&displaylang=enhttp://www.microsoft.com/downloads/en/details.aspx?FamilyId=50b97994-8453-4998-8226-fa42ec403d17&DisplayLang=enhttp://www.microsoft.com/downloads/en/details.aspx?FamilyId=50b97994-8453-4998-8226-fa42ec403d17&DisplayLang=enhttp://www.microsoft.com/downloads/en/details.aspx?FamilyId=50b97994-8453-4998-8226-fa42ec403d17&DisplayLang=en

  • Page 23 of 27

    2. Alias Tab – Define an alias, using Named Pipes that points to the server containing the database you wish to connect to.

    Clicking on the Add… button brings up this screen:

    D) Test the connection to the SQL Server.

    Note: This step is used only to verify that each workstation is able to connect to the SQL database prior to

    attempting to connect to it using ME. If this test fails, the client will not be able to connect using ME.

  • Page 24 of 27

    1. Open Control Panel/Administrative Tools/Data Sources (ODBC)

    2. Select the System DSN tab and click the Add button.

    3. On the ‘Create New Data Source’ dialog, select ‘SQL Native Client’ then click ‘Finish’.

    4. ‘Create a New Data Source to SQL Server’ dialog, specify ‘MEdat[YEAR]Test’ for both ‘Name’ and

    ‘Description’, select the appropriate server alias from the drop-down list, then click Next.

    (Hint– If the server alias doesn’t work, use the servername\instance

    ex: MAXSOLUTIONS06\SQLEXPRESS or .\SQLEXPRESS).

    If the expected server does not show up in the Server dropdown list, refer to the instructions to

    configure the server’s firewall on page 19.

  • Page 25 of 27

    3. Select ‘With SQL Server authentication…’, specify ‘ME_User’ for the Login ID (keep the ‘Connect to SQL Server to obtain…’ box checked), specify the ‘x’ for the Password (this will be

    changed later), then click the Next button.

    NOTE: If you get an error after clicking the Next button, then something in a prior step was not

    completed properly.

    4. Click the ‘Change the default database to’ check box and select MEdat[YEAR] from the drop-down list and click the Next button.

  • Page 26 of 27

    5. You should be able to just click the Finish button on this screen, accepting all defaults.

    6. Click the ‘Test Data Source’ button and if all is working you should get ‘TESTS COMPLETED SUCCESSFULLY!’…this indicates that you have successfully connected to the SQL database.

    E) MaxEnterprise – connecting to SQL database 7. Place a copy of the workgroup file (MaxSys4.mdw) in a shared folder on the network that all users will be

    allowed to access.

    8. Start the MaxEnterprise [YEAR] application 9. Once at the main menu, Go to Administrative>Data Locations. 10. Create a Data Location Name.

    11. Select ‘SQL Server’ from the ‘Connection Type’ drop-down list, you should see a screen similar to the following:

  • Page 27 of 27

    12. The ‘SQL Server Version’ options are ‘2000’, ‘2005 or later’, or ‘2008’. This looks for the SQL driver on the workstation. (Hint - if you do not have a SQL Server 2008 driver on the workstation, selecting

    ‘2008’ will not work. Please select ‘2005 or later’.) 13. Specify the Server Name you defined using client configuration utility (Cliconfg.exe) for the ‘Server

    Name’.

    (Hint - If alias doesn’t work, use the servername\instance or .\SQLEXPRESS)

    14. Specify ‘ME_User’ for the User Name. 15. Specify ‘x’ for the password. Note: Specify a stronger password if desired. 16. Locate the workgroup file (MaxSys4.mdw – from step a above) that will be shared by all users. 17. Click the OK button. If all is set up properly, the data linking process should complete successfully. 18. Once the linking process completes, and you are return to the main menu, exit and restart the application

    to complete the process.

    Helpful Links:

    Planning a SQL Server Installation

    http://msdn.microsoft.com/en-us/library/bb500442.aspx How to Install SQL Server 2008 R2 (Express Edition)

    http://blogs.msdn.com/b/petersad/archive/2009/11/13/how-to-install-sql-server-2008-r2-express-edition-

    november-ctp.aspx

    Troubleshooting SQL connections

    http://support.microsoft.com/default.aspx?scid=kb;en-us;827422

    Compare Features Among SQL Server Editions

    http://www.microsoft.com/sqlserver/2008/en/us/editions-compare.aspx

    How to: Configure a Windows Firewall for Database Engine Access

    http://msdn.microsoft.com/en-us/library/ms175043.aspx

    Security Considerations for a SQL Server Installation

    http://msdn.microsoft.com/en-us/library/ms144228.aspx

    SQL Server Express Weblog

    http://blogs.msdn.com/b/sqlexpress/

    http://msdn.microsoft.com/en-us/library/bb500442.aspxhttp://blogs.msdn.com/b/petersad/archive/2009/11/13/how-to-install-sql-server-2008-r2-express-edition-november-ctp.aspxhttp://blogs.msdn.com/b/petersad/archive/2009/11/13/how-to-install-sql-server-2008-r2-express-edition-november-ctp.aspxhttp://support.microsoft.com/default.aspx?scid=kb;en-us;827422http://www.microsoft.com/Sqlserver/2005/en/us/compare-features.aspxhttp://msdn.microsoft.com/en-us/library/cc646023.aspxhttp://msdn.microsoft.com/en-us/library/ms144228.aspxhttp://blogs.msdn.com/b/sqlexpress/