installing sql 2008 on windows xp

31
Oracle 11g (Unix)/SQL 2008 (XP) Installation guide Installing SQL 2008 on Windows XP Pre-installation requirements and configurations Hardware Requirements Processor Minimum: 1.0 GHz, recommended: 2.0 GHz or faster Memory Minimum: 512 MB Recommended: 2GB Hard drive free space Minimum 2 GB (Hard drive space usage may vary depending on type of server and size of databases) Pointing device: A Microsoft mouse or compatible pointing device is required. Software Requirements SQL Server 2008 graphical tools require VGA or higher resolution: at least 1,024x768 pixel resolution. .Net 3.5 Framework SP1 Operating System - Windows XP Professional SP2 Windows XP SP2 Tablet,Windows XP x64 Professional Windows XP SP2 Media Center 2002 1 Windows XP SP2 Media Center 2004 Windows XP Media Center 2005,Windows XP Professional Reduced Media Windows Server 2003 SP2 Small Business Server R2 Standard Windows Server 2003 SP2 Small Business Server R2 Premium Windows Server 2003 SP2 Standard,Windows Server 2003 SP2 Enterprise Windows Server 2003 SP2 Datacenter Windows Server 2003 SP2 Small Business Server Standard Windows Server 2003 SP2 Small Business Server Premium Windows Server 2003 SP2 64-bit x64 Standard Windows Server 2003 SP2 64-bit x64 Datacenter 1 Windows Server 2003 SP2 64-bit x64 Enterprise 1 1

Upload: dushyanthap

Post on 02-Apr-2015

711 views

Category:

Documents


3 download

DESCRIPTION

Installing SQL 2008 on Windows XP

TRANSCRIPT

Page 1: Installing SQL 2008 on Windows XP

Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

Installing SQL 2008 on Windows XP

Pre-installation requirements and configurations

Hardware Requirements

Processor Minimum: 1.0 GHz, recommended: 2.0 GHz or faster

Memory Minimum: 512 MB Recommended: 2GB

Hard drive free space Minimum 2 GB (Hard drive space usage may vary

depending on type of server and size of databases)

Pointing device: A Microsoft mouse or compatible pointing device is required.

Software Requirements

SQL Server 2008 graphical tools require VGA or higher resolution: at least 1,024x768

pixel resolution.

� .Net 3.5 Framework SP1

� Operating System -

Windows XP Professional SP2

Windows XP SP2 Tablet,Windows XP x64 Professional

Windows XP SP2 Media Center 2002

1

Windows XP SP2 Media Center 2004

Windows XP Media Center 2005,Windows XP Professional Reduced Media

Windows Server 2003 SP2 Small Business Server R2 Standard

Windows Server 2003 SP2 Small Business Server R2 Premium

Windows Server 2003 SP2 Standard,Windows Server 2003 SP2 Enterprise

Windows Server 2003 SP2 Datacenter

Windows Server 2003 SP2 Small Business Server Standard

Windows Server 2003 SP2 Small Business Server Premium

Windows Server 2003 SP2 64-bit x64 Standard

Windows Server 2003 SP2 64-bit x64 Datacenter

1

Windows Server 2003 SP2 64-bit x64 Enterprise

1

1

Page 2: Installing SQL 2008 on Windows XP

Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

Windows Vista Ultimate,Windows Vista Enterprise

Windows Vista Business,Windows Vista Ultimate x64

Windows Vista Enterprise x64

1

1,Windows Vista Business x64

Windows Server 2008 Web,Windows Server 2008 Standard Server

1

Windows Server 2008 Standard Server without Hyper-V

Windows Server 2008 Datacenter

Windows Server 2008 Datacenter without Hyper-V

Windows Server 2008 Enterprise

Windows Server 2008 Enterprise without Hyper-V

Windows Server 2008 x64 Standard

Windows Server 2008 x64 Standard without Hyper-V

Windows Server 2008 x64 Datacenter

1

Windows Server 2008 x64 Datacenter without Hyper-V

Windows Server 2008 x64 Enterprise

1

Windows Server 2008 x64 Enterprise without Hyper-V

Windows Small Business Server 2008

1

Windows Server 2008 for Windows Essential Server Solutions

2

Windows Server 2008 without Hyper-V for Windows Essential Server

Solutions

2

2 ,Windows 7 Ultimate3,Windows 7 Enterprise

Windows 7 Professional

3

3,Windows 7 64-bit x64 Ultimate

Windows 7 64-bit x64 Enterprise

1,3

1,3,Windows 7 64-bit x64 Professional

Windows Server 2008 R2 64-bit x64 Web

1,3

Windows Server 2008 R2 Foundation Server

1,3

Windows Server 2008 R2 64-bit x64 Standard

1,3

Windows Server 2008 R2 64-bit x64 Enterprise

1,3

Windows Server 2008 R2 64-bit x64 Datacenter

1,3

1,3

1This edition of SQL Server can be installed to the Windows on Windows (WOW64) 32-bit subsystem of a 64-bit

server. WOW64 is supported only for stand-alone instances of SQL Server. WOW64 is not supported for SQL Server failover

cluster installations.

2Supported Operating Systems for SQL Server Standard for Small Business

3Supported only on SQL Server SP1 or higher.

� Microsoft Windows Installer 4.5 or a later version

Page 3: Installing SQL 2008 on Windows XP

Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

Supported operating systems have built-in network software. Stand-alone named and default

instances support the following network protocols:

Network Configurations

� Shared memory

� Named Pipes

� TCP/IP

� VIA

Step 1: Copy Installation files

We recommend you copy the whole installation files to hard drive you are going to install

it on. It makes the installation process much faster than running it from CD/DVD once it get

started.

Here is the system looks like after the copy the entire installation files:

Page 4: Installing SQL 2008 on Windows XP

Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

Step 2: Setup

Double click on the setup.exe file. Then you will get following dialog box

Click Ok to install Microsoft .NET Framework .after few seconds following dialog box

will appear…

This will disappear from the screen and the main .net installation dialog box appears:

Click on the "I have read and ACCEPT the terms of the License agreement”, then click on the

install button to proceed. Then it will install .Net framework for you.

Page 5: Installing SQL 2008 on Windows XP

Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

After install .net framework following dialog box appear for install windows recommended

Software update. Click on Next .then it will install software update.

Click on OK the restart the computer. After reboot SQL server 2008 setup will continue.

Step 3: SQL installation

After reboot following dialog box appears:

This will disappear from the screen and the main installation dialog box appears:

Page 6: Installing SQL 2008 on Windows XP

Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

Click on the Installation on the left hand side of the screen. Then click on the “New SQL server

stand-alone installation or add features to an existing installation”.

The following dialog appears on the screen while the install program prepares for Installation:

Page 7: Installing SQL 2008 on Windows XP

Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

After few minutes (timing will vary according on your system) the following screen appears:

Step 5:

Click on “show details” button or “view detailed report link” to check for any failed processes .if

any failed process found, correct it, then click on the Re-run button to perform the checks again.

Page 8: Installing SQL 2008 on Windows XP

Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

Step 6:

If all checks have passed, click on the OK button. After a few moments, the option to select the

edition and to enter the license key (or “product key”) will appear.

Step 7:

Enter the product key into the box, or choose free edition if you’re evaluation SQL server2008,

and click on the Next button:

Click on the "I accept the license terms" check box, and then click on the Next button again.

Page 9: Installing SQL 2008 on Windows XP

Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

Step 8:

The following screen appears; click on the Install button:

The following screen will appear while Windows Installer prepares itself for the installation.

This will take a short while:

Page 10: Installing SQL 2008 on Windows XP

Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

Step 9:

After few seconds or so the dialog appears again:

Click on Next Button.

Step 10: Select Features

Select the feature you want to install:

Click on the Next button.

Page 11: Installing SQL 2008 on Windows XP

Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

Step 11: Configuration

Configure it according to your requirements, but most installations, keep the default settings.

Click on the Next Button.

Step 12:

This screen show you if you have sufficient disk space on the hard drive you installing and

where you going to install.

Click on Next

Page 12: Installing SQL 2008 on Windows XP

Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

Step 13: Configure the Server

This dialog box allows you to configure the service accounts that will e used to run SQL server.

If you have created Active directory or Windows NT for use with services, use these. If not then

just to get the installation up and working, use the built-in Network Service account for all three

services listed (this account does not require a password).

Change the startup type to Automatic for all services. Then these services will start the SQL

server database engine, SQL agent and SQL browser service when the server is re-booted.

Click on Next

Page 13: Installing SQL 2008 on Windows XP

Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

Step 14:

This dialog box allows you to configure the database engine security.

Change the Authentication Mode to Mixed Mode unless you are certain you only need

Windows-only authentication.

If you pick Mixed Mode security, you must also enter a password for the sysadmin

Account (sa).

Enter and confirm a secure password for the sa account. That you MUST also provide a

Windows NT account on the local machine as a SQL Server administrator. If you do not want

Windows system administrators to be able walk up to the box and login to SQL Server, create a

new, local, dummy Windows user and add this account instead. Otherwise, add in the local

administrator Account, or your own Windows account on the domain in which the SQL Server

will reside.

Page 14: Installing SQL 2008 on Windows XP

Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

Step 15:

Click on the Data Directories tab

Specify which drives in your systems will be used for the various types of database files.

Performance wise better put the user database directory and User log directory on

Separate physical drives. But it will depend on how Windows has been configured and how

many disk drives you have available.

Default locations as follows:

Data root directory C:\Program Files\Microsoft SQL Server

User database directory C:\Data

User log directory C:\Logs

Temp DB directory C:\TempDB

Temp Log directory C:\TempDB

Backup directory C:\Backups

Page 15: Installing SQL 2008 on Windows XP

Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

Step 16: Reporting Services and Configurations

Choose appropriate reporting services configuration mode. By default first option is selected.

Then click on Next

Step 17:

Following screen allows you to checks if there are any processes of installation running which

will stop the installation of SQL Server 2008.

Click on Next Again

Page 16: Installing SQL 2008 on Windows XP

Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

Step 18:

This screen give you summery about what you are going to install and gives you a last chance to

cancel or change anything that is wrongly configures.

Click on install when you are sure you want to start the installation process.

Page 17: Installing SQL 2008 on Windows XP

Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

SQL server 2008 will now install. How long it takes depend on the speed of your machine.

Finally, the installation will complete. Check weather all the component you selected install

successfully.

Click on next then installation complete successfully dialog box will appear. Click on close.

Page 18: Installing SQL 2008 on Windows XP

Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

Post-installation configurations

Start/stop/pause database server using scripts

Method 1

Click Start >> Run >> type cmd to start command prompt.

Start default instance of SQL ServerType net start mssqlserver in the command prompt

Stop default instance of SQL ServerType net stop mssqlserver in the command prompt

Pause default instance of SQL ServerType net pause mssqlserver in the command prompt

Page 19: Installing SQL 2008 on Windows XP

Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

If you have a named instance called DMP on your machine.

Stop ,Start, Pause and Resume a SQL Server Named Instance

� Stop DMP instance of SQL Server :�

net stop “SQL SERVER DMP”Start DMP instance of SQL Server :

� Pause net start “SQL SERVER DMP”

DMP instance of SQL Server :� Continue DMP

net pause “SQL SERVER DMP”instance of SQL Server :

Method 2

net continue “SQL SERVER DMP”

By default, sqlservr.exe is located at

C:\Program Files\Microsoft SQL server\MSSQL10_50.MSSQLSERVER\MSSQL\Binn.

If a second instance of SQL Server is installed, a second copy of sqlservr.exe is located in a directory such as

C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\binn.

We can start one instance of SQL Server by using sqlservr.exe from a different instance, but SQL Server will start the version of the incorrect instance as well, including service packs, which may lead to unexpected results. To avoid this, use the MS-DOS change directory (cd)command to move to the correct directory before starting sqlservr.exe, as shown in the following example.

� To start the default instance of SQL Server from a command prompt

cd \Program Files\Microsoft SQL Server\MSSQL10_50.1\MSSQL\Binn

sqlservr.exe

� To start a named instance of SQL Server from a command prompt

sqlservr.exe -s <instancename>

� To start the default instance of SQL Server in single-user mode from a command prompt

sqlservr.exe -m

� To start a named instance of SQL Server in single-user mode from a command prompt

sqlservr.exe -m -s <instancename>

Page 20: Installing SQL 2008 on Windows XP

Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

� To start the default instance of SQL Server with minimal configuration

sqlservr.exe –f

� To start a named instance of SQL Server with minimal configuration

sqlservr.exe -f -s <instancename>

Start/stop/pause database server using GUI

Method 1

Type services.msc in Run .then it will show all the services on Windows.

You can see SQL services in the services dialog box. It will indicate instance names as well.

Right click on service which you want to stop/start/restart .then select appropriate task.

Page 21: Installing SQL 2008 on Windows XP

Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

Method 2

Go to SQL Configuration Manager

You can see SQL services in the services dialog box. It will indicate instance names as well.Right click on service which you want to stop/start/restart .then select appropriate task.

Page 22: Installing SQL 2008 on Windows XP

Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

Enable remote computer to connect to a database server

Open SQL Server Configuration Manager. Click Start -> Programs -> Microsoft SQL Server 2008 -> Configuration Tools ->SQL Server Configuration Manager

On SQL Server Configuration Manager, select

.

SQL Server Services on the left window. If the state on SQL Server Browser is not running, configure and start the service.

Double-click on SQL Server Browser, the Properties window will show up. Set the account for

start SQL Server Browser Service.

Page 23: Installing SQL 2008 on Windows XP

Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

On SQL Server Browser Properties, move to Service tab and change Start Mode to Automatic.

Therefore, the service will be start automatically when the computer starts. Click OK to apply

changes.

Back to SQL Server Configuration Manager, right-click on SQL Server Bowser on the right

window and select Start to start the service.

Page 24: Installing SQL 2008 on Windows XP

Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

On the left window, expand SQL Server Network Configuration -> Protocols for DMP. If it

Disable Right-click on TCP/IP and select Enable to enable the protocol.

There is a pop-up shown up that you have to restart the SQL Service to apply changes.

On the left window, select SQL Server Services. Select SQL Server on the right window ->

click Restart. The SQL Server service will be restarted.

Page 25: Installing SQL 2008 on Windows XP

Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

Open Microsoft SQL Server Management Studio and connect to the SQL Server 2008.

Right-click on the SQL Server Instance and select Properties.

Page 26: Installing SQL 2008 on Windows XP

Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

On Server Properties, select Security on the left window. Then, select SQL Server and Windows

Authentication mode.

Again, there is a pop-up shown up that you have to restart the SQL Service to apply changes.

Page 27: Installing SQL 2008 on Windows XP

Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

Right-click on the SQL Server Instance and select Restart.

Firewall Configuration

On the Start menu, click Run.Type firewall.cpl .then windows firewall dialog box will be appear.

Click advanced tab.

Page 28: Installing SQL 2008 on Windows XP

Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

Click on Add Port

Add the proper settings for your application. For this task we're going to run a SQL server on

port 1433(default port). Pick a name for your service, Select TCP as the protocol. Click OK to

save the rule.

Instead of Adding firewall rules using port number, you can

add it by selecting particular executable file. Click on add

program and select appropriate sql server.exe file.

That’s it. Now you should be able to connect to the SQL

Server 2008 remotely.

Page 29: Installing SQL 2008 on Windows XP

Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

How to Connect Remote Database Server

Go to SQL Management Studio .click on the down arrow in the server name and click on browse

more.

Click on the network servers tab in the dialog box.

In this dialog box display available remote SQL servers.

Click on the appropriate remote server, click on OK.

Page 30: Installing SQL 2008 on Windows XP

Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

Enter the credential to log the remote server. Then you can connect with the remote server. In

this case I was connected to XP2 SQL Server from XP3 Client Machine.

CLR functions

I am going to execute my queries in database called DUSHYANTHA.so I execute following

command to create database.

CREATE DATABASE DUSHYANTHA

Following simple CLR function will return “Hello World”.

CREATE FUNCTION MyFirstFunction()RETURNS varchar(30)ASBEGINDeclare @Return varchar(30)select @Return ='Hello World'return @returnend

Then I created two databases called “student” and “customer” to demonstrate CLR functions.

CREATE TABLE Student(First_name char(50),Age int,Country char(25),string as(dbo.MyFirstFunction()))

Page 31: Installing SQL 2008 on Windows XP

Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

CREATE TABLE customer(First_name char(50),Age int,Country char(25),string as(dbo.MyFirstFunction()))

Then I insert some values into these tables.

INSERT INTO StudentVALUES ('Dushyantha', 23, 'Sri Lanka')INSERT INTO StudentVALUES ('Madushanka', 23, 'Sri Lanka')INSERT INTO StudentVALUES ('Punchiewa', 24, 'Sri Lanka')

INSERT INTO customerVALUES ('A', 30, 'AA')INSERT INTO customerVALUES ('B', 20, 'BB')INSERT INTO customerVALUES ('C', 25, 'CC')

After inserting value you can see there is a string value in each record which equal to “Hello

world”

SELECT * FROM customer

SELECT * FROM Student