com/questions/21809196/sqlserver-2008-r2-cant-connect-to-local-database-inmanagement-studio
19
Before I get deep into SQL Installation let me tell you where we are starting
I am walking through the installation of SCVMM 2008 R2 SP1 on a new server that I just
setup in my demo environment. I want to use SQL Server 2008 R2 for my deployment
so I need to set that up as a prerequisite. I figured this is a good opportunity to
document the process.
I am starting with a sysprepd Windows Server 2008 R2 Server. I have allocated 2
processors and 512mb memory to the guest using dynamic memory. Once I get the
system up and running, I will bump up the memory to be close to what I actually need
but I will leave it dynamic.
I need to install some prerequisite software before I can install SQL Server.
Because I plan on using reporting services, I am going to setup IIS on this
machine. I created a detailed step by step post on how to do this. You can find it
at How To Install IIS 7 on Windows Server 2008 R2 SP1 For Use With
SCVMM 2008 R2 SP1.
o
Setup Wizard installs SQL Server 2005 Express Edition SP3 (the VMM 2008
Setup Wizard installs SQL Server 2005 Express Edition SP2). I want to
integrate my implementation with SCOM so I will NOT use Express.
Instead I am going to install SQL 2008 R2. To use SQL Server 2008 or
SQL Server 2008 R2 for the VMM database, SQL Server Management
Tools must be installed on the VMM server. In my case, I will put
SQL Server 2008 R2 right on my VMM server.
o
For more information about configuring remote connections for SQL Server
2008, see Connecting to the SQL Server Database
Engine (http://go.microsoft.com/fwlink/?LinkId=127719)
and Configuring the Windows Firewall to Allow SQL Server
Access (http://go.microsoft.com/fwlink/?LinkId=128365).
I put the DVD into a drive (actually, I am using an ISO that I attached to the
virtual machine) and right-clicked on the drive in My Computer and clicked
Install or run program from your media SQL Server Setup installs the
following software components required by the product:
o
The first thing that happens when you launch the installation of SQL Server 2008
R2 is it checks for the proper framework. if it is not installed, it will install it for
you. In my case, it adds .NET Framework 3.5 SP1
On the next screen, click Installation on the left to display the installation
options. We are then going to select New Installation or Add Features to an
existing installation.
On the Setup Support Rules you should be able to just click OK. If you click Show
Details it will look something like this
On the Setup Support Rules screen, you can see that I have a couple warnings
The .NET warning is that I do not have Internet access on this computer. Not a
problem so I am just moving on.
The Firewall warning will be ignored as well. I will go back and modify the firewall
later.
On the Setup Role I will keep the default SQL server Feature installation and
click Next
To use SQL Server 2008 or SQL Server 2008 R2 for the VMM database, SQL
Server Management Tools must be installed on the VMM server. I also want to
change the default installation location. I am moving it to the E-Drive. I am
running in a virtual machine on Hyper-V and the SCSI bus drives are faster than
the IDE Bus drives. I also do not like putting a bunch of stuff on the OS drive.
o
Turn on Reporting Services (If you use reporting services, you will need to
setup IIS)
Turn on Client Tools SDK (I do not think this is needed but I am adding it
anyway)
On the Installation Rules you can click "Show Details" if you like then just
click Nex
for this section, I am going to tell the installer to put my instance on my E Drive.
If you do not yet have an E drive defined you can add it on the fly. For
instructions on how to do this see How To Hot Add Storage To A Hyper-V
GuestSuper Simple And No Service Interruption
I am not using the default instance for my deployment. You can just leave the
defaults if you like to keep things simple. I want to create an instance called
SCVMM because this will be dedicated for my SCVMM database. If you do pick
your own name make sure SQL Server name does not contain more than 15
characters
The next screen is the Server Configuration. We need to do a few things here
If remote SQL Server is running under the Network Service account or a domain account,
you must create a Service Principal Name (SPN) for the SQL service as described in article
811889 in the Microsoft Knowledge Base at http://go.microsoft.com/fwlink/?
LinkId=88057.
We are are going to use the same account for all of our services. just click on
the Use the same account for all SQL server Services button to bring up a
small dialog box. In the Account Namefield select NT Authority\SYSTEM then
click OK
On the Account Provisioning tab I am changing to Mixed Mode. This gives me the
capability to manage users from inside of SQL. Without it users have to use
Windows authentication. Once you change to mixed mode you will need to put in
a password for the SA account which is the internal SQL Administrator account.
You will need to use a complex password for this. If you do not need mixed
mode, you can just leave Windows authentication mode turned on.
In my case I want to change the location that SQL stores my data so I am going
to move to the data Directories tab
On the data Directories tab I am going to change the location of my data root
directory. If you have not created this drive see How To Hot Add Storage To A
Hyper-V GuestSuper Simple And No Service Interruption. Once you
create the drive, you should add the folder. In my case I like to create a folder
called SQLData so I just toggled out to create the folder on my data disk. I
strongly recommend you do not put SQL Data on the C drive. Even if you have
plenty of space available. You have been warned!!!!
when I changed the Data Root directory, the Temp DB directory changed so I just
kept it as is.
In the Reporting Services configuration, I will leave Install the native mode
default configuration and then click Next
Almost done. You can show the details on the Installation Configuration Rules if
you like
On the Ready To install screen you can review your configuration and then just
click Install
Then just let it chug for about 20 mins or so (depending on performance of your
machine it could be longer)
We are done with the installation of SQL. You may want to take a few minutes to
read the supplemental information. Also notice that a log file was left on the
system in case you want to refer to it. When finished, you can just
click Close. You probably still have the SQL Server Installation center open. You
can close that by clicking the X in the upper right corner.
3. In the Rule Type dialog box, select Port, and then click Next.
4. In the Protocol and Ports dialog box, select TCP. Select Specific local ports, and then type the port number of the
instance of the Database Engine, In my case we are using the default which is 1433. Click Next.
5. In the Action dialog box, select Allow the connection, and then click Next.
6. In the Profile dialog box, I am going to Leave Domain turned on and turn private and public off. Then
click Next.
7. In the Name dialog box, type "Allow SQL 1433 Inbound and for a description I am putting in the same. Then
clickFinish.
14. On the Name page enter a name of Allow SQL ReportServer (TCP on port 80)
15. Click Finish.
If you would also like to open other ports like ICMP (Ping) and remote management you
can find step by step instructions at Allow Remote Desktop Services and Ping Through
Firewall on Windows Server 2008 R2 or Windows 7
Also if you are using this SQL Server for VMM ensure that TCP port 445 is not blocked.
VMM uses port 445 to populate the database instances from the remote server. If port 445
is blocked, you can enter the name of the SQL instance manually so it is not a big show
stopper.
After you open the port and before you confirm whether remote users can access the report server
on the port that you open, you must grant user access to the report server through role
assignments on Home and at the site level. You can open a port correctly and still have report
server connections fail if users do not have sufficient permissions. For more information, see How
to: Grant User Access to a Report Server (Report Manager) in SQL Server Books Online.
You can also verify that the port is opened correctly by starting Report Manager on a different
computer. For more information, see Report Manager in SQL Server Books Online.
To enhance the security of your SQL Server connection, it is recommended that you enable SSL
encryption by modifying the connection string as described in article 316898 in the Microsoft
Knowledge Base at http://go.microsoft.com/fwlink/?LinkId=89722.
When connecting remotely to SQL Server using a port other than the default port (1433), you
must append the port number after the instance name using the following syntax: instance
name, port.
Long post I hope you find it useful! Please feel free to comment!