<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Sriram's 2 Cents</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/sriramg/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/sriramg/feed.xml</link>
    <description />
    <lastBuildDate>Tue, 16 Apr 2019 05:30:00 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Happy New Year 2013</title>
      <link>https://docs.microsoft.com/archive/blogs/sriramg/happy-new-year-2013</link>
      <pubDate>Tue, 01 Jan 2013 23:59:25 GMT</pubDate>
      <dc:creator><![CDATA[sriramgmsft]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sriramg/2013/01/01/happy-new-year-2013/</guid>
      <description><![CDATA[]]></description>
      <content:encoded><![CDATA[]]></content:encoded>
    </item>
    <item>
      <title>Some SQL Server Licensing Scenarios</title>
      <link>https://docs.microsoft.com/archive/blogs/sriramg/some-sql-server-licensing-scenarios</link>
      <pubDate>Mon, 20 Jun 2011 13:20:27 GMT</pubDate>
      <dc:creator><![CDATA[sriramgmsft]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sriramg/2011/06/20/some-sql-server-licensing-scenarios/</guid>
      <description><![CDATA[&#160;  I recently was asked about licensing SQL Server in the following two scenarios that may be...]]></description>
      <content:encoded><![CDATA[<p>&#160;</p>  <p>I recently was asked about licensing SQL Server in the following two scenarios that may be confusing at times</p>  <ul>   <li><strong>Can i only license a portion of the physical processors for SQL Server by restricting SQL Server’s usage of the processors by using the Affinity Mask option:</strong></li> </ul>  <p>No, you have to license all the processors. The only time you license a portion of the processors is if you are in a virtual environment where only a subset of the processors are assigned to the VM or if the machine is hardware partitioned so the OS only sees a subset of the processors.</p>  <p>The following link although created for SQL 2000 still applies and answers this question:</p>  <p><a href="https://download.microsoft.com/download/9/2/3/9237f42f-ad7c-420e-968c-0345007168e9/per_processor.doc">https://download.microsoft.com/download/9/2/3/9237f42f-ad7c-420e-968c-0345007168e9/per_processor.doc</a></p>  <p>The last question answers this, pasted below:</p>  <p>QUESTION: I use “affinity masking” in SQL 2000 Server to restrict SQL to a subset of the processors on a server. I don’t employ partitioning or virtualization technology. Can I license only those processors to which I have “affinitized” SQL? </p>  <p>ANSWER:<strong> </strong>No – While affinity masks link threaded operations of software like SQL Server to particular processors in a server, they do not link threaded operations that are executed by the operating system on behalf of SQL Server to specific processors. In other words, affinity masking does not isolate operating system copies from processors. All server applications, like SQL Server, are installed on specific operating system copies, and the operating system copies utilize the power of processors beyond those specifically linked in the affinity mask. Like other resource-management methods, affinity masking does not isolate processors from an operating system, and hence does not reduce the need for those processors to be licensed.</p>  <p>The SQL affinity setting is deprecated and will be removed in a future version of SQL Server, look at this BOL topic: <a href="https://msdn.microsoft.com/en-us/library/ms187104.aspx">https://msdn.microsoft.com/en-us/library/ms187104.aspx</a></p>  <p>&#160;</p>  <ul>   <li><strong>How to license SQL Server Reporting Services in a scale-out deployment model?</strong> </li> </ul>  <p>You have to license each of the servers in the farm for a SQL Server EE license as they are all used and running active workloads (i.e. not specifically for DR scenarios like log shipping, passive cluster).&#160; </p>  <p>Please refer to the attached licensing guide, page 46 that states this clearly: <a title="Licensing Guide" href="https://download.microsoft.com/download/6/F/8/6F84A9FE-1E5C-44CC-87BB-C236BFCBA4DF/SQLServer2008_LicensingGuide.pdf">Licensing Guide</a></p>]]></content:encoded>
    </item>
    <item>
      <title>SQL Server Benchmark tools and stress testing tools</title>
      <link>https://docs.microsoft.com/archive/blogs/sriramg/sql-server-benchmark-tools-and-stress-testing-tools</link>
      <pubDate>Mon, 20 Jun 2011 13:08:14 GMT</pubDate>
      <dc:creator><![CDATA[sriramgmsft]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sriramg/2011/06/20/sql-server-benchmark-tools-and-stress-testing-tools/</guid>
      <description><![CDATA[This is a FAQ and I recently collected information based on some available resources:  The following...]]></description>
      <content:encoded><![CDATA[<p>This is a FAQ and I recently collected information based on some available resources:</p>  <p>The following Books-online topic talks about the in-built SQL Server tools to collect performance data so you can create a baseline and also identify performance issues:</p>  <p>Monitoring tools that comes with SQL Server: <a href="https://msdn.microsoft.com/en-us/library/ms191511.aspx">https://msdn.microsoft.com/en-us/library/ms191511.aspx</a></p>  <p>The Disk I/O subsystem is the most important component that needs to be tested for optimal performance when working with SQL Server applications, the following article talks about a tool called SQLIO that’s a great resources to help test your I/O subsystem and more importantly collect benchmarks about the same:</p>  <p>Predeployment I/O best practices: <a href="https://msdn.microsoft.com/en-us/library/cc966412.aspx">https://msdn.microsoft.com/en-us/library/cc966412.aspx</a></p>  <p>The following two articles talk about methodology for setting up a test environment that are worth reading:</p>  <p>Stress testing methodology: <a href="https://www.sqlservercentral.com/articles/Miscellaneous/2634/">https://www.sqlservercentral.com/articles/Miscellaneous/2634/</a></p>  <p>Setting up a stress testing environment: <a href="https://www.sql-server-performance.com/2005/stress-test-part3/">https://www.sql-server-performance.com/2005/stress-test-part3/</a></p>  <p><b>I am including a few other tools below that may be good alternatives as well:</b></p>  <p>This is not a free tool but looks very comprehensive and may do all of the above, I haven’t used it personally but some customers have: Quest tool: <a href="https://www.quest.com/benchmark-factory/">https://www.quest.com/benchmark-factory/</a></p>  <p>This is another 3<sup>rd</sup> party free tool that I found: SQL Stress: <a href="https://www.sqlstress.com/">https://www.sqlstress.com/</a></p>  <p>In the next version of SQL Server code named Denali, we will have a high fidelity tool to setup a replay environment in a distributed fashion. CTP1 of Denali includes this tool which you can play with today, see this link to download and learn more about this tool: </p>  <p>Denali Distributed Replay: <a href="https://msdn.microsoft.com/en-us/library/ff878304(SQL.110).aspx">https://msdn.microsoft.com/en-us/library/ff878304(SQL.110).aspx</a></p>  <p>Finally, the following tool is used for upgrade testing but can also be used for creating replay environments, it is similar to the tool above that will come in Denali but uses the SQL Trace and Profiler Replay features which can only use one client at a time: Scalability Experts Upgrade Assistant: <a href="https://www.scalabilityexperts.com/tools/downloads.html">https://www.scalabilityexperts.com/tools/downloads.html</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Building Private Clouds with SQL Server</title>
      <link>https://docs.microsoft.com/archive/blogs/sriramg/building-private-clouds-with-sql-server</link>
      <pubDate>Thu, 09 Jun 2011 07:28:51 GMT</pubDate>
      <dc:creator><![CDATA[sriramgmsft]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sriramg/2011/06/09/building-private-clouds-with-sql-server/</guid>
      <description><![CDATA[Microsoft released a reference architecture to build a Private Cloud to consolidate your database...]]></description>
      <content:encoded><![CDATA[<p>Microsoft released a reference architecture to build a Private Cloud to consolidate your database environment, for details refer to: <a title="https://www.microsoft.com/sqlserver/en/us/solutions-technologies/cloud-computing/private-cloud.aspx" href="https://www.microsoft.com/sqlserver/en/us/solutions-technologies/cloud-computing/private-cloud.aspx">https://www.microsoft.com/sqlserver/en/us/solutions-technologies/cloud-computing/private-cloud.aspx</a></p>  <p>We will also be releasing an appliance version of the above soon which is essentially a private cloud in a box</p>]]></content:encoded>
    </item>
    <item>
      <title>My first post from MSDN Broadcaster</title>
      <link>https://docs.microsoft.com/archive/blogs/sriramg/my-first-post-from-msdn-broadcaster</link>
      <pubDate>Wed, 08 Jun 2011 20:42:26 GMT</pubDate>
      <dc:creator><![CDATA[sriramgmsft]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sriramg/2011/06/08/my-first-post-from-msdn-broadcaster/</guid>
      <description><![CDATA[I am including the below podcast link from MSDN Broadcaster about SQL Azure – check it out:...]]></description>
      <content:encoded><![CDATA[<p>I am including the below podcast link from MSDN Broadcaster about SQL Azure – check it out:</p>   <div id="PreviewDiv">   <h5><a href="https://www.microsoftbroadcaster.com/en-US/Content/Link/20010?WT.z_cType=PC&amp;WT.z_cSource=MSP" target="_blank">What does &quot;IT as a Service&quot; Mean in Regard to SQL Azure?</a> </h5>   <a href="https://www.microsoftbroadcaster.com/en-us/Content/Media/20010?WT.z_cType=PC&amp;WT.z_cSource=MSP" target="_blank"><img style="margin: 2px; float: left" src="https://www.microsoftbroadcaster.com/App_Themes/MS/images/podcast.png" width="50" height="50" /></a>     <p>Explains how SQL Azure enables you to provide a database platform as a service. </p> </div>]]></content:encoded>
    </item>
    <item>
      <title>Microsoft Desktop Player</title>
      <link>https://docs.microsoft.com/archive/blogs/sriramg/microsoft-desktop-player</link>
      <pubDate>Wed, 08 Jun 2011 20:41:28 GMT</pubDate>
      <dc:creator><![CDATA[sriramgmsft]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sriramg/2011/06/08/microsoft-desktop-player/</guid>
      <description><![CDATA[This is a great tool for you to search for relevant information on Microsoft properties all...]]></description>
      <content:encoded><![CDATA[<p>This is a great tool for you to search for relevant information on Microsoft properties all aggregated to single convenient location. </p>  <p>The Microsoft Desktop Player delivers contextual content aggregated across Microsoft properties that is mapped to an IT Pro or Developer IT Pro Adoption lifecycle. Users can view it online or download the WPF application to view offline. </p>  <p><b>“Key Features” </b></p>  <p><b></b></p>  <p>· Offline and Online Player showcasing the power of Microsoft Platform choice via both in browser and out of browser experiences.</p>  <p>· Contextual relevant content surfaced&#160; depending on IT Adoption Lifecycle by selecting the right filters.</p>  <p>· Local ITE and DE connection – The player surfaces your local DE or ITE based on the user profile. </p>  <p>· MSDN and TechNet Events integration <a href="https://www.msdnevents.com">www.msdnevents.com</a>, <a href="https://www.technetevents.com">www.technetevents.com</a></p>  <p>· Local Community events integration.</p>  <p>· Local CPLS integration to find the best place to get your Microsoft Training.</p>  <p><b></b></p>  <p><b>URL </b></p>  <p><b></b></p>  <p><b>Online&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; : <a href="https://www.microsoft.com/click/desktopplayer">www.microsoft.com/click/desktopplayer</a> </b></p>  <p><b>Downloadable version :&#160;&#160; </b><a href="https://download.microsoft.com/download/6/4/5/645D41E4-C48A-431D-9EAC-73D1A1901D29/MicrosoftDesktopPlayer.msi">https://download.microsoft.com/download/6/4/5/645D41E4-C48A-431D-9EAC-73D1A1901D29/MicrosoftDesktopPlayer.msi</a></p>]]></content:encoded>
    </item>
    <item>
      <title>MSDN Broadcaster</title>
      <link>https://docs.microsoft.com/archive/blogs/sriramg/msdn-broadcaster</link>
      <pubDate>Wed, 08 Jun 2011 20:40:00 GMT</pubDate>
      <dc:creator><![CDATA[sriramgmsft]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sriramg/2011/06/08/msdn-broadcaster/</guid>
      <description><![CDATA[I am going to start using MSDN Broadcaster to start publishing content to this blog, if you are a...]]></description>
      <content:encoded><![CDATA[<p>I am going to start using MSDN Broadcaster to start publishing content to this blog, if you are a blog writer you should definitely try this service out, it is amazing: <b><a href="https://www.microsoftbroadcaster.com">www.microsoftbroadcaster.com</a></b></p>  <p>Microsoft Broadcaster enables&#160; IT Pro and Developer bloggers, user groups leads and IT Departments to download key Technical content ( Webcasts, podcasts, white papers) aggregated across Microsoft assets that are relevant to the IT Pro and Developer adoption lifecycle and <b>embedding them in their own sites/blogs/internal training</b> for richer content postings.</p>  <p><b>Key Features of Microsoft Broadcaster include:</b></p>  <p>· Permission and ability to download and embed content on your sites without sending traffic away from your site.</p>  <p>· Customize by product e.g. Windows®, SharePoint®, Microsoft Office </p>  <p>· Customize content by keyword.</p>  <p>· Customize content by form factor e.g. webcasts, videos, podcasts</p>  <p>· Set alerts for content updates</p>  <p><b>URL&#160;&#160; : <a href="https://www.microsoftbroadcaster.com">www.microsoftbroadcaster.com</a></b></p>]]></content:encoded>
    </item>
    <item>
      <title>Moving FileStream data to new location</title>
      <link>https://docs.microsoft.com/archive/blogs/sriramg/moving-filestream-data-to-new-location</link>
      <pubDate>Thu, 03 Jun 2010 08:47:05 GMT</pubDate>
      <dc:creator><![CDATA[sriramgmsft]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sriramg/2010/06/03/moving-filestream-data-to-new-location/</guid>
      <description><![CDATA[SQL Server 2008 introduces File Stream data type that lets you store BLOB data in an efficient...]]></description>
      <content:encoded><![CDATA[<p>SQL Server 2008 introduces File Stream data type that lets you store BLOB data in an efficient manner. One of the issues with this data type is there is no easy way to do space management. What happens if you run out of space on the drive that you designated for storing the BLOBs using FileStream? There are a few different ways mentioned below to move this to a new location:</p>  <p><strong>Option 1: Backup and restore file group to a new location</strong> – This option is the simplest and will back up the existing filestream file group and will restore on to the new location/drive that has more disk space.</p>  <p><strong>Option 2: Detach and Attach database</strong> – This option will detach the database and then you physically move the files to the new location, then attach the database</p>  <p><strong>Option 3: Create a new file group in the new location</strong> – This option lets you create a new file group in the new location and then you drop and recreate the clustered index in the new location – this is similar to option 2 except instead of taking the whole database offline, you only affect the particular table</p>  <p><strong>Option 4: Partitioning</strong> – In this option, you use table partitioning to create separate file groups for the filestream data based on a partition key. As the need to move the data to a new drive arises, you can simple create a new partition in that location. This option will require you to keep both the old and new locations intact as the data is spread amongst them. In the previous 3 options, you can get rid of the old location since the entire data is moved tot the new location. I have included an example of partitioning in the attached script, this white paper also has a section in the end that talks about the same and a technique to do load balance filestream data onto multiple volumes: <a href="https://msdn.microsoft.com/en-us/library/cc949109.aspx">https://msdn.microsoft.com/en-us/library/cc949109.aspx</a></p>  <p>&#160;</p>  <p>Here is the SQL script that has a sample of the above 4 options, you need to change the database file locations before you can run it on your SQL Server:</p>  <p>-- Create the FileStream database with a default primary filegroup and another one for the filestream data </p>  <p>Use Master   <br />GO    <br />IF EXISTS (SELECT name FROM sys.databases WHERE name = N'FileStreamDB')    <br />DROP DATABASE FileStreamDB    <br />GO </p>  <p>USE master   <br />GO    <br />CREATE DATABASE [FileStreamDB] ON PRIMARY     <br />( NAME = N'FileStreamDB', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.TWOK8\MSSQL\DATA\FileStreamDB.mdf',     <br />SIZE = 10MB , MAXSIZE = UNLIMITED, FILEGROWTH = 10% )    <br />LOG ON     <br />( NAME = N'FileStreamDB_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.TWOK8\MSSQL\DATA\FileStreamDB_log.ldf' ,     <br />SIZE = 10MB , MAXSIZE = UNLIMITED , FILEGROWTH = 10%)    <br />GO    <br />ALTER DATABASE [FileStreamDB]     <br />ADD FILEGROUP [FileStreamGroup] CONTAINS FILESTREAM     <br />GO    <br />ALTER DATABASE [FileStreamDB]     <br />ADD FILE (NAME = N'FileStreamDB_FSData', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.TWOK8\MSSQL\DATA\FileStreamData')    <br />TO FILEGROUP FileStreamGroup    <br />GO </p>  <p>Use FileStreamDB   <br />Go </p>  <p>-- Create the table with filestream data </p>  <p>create table dbo.Files   <br />(FileId UNIQUEIDENTIFIER NOT NULL ROWGUIDCOL UNIQUE,    <br />[FileContents] varbinary (max) FILESTREAM DEFAULT NULL,    <br />[FileNum] int identity (1,1) PRIMARY KEY) </p>  <p>-- Use T-SQL to upload a row of data to the table </p>  <p>declare @img as varbinary(max)   <br />select @img = CAST(bulkcolumn AS Varbinary(max)) from openrowset (BULK 'C:\SQLTSTechnical\SQL08Demos\FileStream\tulips.jpg', single_blob) as x    <br />Insert into dbo.Files(Fileid, FileContents) select newid(),@img </p>  <p>-- Make sure the row is there </p>  <p>select * from dbo.Files </p>  <p>------ Moving FileStreamData </p>  <p>------- Option 1: Backup filegroup and restore to new location </p>  <p>-- Do a full backup first </p>  <p>backup database FileStreamDB TO DISK = 'c:\temp\DataBack.bak' </p>  <p>-- You have to backup the log to do partial restore later </p>  <p>backup log filestreamdb to disk = 'c:\temp\DataBack.trn' </p>  <p>Use master   <br />Go </p>  <p>-- Restore the primary filegroup first </p>  <p>restore database filestreamdb filegroup = 'Primary' FROM DISK = 'c:\temp\DataBack.bak' </p>  <p>-- Restore the filestream filegroup and move it to the new location </p>  <p>restore database filestreamdb filegroup = 'FileStreamGroup' FROM DISK = 'c:\temp\DataBack.bak' WITH MOVE 'FileStreamDB_FSData' TO 'd:\temp', REPLACE </p>  <p>-- Check to see all the file groups are online </p>  <p>Use FileStreamDB   <br />Go </p>  <p>SELECT    <br />file_id AS FileID,     <br />file_guid AS FileGUID,     <br />type_desc AS FileType,    <br />name AS Name,     <br />physical_name AS PhysicalName,     <br />state_desc AS State    <br />FROM FileStreamDB.sys.database_files    <br />GO </p>  <p>-- Insert a row again </p>  <p>declare @img as varbinary(max)   <br />select @img = CAST(bulkcolumn AS Varbinary(max)) from openrowset (BULK 'C:\SQLTSTechnical\SQL08Demos\FileStream\tulips.jpg', single_blob) as x    <br />Insert into dbo.Files(Fileid, FileContents) select newid(),@img </p>  <p>-- Make sure the row is inserted right and then check to see if this is inserted into the new location </p>  <p>select * from dbo.Files </p>  <p>------&#160; Option 2: Detach Database and Re-attach database specifying file group in new location after&#160; <br />------- physically copying files to new location </p>  <p>--- Detach the database first </p>  <p>USE [master]   <br />GO    <br />ALTER DATABASE [FileStreamDB] SET SINGLE_USER WITH ROLLBACK IMMEDIATE    <br />GO    <br />USE [master]    <br />GO    <br />EXEC master.dbo.sp_detach_db @dbname = N'FileStreamDB'    <br />GO </p>  <p>-- Physically move the filestream files to the new location - in this example, moving it back to the C drive from the D drive    <br />-- Re-attach the database specifying the new location for the file stream file group </p>  <p>USE [master]   <br />GO    <br />CREATE DATABASE [FileStreamDB] ON     <br />( FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.TWOK8\MSSQL\DATA\FileStreamDB.mdf' ),    <br />( FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.TWOK8\MSSQL\DATA\FileStreamDB_log.ldf' ),    <br />FILEGROUP [FileStreamGroup] CONTAINS FILESTREAM DEFAULT     <br />( NAME = N'FileStreamDB_FSData', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.TWOK8\MSSQL\DATA\FileStreamData' )    <br />FOR ATTACH    <br />GO </p>  <p>-- Option 3: Drop and recreate cluster index after adding a new file group   <br />-- This option works only if you have a clustered index on a column other than the rowguid column </p>  <p>-- Add a new file group first </p>  <p>USE [master]   <br />GO </p>  <p>ALTER DATABASE [FileStreamDB] ADD FILEGROUP [FileStreamGroup2] CONTAINS FILESTREAM </p>  <p>-- The below is the key step, you have to make the new filegroup the default </p>  <p>ALTER DATABASE [FileStreamDB] MODIFY FILEGROUP [FileStreamGroup2] DEFAULT </p>  <p>-- Add a file to the newly created filegroup </p>  <p>ALTER database [FileStreamDB]   <br />ADD FILE    <br />(    <br />&#160;&#160;&#160; NAME= 'FileStreamDB_FSData2',    <br />&#160;&#160;&#160; FILENAME = 'd:\temp'    <br />)    <br />TO FILEGROUP FileStreamGroup2    <br />GO </p>  <p>Use FileStreamDB   <br />Go </p>  <p>-- Look at sys.indexes to find the name of the clustered index to drop </p>  <p>select * from sys.indexes </p>  <p>-- Drop the index </p>  <p>ALTER TABLE dbo.files DROP CONSTRAINT PK__Files__0BBA21387F60ED59 </p>  <p>-- Add the clustered index back, since filestreamgroup2 is the new default filegroup for filestream, the image data will be located here and all new images will also go here </p>  <p>ALTER TABLE dbo.files ADD CONSTRAINT PKCLUS PRIMARY KEY CLUSTERED (FileNum)   <br />Go </p>  <p>-- Insert a new row of data, this should insert into the new location for filestream </p>  <p>declare @img as varbinary(max)   <br />select @img = CAST(bulkcolumn AS Varbinary(max)) from openrowset (BULK 'C:\SQLTSTechnical\SQL08Demos\FileStream\tulips.jpg', single_blob) as x    <br />Insert into dbo.Files(Fileid, FileContents) select newid(),@img </p>  <p>select * from dbo.Files </p>  <p>-- Option 4: Partition the table and create new partitions in a different location to change the location of the file stream data </p>  <p>Use Master   <br />GO    <br />IF EXISTS (SELECT name FROM sys.databases WHERE name = N'FileStreamDB')    <br />DROP DATABASE FileStreamDB    <br />GO </p>  <p>-- Creating the FileStreamDB again - </p>  <p>USE master   <br />GO    <br />CREATE DATABASE [FileStreamDB] ON PRIMARY     <br />( NAME = N'FileStreamDB', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.TWOK8\MSSQL\DATA\FileStreamDB.mdf',     <br />SIZE = 10MB , MAXSIZE = UNLIMITED, FILEGROWTH = 10% )    <br />LOG ON     <br />( NAME = N'FileStreamDB_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.TWOK8\MSSQL\DATA\FileStreamDB_log.ldf' ,     <br />SIZE = 10MB , MAXSIZE = UNLIMITED , FILEGROWTH = 10%)    <br />GO </p>  <p>-- Add a file group for filestream data </p>  <p>ALTER DATABASE [FileStreamDB]    <br />ADD FILEGROUP [FileStreamGroup] CONTAINS FILESTREAM     <br />GO    <br />ALTER DATABASE [FileStreamDB]     <br />ADD FILE (NAME = N'FileStreamDB_FSData', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.TWOK8\MSSQL\DATA\FileStreamData')    <br />TO FILEGROUP FileStreamGroup    <br />GO </p>  <p>-- Create a simple partition function - All values upto 100 will be in the first partition and 100 &amp; above will be in the second </p>  <p>CREATE PARTITION FUNCTION Mypartfunc1 (int) AS   <br />RANGE LEFT FOR VALUES (100)    <br />GO </p>  <p>-- Add 2 new filegroups and 2 secondary files for the structured data </p>  <p>ALTER DATABASE [FileStreamDB] ADD FILEGROUP [Primary1]   <br />ALTER DATABASE [FileStreamDB] ADD FILEGROUP [Primary2] </p>  <p>ALTER DATABASE [FileStreamDB] ADD FILE (   <br />&#160;&#160;&#160;&#160;&#160;&#160; NAME = Primary1File,    <br />&#160;&#160;&#160;&#160;&#160;&#160; FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL10.TWOK8\MSSQL\DATA\Primary1.ndf')    <br />TO FILEGROUP Primary1;    <br />GO </p>  <p>ALTER DATABASE [FileStreamDB] ADD FILE (   <br />&#160;&#160;&#160;&#160;&#160;&#160; NAME = Primary2File,    <br />&#160;&#160;&#160;&#160;&#160;&#160; FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL10.TWOK8\MSSQL\DATA\Primary2.ndf')    <br />TO FILEGROUP Primary2;    <br />GO </p>  <p>-- Create a partition scheme for the structured data </p>  <p>CREATE PARTITION SCHEME MyPartitionScheme1 AS   <br />PARTITION MyPartfunc1 TO([PRIMARY1],[PRIMARY2])    <br />GO </p>  <p>-- Create a partition scheme for the file stream data - note everything will go to the same filegroup for now </p>  <p>CREATE PARTITION SCHEME MyPartitionScheme2 AS   <br />PARTITION MyPartfunc1 TO([FileStreamGroup],[FileStreamGroup])    <br />GO </p>  <p>-- Create a table that uses the 2 partition schemes above </p>  <p>create table dbo.Files   <br />([FileId] UNIQUEIDENTIFIER NOT NULL ROWGUIDCOL UNIQUE ON PRIMARY1,    <br />[FileContents] varbinary (max) FILESTREAM DEFAULT NULL,    <br />[FileNum] int identity (1,1) PRIMARY KEY)    <br />ON MyPartitionScheme1(FileNum)     <br />FILESTREAM_ON MyPartitionScheme2 </p>  <p>-- select @@IDENTITY </p>  <p>-- Insert new data into the table </p>  <p>declare @img as varbinary(max)   <br />select @img = CAST(bulkcolumn AS Varbinary(max)) from openrowset (BULK 'C:\SQLTSTechnical\SQL08Demos\FileStream\tulips.jpg', single_blob) as x    <br />Insert into dbo.Files(Fileid, FileContents) select newid(),@img </p>  <p>-- Make sure the data is inserted right and check the physical location of the same   <br />select * from dbo.Files </p>  <p>-- Add a new filegroup and a file in a new location </p>  <p>ALTER DATABASE [FileStreamDB] ADD FILEGROUP [FileStreamGroup2] CONTAINS FILESTREAM </p>  <p>ALTER database [FileStreamDB]   <br />ADD FILE    <br />(    <br />&#160;&#160;&#160; NAME= 'FileStreamDB_FSData2',    <br />&#160;&#160;&#160; FILENAME = 'd:\temp'    <br />)    <br />TO FILEGROUP FileStreamGroup2    <br />GO </p>  <p>-- Change the partition scheme to include the new filegroup </p>  <p>ALTER PARTITION SCHEME MyPartitionScheme1   <br />NEXT USED Primary1 </p>  <p>ALTER PARTITION SCHEME MyPartitionScheme2   <br />NEXT USED FileStreamGroup2 </p>  <p>-- Create a new partition for values 51 and higher </p>  <p>ALTER PARTITION FUNCTION MyPartFunc1()   <br />SPLIT RANGE (50); </p>  <p>-- Manually reseed the identity value to 55 to test addition of new files going to the new location </p>  <p>DBCC CHECKIDENT(files, reseed, 55) </p>  <p>-- Insert new data into the table </p>  <p>declare @img as varbinary(max)   <br />select @img = CAST(bulkcolumn AS Varbinary(max)) from openrowset (BULK 'C:\SQLTSTechnical\SQL08Demos\FileStream\tulips.jpg', single_blob) as x    <br />Insert into dbo.Files(Fileid, FileContents) select newid(),@img </p>  <p>-- Make sure the data is inserted right and make sure this is in the new location </p>  <p>select * from dbo.Files</p>]]></content:encoded>
    </item>
    <item>
      <title>Oracle and SQL Server Interoperability options</title>
      <link>https://docs.microsoft.com/archive/blogs/sriramg/oracle-and-sql-server-interoperability-options</link>
      <pubDate>Tue, 18 Mar 2008 16:08:14 GMT</pubDate>
      <dc:creator><![CDATA[sriramgmsft]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sriramg/2008/03/18/oracle-and-sql-server-interoperability-options/</guid>
      <description><![CDATA[SQL Server provides various options for interoperating with Oracle  1) SSIS - Microsoft SQL Server...]]></description>
      <content:encoded><![CDATA[<p>SQL Server provides various options for interoperating with Oracle</p>  <p>1) <b>SSIS</b> - Microsoft SQL Server 2005 Integration Services (SSIS) is a platform for building high performance data integration solutions, including extraction, transformation, and load (ETL) packages for data warehousing.</p>  <p>Integration Services includes graphical tools and wizards for building and debugging packages; tasks for performing workflow functions such as FTP operations, for executing SQL statements, or for sending e-mail messages; data sources and destinations for extracting and loading data; transformations for cleaning, aggregating, merging, and copying data; a management service, the Integration Services service, for administering Integration Services; and application programming interfaces (APIs) for programming the Integration Services object model. Integration Services replaces Data Transformation Services (DTS), which was first introduced as a component of SQL Server 7.0.</p>  <p>The typical uses of Integration Services are: a) Merging data from heterogeneous data sources like Oracle, Teradata, Excel etc., b) Populating data warehouse and data marts, c) cleaning and standardizing data, d) building business intelligence into a data transformation process and d) automating administrative functions and data loading.</p>  <p>SSIS provides a modular architecture to create a workflow and to connect to various data sources including Oracle. SSIS can connect to the following sources out of the box: a) DataReader, b) Excel, c) Flat file, d)OLE DB, e) Raw file, f) Script Component, g) XML and to the following destinations &#8211; a)Data mining model, b) DataReader, c)Dimension processing, d) Excel , e) Flat file, f) OLE DB, g) Partition processing, h) Raw file, i) Recordset, j) Script component, k) SQL Server compact and k) SQL Server</p>  <p>There are various ODBC/OLEDB/.NET providers to connect to Oracle that are provided both by Microsoft and Oracle.</p>  <p>2) <b>Replication</b> - Replication is a set of technologies for copying and distributing data and database objects from one database to another and then synchronizing between databases to maintain consistency. Using replication, you can distribute data to different locations and to remote or mobile users over local and wide area networks, dial-up connections, wireless connections, and the Internet. Replication uses a publishing industry metaphor to represent the components in a replication topology, which include Publisher, Distributor, Subscribers, publications, articles, and subscriptions</p>  <p>Many businesses and organizations have data stored in databases from multiple vendors. Integrating this data is often a key component in allowing systems to work together in an organization. Replication allows you to integrate heterogeneous data in two ways:</p>  <p>a. Use Oracle as a source for data that can be replicated to Microsoft SQL Server, IBM, and Oracle databases: With Microsoft SQL Server 2005, you can include Oracle Publishers in your replication topology, starting with Oracle version 8.0.5. Publishing servers can be deployed on any Oracle supported hardware and operating system. The feature is built on the well-established foundation of SQL Server snapshot replication and transactional replication, providing similar performance and usability.</p>  <p>b. Use SQL Server as a source for data that can be replicated to IBM and Oracle databases: Subscriptions are supported for the two most recent versions of Oracle using the most recent version of the OLE DB provider.</p>  <p>3) <b>Linked Servers - </b>A linked server configuration enables SQL Server to execute commands against OLE DB data sources on remote servers. Linked servers offer the following advantages: Remote server access, The ability to issue distributed queries, updates, commands, and transactions on heterogeneous data sources across the enterprise,&#160; The ability to address diverse data sources similarly<b>.</b></p>  <p><b></b></p>  <p>Typically, linked servers are used to handle distributed queries. When a client application executes a distributed query through a linked server, SQL Server parses the command and sends requests to OLE DB. The rowset request may be in the form of executing a query against the provider or opening a base table from the provider. For a data source to return data through a linked server, the OLE DB provider (DLL) for that data source must be present on the same server as the instance of SQL Server. </p>  <p><b>4) </b><b>Data drivers for use in custom applications &#8211; </b>You can use the set of data drivers (OLEDB, ODBC, .NET) that are available to create a custom application for interoperating SQL Server and Oracle to give you the most flexibility at the cost of additional development if none of the above options suit your needs.<b></b></p>  <p>Click <a href="https://www.sqljunkies.com/WebLog/donald_farmer/archive/2005/03/13/8819.aspx">Here</a> for a good discussion on this topic</p>]]></content:encoded>
    </item>
    <item>
      <title>What's new in SQL 2008 Data Mining</title>
      <link>https://docs.microsoft.com/archive/blogs/sriramg/whats-new-in-sql-2008-data-mining</link>
      <pubDate>Tue, 18 Mar 2008 14:30:55 GMT</pubDate>
      <dc:creator><![CDATA[sriramgmsft]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sriramg/2008/03/18/whats-new-in-sql-2008-data-mining/</guid>
      <description><![CDATA[&#160;  Engine and algorithm improvements: To improve the accuracy and stability of some predictions...]]></description>
      <content:encoded><![CDATA[<p>&#160;</p>  <p>Engine and algorithm improvements: To improve the accuracy and stability of some predictions in time series models, a new algorithm has been added to the Microsoft Time Series algorithm. Based on the well-known ARIMA algorithm, the new algorithm provides better long-term predictions than the ARTxp algorithm that Analysis Services has been using. (ARTxp is an auto-regressive tree algorithm that is optimized for either a single time slice or short-term predictions.)</p>  <p>Enhanced mining structures: When creating a mining structure, you can now divide the data in the mining structure into permanent training and testing sets. The definition of the partition is stored with the structure, and you can reuse the test set with any mining models that are based on that structure.</p>  <p>You can now query data cached in a mining structure, much like you could query case detail from a model.</p>  <p>You can now attach filters to a mining model and use the filter during both training and testing. Applying a filter to the model lets you control the data that is used to train the model and lets you more easily assess the performance of the model on subsets of the data.</p>  <p>Cross-validation is an established method of assessing the accuracy of data mining models. In cross-validation, you iteratively partition the mining structure data into subsets, build models on the subsets, and then measure the accuracy of the model for each partition. By reviewing the returned statistics, you can determine how reliable the mining model is and more easily compare models that are based on the same structure. </p>  <p>Data Mining add-ins for Office 2007: Market Basket Analysis and Prediction Calculator have been added.</p>  <p>For more info: </p>  <p>What's New (Analysis Services - Data Mining): https://msdn2.microsoft.com/en-us/library/bb510513(SQL.100).aspx</p>]]></content:encoded>
    </item>
  </channel>
</rss>