Archive | SQL Server 2008 RSS feed for this section

Install and Configure RBS (Remote Blob Storage) for SharePoint


Where I can download Remote Blob Storage installation files for SharePoint 2010?
You can download rbs_x64.msi file from : http://go.microsoft.com/fwlink/p/?LinkID=165839&clcid=0×409

How do I install and configure RBS for SharePoint?

1. Download Remote Blob Storage from above link
2. Before you install Remote Blob storage, make sure SQL server 2008 enabled FILESTREAM. To enable FILESTREAM

Start | All Program | Microsoft SQL Server 2008 R2 | Configuration Tools | Configuration Manager
Click on SQL Server Services | SQL Server | Properties

Enable FILESTREAM for BLOB Storage

3.  Enable following services

Enable File stream for Transact-SQL Access
Enable File stream for file I/O streaming access
Allow remote clients to have streaming access to Filestream data

Enable Filestream for SharePoint BLOB storage

4. Open SQL Management Studio and performing following task

use WSS_Content If not exists
(select * from sys.symmetric_keys where name = N‘##MS_DatabaseMasterKey##’)
create master key encryption by password = N‘Pa$$word’


image

5. Next we need to enable FileStreamProvider

Filestream feature is disabled, how to enable

use WSS_Content if not exists

(select groupname from sysfilegroups where groupname=N‘RBSFilestreamProvider’)

alter database WSS_Content add filegroup RBSFilestreamProvider contains filestream

If you get error message saying “ FILESTREAM Feature is Disabled” run the following query

FILESTREAM Feature is Disabled

Configuration option 'filestream access level'

6.  Next run the following query.  This will create a folder in E called Blobdata. This can be different in your case

use WSS_content alter database WSS_Content add file

(name = RBSFilestreamFile, filename = ‘E:\blobdata’)

to filegroup RBSFilestreamProvider


Create RBS File Stream File Folder

8. Now let’s go and install RBS. Best practice would be to install using command prompt  but it won’t give you any steps about what’s going on.
I had problem using Command and I installed using the GUI.  If you want to install using command here are the steps

(open command prompt as administrator).
I placed RBS installation file at C:\RBS folder Navigate to RBS folder using your Command Prompt

image

9.  Enter the following code

msiexec /qn /lvx* rbs_install_log.txt /i RBS.msi TRUSTSERVERCERTIFICATE=true
FILEGROUP=PRIMARY DBNAME=”WSS_Content” DBINSTANCE=”YourServer”
FILESTREAMFILEGROUP=RBSFilestreamProviderFILESTREAMSTORENAME=FilestreamProvider_1

Installing RBS Using Command Prompt

10. It won’t give you any indication about the installation. To see if its successfully installed Blob storage, just go to the folder and look for the log file

11. Installing RBS using GUI.  Double click on RB_X64.msi

12.  Welcome to the installation wizard for Remote Blob Storage wizard pops up. Setup helps you install, modify or remote remote Blob storage.

To continue, click Next

installation wizard for Remote Blob Storage

12. Install SQL Remote Blob storage : Licence Agreement

Install SQL Remote Blob storage : Licence Agreement

13. Install SQL Remote Blob Storage: Registration Information, the following information will personalize your blob installation

SNAGHTMLe57dbb

14.  Install SQL Remote Blob Storage : Feature Selection

Select the program features you would like to install and select the installation path where you want to install the program

Install SQL Remote Blob Storage : Feature Selection

15. Blob Storage Database Connection. You can test your connection against the database
which your setting blob storage by hitting test connection.

Blob Storage Database Connection

16. SQL Remote Blob Storage: Database Configuration

Enter information to configure RBS database settings

Blob Storage Database Configuration

17. Filestream Blob Store: Enter Filestream blob store configuration Information

image

18. Maintainer Task. Enter information to optionally schedule the maintainer task

During installation, the windows task scheduler window will apper. Use this to set scheduled task properties.

image
19. Remote Blob Storage Client Configuration

Remote Blob Storage Client Configuration

20.  Install Remote Blob Storage.  The program features you selected are being installed.

Please wait while the installation wizard installs remote blob storage. This may take several minutes.

image

21.To ensure that the installation was successful, open up the Content DB | tables

Ensure the blob installation in SharePoint

22. Now open your SharePoint 2010 Management Shell and enter the following scripts
$cdb = Get-SPContentDatabase –WebApplication http://vsp2010be
$rbss = $cdb.RemoteBlobStorageSettings
$rbss.Installed() – This should result in True. Else the next command will fail.
$rbss.Enable()
$rbss.SetActiveProviderName($rbss.GetProviderNames()[0])
$rbss

 

image

23. Now set the minimum threshold so that only files larger than a 1 MB will be placed in our blobdata fodler

$rbss.MinimumBlobStorageSize=1048576

image

24. Go head and upload a document which is larger than 1 MB.  This document should end up in the blobdata folder

I uploaded 8 GB of PDF file and it end up in the blobdata folder

Files moved to Blobdata Folder

Installing the FILESTREAM blob store failed with error message


Installing the FILESTREAM blob store failed with error message:
Access to the registry key
‘HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Remote Blob Storage’ is denied.
Setup will continue the installation”

 

Installing the FILESTREAM blob store failed with error message

 

The reason your getting this message because of Disable User Account Control (UAC)

Open your Control Panel in Windows 2008 Server and type in UAC

 Disable User Account Control

 

Change your UAC control

image

 

Restart the computer.

SQL Server Virtual Labs


Where to find SQL Server 2008 Virtual Labs? You can find SQL Server Virtual labs at : SQL Server Virtual Labs

Microsoft SQL Server 2008 Virtual Labs

Test drive Microsoft SQL Server 2008 in a virtual lab. See why SQL Server 2008 is at the heart of a comprehensive data programmability platform that enables you to access and manipulate business-critical data from a variety of diverse devices, platforms, and data services across the enterprise. Virtual labs are simple, with no complex setup or installation required.

SQL Server 2008 R2 Virtual Labs

SQL Server 2008 Virtual Labs

Best practices for SQL Server 2008 in a SharePoint 2010 farm


How to optimize SQL Server 2008 to get best performance for SharePoint 2010 farm?

Reference: http://technet.microsoft.com/en-us/library/hh292622.aspx

1. Use a dedicated server for SQL Server 2008
2. Configure specific SQL Server 2008 settings before you deploy SharePoint Server 2010

- Do not enable auto-create statistics on a SQL Server that is supporting SharePoint Server

auto-create statistics-on-a-SQL-Server

- Set max degree of parallelism (MAXDOP) to 1 for SQL Server instances that host SharePoint Server 2010 databases to ensure that each request is served by a single SQL Server process.

changing max degree of parallelism

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

3. Harden the database server before you deploy SharePoint Server 2010
4. Configure database servers for performance and availability
5. Design storage for optimal throughput and manageability
6. Proactively manage the growth of data and log files
7. Continuously monitor SQL Server storage and performance
8. Use backup compression to speed up backups and reduce file sizes

Reference: http://technet.microsoft.com/en-us/library/hh292622.aspx

Attach databases and upgrade to SharePoint Server 2010


How to detach SharePoint 2007 database and attach to SharePoint 2010 farm?
In this post, I am going to provide all the steps you needed to attach SharePoint 2007 database to SharePoint 2010 database.

1. Go to Central Administration of your SharePoint 2007 farm
      Application Management > Content Database

In this example,  I created a new site with separate database called  SP2007_content_DB in SharePoint 2007 and going to
move this database to SharePoint 2010

image

Database for above site

SNAGHTML15db264

 

2. Next we are going to open SQL Server Management Studio and take full back up of SP2007_content_db

SNAGHTML163bd2d

3. Before you backup your database set the database to read-only so that no changes happen to your current database

Setup database read-only

 

4. Perform full back of your database

SNAGHTML18d2c93

5. Take your backup and move to your SharePoint 2010 environment and open SQL Server 2008 Management Studio
- Restore SharePoint 2007 database which you back up

Restore databae in SQL Server 2008

SharePoint 2007 database is restored to SQL Server 2008 in SharePoint 2010 environment

image

6. Current SharePoint 2010 Site

image

7. open SharePoint 2010 Central Administration to unlick current content database
    Central Administration > Application Management > Manage Content Databases

Manage Content Database in SharePoint 2010

8. Click on database and scroll down where it says remove content database

Remove Content Database ( removing content database is not deleting a database)
Use this section to remove a content database from the server farm. When you select the Remove content database check box and click OK, the database is no longer associated with this Web application. Caution: When you remove the content database, any sites listed in that content database are removed from the server farm, but the site data remains in the database.

remove content database from SharePoint 2010

Click OK to remove the database

removed content database from SharePoint 2010

 

9. Next open SharePoint 2010 Management Shell and test your database

test-spcontentdatabase –name –YourDatabaseName –webapplicaiton YourSiteName

test-spcontentdatabase –name –sp2007_content_db –webapplicaiton http://YourSite

test-spcontentdatabase

Since I don`t have any Upgrade Blocking, I am good to go and mount the database

mount-spcontentdatabase name sp2007_content_db –databaseserver SQLServerName –webapplication  http://YourSite

mount-spcontentdatabase

Mounting database to SharePoint 2010 completed

mount-spcontentdatabase completes

 

10. Now go back to Central Administration > Application Management > Manage Content Databases and refresh.
You should see your new database which you mounted

Mounted Database in SharePoint 2010

 

11. Let`s open SharePoint 2010 site and see the contents which we moved to SharePoint 2010. 

SNAGHTML1c94256

The reason I am not able to see any content because of the message which I got in step 9

SNAGHTML1b2410d

 

In my next blog, I am going to speak about how you can fix above error messages.

Download SQL Server 2008 Service Pack 3


Overview  : Download SQL Server 2008 Services Pack 3

Microsoft SQL Server 2008 Service Pack 3 (SP3) is now available for download. While keeping product changes contained, we have made significant investments to ease deployment and management of Service Packs. A few key enhancements for customers in Microsoft SQL Server 2008 Service Pack 3 are :

  • Enhanced upgrade experience from previous versions of SQL Server to SQL Server 2008 SP3. In addition, we have increased the performance & reliability of the setup experience.
  • In SQL Server Integration Services logs will now show the total number of rows sent in Data Flows.
  • Enhanced warning messages when creating the maintenance plan if the Shrink Database option is enabled.
  • Resolving database issue with transparent data encryption enabled and making it available even if certificate is dropped.
  • Optimized query outcomes when indexed Spatial Data Type column is referenced by DTA (Database Tuning Advisor).
  • Superior user experience with Sequence Functions (e.g Row_Numbers()) in a Parallel execution plan.

Microsoft SQL Server 2008 Service Pack 2 is not a prerequisite for installing SQL Server 2008 Service Pack3. These packages may be used to upgrade any of the following editions of SQL Server 2008:

  • Enterprise
  • Standard
  • Evaluation
  • Developer
  • Workgroup

Download SQL Server 2008 Services Pack 3

Checking SQL Server current process


What’s currently going on on the SQL Server, who is executing which query or fetches a few thousands of rows and slowing down the server with it?
With this Transact-SQL script you can list all processes with their SQL statements.

Additional you get the cummulative values of IO / CPU usage and the row count of the last statement execution.

Script Source: http://gallery.technet.microsoft.com/scriptcenter/Current-processes-and-d9b4c8d9

End Results in SQL Server

Checking SQL Server Current Status

SQL Server 2008 R2 Best Practices Analyzer


The Microsoft SQL Server 2008 R2 BPA is a diagnostic tool that performs the following functions:

  • Gathers information about a Server and a Microsoft SQL Server 2008 or 2008 R2 instance installed on that Server
  • Determines if the configurations are set according to the recommended best practices
  • Reports on all configurations, indicating settings that differ from recommendations
  • Indicates potential problems in the installed instance of SQL Server
  • Recommends solutions to potential problems

Download SQL Server 2008 Best Practices Analyzer

Microsoft SQL Server 2008 R2 BPA

Microsoft SQL Server 2008 Upgrade Advisor


Download the Microsoft SQL Server 2008 Upgrade Advisor. Upgrade Advisor analyzes instances of SQL Server 2000 and SQL Server 2005 to help you prepare for upgrades to SQL Server 2008.

Overview

Microsoft SQL Server 2008 Upgrade Advisor analyzes instances of SQL Server 2000 and SQL Server 2005 in preparation for upgrading to SQL Server 2008. Upgrade Advisor identifies feature and configuration changes that might affect your upgrade, and it provides links to documentation that describes each identified issue and how to resolve it.

Download Microsoft SQL Server 2008 Upgrade Advisor

Testing SQL Connection from Local Computer


1. Open notepad and save the file as connection.udl

connection

2. Now you will have a file in called connection.udl

udl

3. Open connection.udl file and enter your server name and user name/password to test your SQL connection

test-sql-connection

SAN Storage Best Practices for SQL Server


Source: How to Connect SQL Servers to the SAN

How to Connect SQL Servers to the SAN

The term SAN gets misused a lot because it really means Storage Area Network – the communication pipelines between your server and a magic black box called a SAN controller.  That controller is the configurable hardware that manages RAID levels, caching, and more.  Here, we’re talking about how we plug your SQL Server into the network (SAN) itself, and how it gets there is called pathing.  Here’s my articles on it:

Source: How to Connect SQL Servers to the SAN

How to create Read-Only Database User in SQL Server 2008?


How do you give permission to a database in SQL server to a QA or someone who wants to have read only access?
In SQL server 2008, if you want to give read only access to the database for a person, do the following steps

1. Create a new login which is going to have read only access to the database
Right click and click on New Login

image

2. Add the users from Active Directory

Adding users to SQL server

3. Click on User Mapping and Select the database which you wan to give read access below Users Mapped to this login:
and select Database Role membership as public and db_datareader

Read Only Access to SQL Database

Above setup will allow the users to have database reader access to SQL server

How to open table in SQL 2008


What happen to open table in SQL 2008 and how do I open a table in SQL 2008?
In SQL 2008, to open a table you need to Right Click table which you want to open and select edit top 200 rows

Open table in SQL 2008

The reason it got changed this way in SQL 2008 is that in previous version users are opening hug tables and it slows down the SQL performance.
In this way it will only allow you to open top 200 rows.

Moving SharePoint Data Files to Different Location


Current Situations:
When SharePoint installed, all the data/log files are kept in default (C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data) location. Now the data is growing and C Drive is running out of space.

Solutions:
Move the data/log files to a drive where you have lot’s of space

1. Backup your entire database which you’re planning to move
2. Turn off SharePoint Services

Office SharePoint Search Service
Windows SharePoint Services Administration
Windows SharePoint Services Search
Windows SharePoint Services Timer
Windows SharePoint Services Tracing
World Wide Web Publishing Service

trun_off_sharepoint_services

turn_off_office_sharepoint_server_search

3. Detach the databases

detach_database_from_sql

clip_image004

Leave all the settings as it is and click OK to detach the database

4. Copy your data/log files from current location and move to destination drive

5. Reattach your databases
Attrach Database in SQL Server

Click add to select the files

Attrach Database in SQL Server Add Files

Click Add and select the location where you moved your database files

clip_image008

once you’re select your database files, Click OK to attach

6. Test your site and if everything’s works fine you can delete the files from old location

7. Start all the services which you stopped.

Connecting Visual Studio to SharePoint 2010


How to connect to a SharePoint 2010 server which is a another server in a same domain using developer computer?
If you have many developer trying to connect to SharePoint server 2010 using Visual Studio, you need to provide sysadmin permission in SQL Server

1. Go to your SharePoint SQL Server and all your developers name

sql-users

2. Make them as sysadmin 

permissions

3. Ask them to open their Visual Studio and create a new SharePoint 2010 project. Let them enter the SharePoint URL

VStudioConnect

4. Now they should able to connect to SharePoint server which is a another server in the same domain

SpProject

Follow

Get every new post delivered to your Inbox.

Join 109 other followers