<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3170035926071210582</id><updated>2012-01-25T10:31:59.318+04:00</updated><title type='text'>SQL Server</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://mimrsh.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3170035926071210582/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://mimrsh.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Mohammed Imran Shaikh</name><uri>http://www.blogger.com/profile/04935024731551151732</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>12</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3170035926071210582.post-7097492303041642948</id><published>2009-12-29T15:39:00.000+04:00</published><updated>2009-12-29T15:39:31.137+04:00</updated><title type='text'>Enable Large Memory Support in SQL Server</title><content type='html'>To enable SQL Server to utilize all available memory more than 3GB you need to make sure that the following options comply, &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1. /AWE is enable in boot.ini file&lt;br /&gt;&lt;br /&gt;2. /PAE is enable in boot.ini file&lt;br /&gt;&lt;br /&gt;3. &lt;a href="http://technet.microsoft.com/en-us/library/ms190961.aspx"&gt;AWE is enabled in SQL Server&lt;/a&gt;, and make sure from the server logs that it is enabled while server starts....&lt;br /&gt;&lt;br /&gt;4. &lt;a href="http://technet.microsoft.com/en-us/library/ms190730.aspx"&gt;Enabled the Lock Pages in Memory&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Also this is recommended to put max memory value to avoid OS to go under memory pressure, &lt;a href="http://www.sqlservercentral.com/blogs/glennberry/archive/2009/10/29/suggested-max-memory-settings-for-sql-server-2005_2F00_2008.aspx"&gt;Suggested Max Memory Settings for SQL Server 2005/2008&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3170035926071210582-7097492303041642948?l=mimrsh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mimrsh.blogspot.com/feeds/7097492303041642948/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3170035926071210582&amp;postID=7097492303041642948' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3170035926071210582/posts/default/7097492303041642948'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3170035926071210582/posts/default/7097492303041642948'/><link rel='alternate' type='text/html' href='http://mimrsh.blogspot.com/2009/12/enable-large-memory-support-in-sql.html' title='Enable Large Memory Support in SQL Server'/><author><name>Mohammed Imran Shaikh</name><uri>http://www.blogger.com/profile/04935024731551151732</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3170035926071210582.post-249515025053683044</id><published>2009-12-10T14:48:00.003+04:00</published><updated>2009-12-10T14:53:10.587+04:00</updated><title type='text'>Multicolumn Subquery in SQL Server</title><content type='html'>In Oracle and Other databases, there is a support of multicolumn subqueries like,&lt;br /&gt;&lt;br /&gt;select * from ATable where (Alpha, Beta) in (select alpha, beta from BTable)&lt;br /&gt;&lt;br /&gt;Same can be done by exists clause in SQL Server like&lt;br /&gt;&lt;br /&gt;Select * from ATable A where Exists (Select 1 from BTable B where B.Alpha = A.Alpha and B.Beta = A.Beta)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3170035926071210582-249515025053683044?l=mimrsh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mimrsh.blogspot.com/feeds/249515025053683044/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3170035926071210582&amp;postID=249515025053683044' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3170035926071210582/posts/default/249515025053683044'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3170035926071210582/posts/default/249515025053683044'/><link rel='alternate' type='text/html' href='http://mimrsh.blogspot.com/2009/12/multicolumn-subquery-in-sql-server.html' title='Multicolumn Subquery in SQL Server'/><author><name>Mohammed Imran Shaikh</name><uri>http://www.blogger.com/profile/04935024731551151732</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3170035926071210582.post-557241025054294873</id><published>2008-01-16T17:33:00.000+04:00</published><updated>2008-01-16T17:44:14.293+04:00</updated><title type='text'>Script Creating File Groups and Files for Database Partitioning</title><content type='html'>USE [master]&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;declare @FGName varchar(50)&lt;br /&gt;declare @FileName varchar(50)&lt;br /&gt;declare @dbName varchar(50)&lt;br /&gt;declare @Path varchar(50)&lt;br /&gt;&lt;br /&gt;Declare @FGStart int, @FGEnd int&lt;br /&gt;Declare @FileStart int, @FileEnd int&lt;br /&gt;&lt;br /&gt;Declare @FG int, @File int&lt;br /&gt;&lt;br /&gt;Set @DBName = 'MYDB'&lt;br /&gt;Set @FGName = @dbName + 'FG'&lt;br /&gt;Set @FileName = 'File'&lt;br /&gt;Set @Path = 'E:\SQL_DataFiles\FileGroups\'&lt;br /&gt;&lt;br /&gt;Set @FGStart = 1&lt;br /&gt;Set @FGEnd = 120&lt;br /&gt;&lt;br /&gt;Set @FileStart = 1&lt;br /&gt;Set @FileEnd = 4&lt;br /&gt;&lt;br /&gt;Set @FG = @FGStart&lt;br /&gt;&lt;br /&gt;Declare @Stmt varchar(400)&lt;br /&gt;&lt;br /&gt;While (@FG &lt;= @FGEnd)&lt;br /&gt;Begin&lt;br /&gt;            Set @Stmt = 'ALTER DATABASE [' + @dbName + '] ADD FILEGROUP [' + @FGName + Cast(@FG as Varchar(10)) + '] '&lt;br /&gt;            print @Stmt&lt;br /&gt;            print 'GO'&lt;br /&gt;           &lt;br /&gt;            Set @File = @FileStart&lt;br /&gt;            While (@File &lt;= @FileEnd)&lt;br /&gt;            Begin&lt;br /&gt;                        Set @Stmt = 'ALTER DATABASE [' + @dbName + '] ' +&lt;br /&gt;                                                            ' ADD FILE ( NAME = N''' + @FGName + Cast(@FG as Varchar(10)) + @FileName + Cast(@File as varchar(10)) + '''' +&lt;br /&gt;                                                            ' , FILENAME = N''' + @path + @FGName + Cast(@FG as Varchar(10)) +&lt;br /&gt;                                                            @FileName + Cast(@File as varchar(10)) + ''' , SIZE = 20480KB , FILEGROWTH = 20480KB ) TO FILEGROUP [' +&lt;br /&gt;                                                            @FGName + Cast(@FG as Varchar(10)) + '] '&lt;br /&gt;                        Print @Stmt&lt;br /&gt;                        print 'GO'&lt;br /&gt;                        set @File = @File + 1&lt;br /&gt;            End&lt;br /&gt;            set @FG = @FG + 1&lt;br /&gt;End&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;GO&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3170035926071210582-557241025054294873?l=mimrsh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mimrsh.blogspot.com/feeds/557241025054294873/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3170035926071210582&amp;postID=557241025054294873' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3170035926071210582/posts/default/557241025054294873'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3170035926071210582/posts/default/557241025054294873'/><link rel='alternate' type='text/html' href='http://mimrsh.blogspot.com/2008/01/script-creating-file-groups-and-files.html' title='Script Creating File Groups and Files for Database Partitioning'/><author><name>Mohammed Imran Shaikh</name><uri>http://www.blogger.com/profile/04935024731551151732</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3170035926071210582.post-5008147397313803355</id><published>2007-11-26T16:33:00.000+04:00</published><updated>2007-11-26T16:41:29.916+04:00</updated><title type='text'>Failed to Pause Catalog for Backup</title><content type='html'>Today I was trying to backup some database on one box, but there was some error with only one database.  It was Failed to pause catalog for backup, when I was searching for this error then found that Database is using Full Text Search Service, but the problem was only that the Full Text Search Service was not running, so in that case the solution is just to start Full text search service and take backup of those databases.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3170035926071210582-5008147397313803355?l=mimrsh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mimrsh.blogspot.com/feeds/5008147397313803355/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3170035926071210582&amp;postID=5008147397313803355' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3170035926071210582/posts/default/5008147397313803355'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3170035926071210582/posts/default/5008147397313803355'/><link rel='alternate' type='text/html' href='http://mimrsh.blogspot.com/2007/11/failed-to-pause-catalog-for-backup.html' title='Failed to Pause Catalog for Backup'/><author><name>Mohammed Imran Shaikh</name><uri>http://www.blogger.com/profile/04935024731551151732</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3170035926071210582.post-7106762900058851880</id><published>2007-11-10T10:11:00.000+04:00</published><updated>2007-11-10T13:11:42.487+04:00</updated><title type='text'>Insufficient System Resources... When growing database physical file</title><content type='html'>We had a very severe issue in our production,&lt;br /&gt;&lt;br /&gt;On Database:&lt;br /&gt;3.2 TB Size of Partitioned Database with 60 File Groups&lt;br /&gt;Every File Group contains One month data in its only one physical File.&lt;br /&gt;Physical Files are of different size between 10GB and 300GB.&lt;br /&gt;&lt;br /&gt;I was using this command to expand the physical file,&lt;br /&gt;&lt;br /&gt;ALTER DATABASE [ODS] MODIFY FILE ( NAME = N'ODSFG33File1', SIZE = 307200000KB )&lt;br /&gt; &lt;br /&gt;but was getting the following error,&lt;br /&gt;&lt;br /&gt;MODIFY FILE encountered operating system error 1450(Insufficient system resources exist to complete the requested service.) while attempting to expand the physical file.&lt;br /&gt;&lt;br /&gt;After trying a lot for this, the problem found that the physical file was highly fragmented, and offcourse the it was somehow exceeding the int variable capacity, which seems as created in the backend windows 2003 Server code,&lt;br /&gt;&lt;br /&gt;So, Let's move to the solution,&lt;br /&gt;&lt;br /&gt;Defrag the physical file using contig.exe&lt;br /&gt;-------OR&lt;br /&gt;Move the physical file to another network location, defrag the drive, and move file to its previous location&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3170035926071210582-7106762900058851880?l=mimrsh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mimrsh.blogspot.com/feeds/7106762900058851880/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3170035926071210582&amp;postID=7106762900058851880' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3170035926071210582/posts/default/7106762900058851880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3170035926071210582/posts/default/7106762900058851880'/><link rel='alternate' type='text/html' href='http://mimrsh.blogspot.com/2007/11/insufficient-system-resources-when.html' title='Insufficient System Resources... When growing database physical file'/><author><name>Mohammed Imran Shaikh</name><uri>http://www.blogger.com/profile/04935024731551151732</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3170035926071210582.post-4644387232253013388</id><published>2007-10-02T11:43:00.000+04:00</published><updated>2007-10-02T11:53:11.503+04:00</updated><title type='text'>Create Index on Partitioned Table</title><content type='html'>Index must be aligned on Partitioned Tables, In order to create index on Partitioned Table, DBA needs to identify, whether he want to create an index which will unique or it will allow duplicates,&lt;br /&gt;&lt;br /&gt;Unique Index:&lt;br /&gt;&lt;br /&gt;If the required Index is Unique then partitioning column must be part of index key columns&lt;br /&gt;&lt;br /&gt;Duplicate is ok:&lt;br /&gt;&lt;br /&gt;If the required Index is with duplicate ok, then no need to include the partitioning column in index key columns, Just specify columns and create index based on Partitioning Scheme&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3170035926071210582-4644387232253013388?l=mimrsh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mimrsh.blogspot.com/feeds/4644387232253013388/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3170035926071210582&amp;postID=4644387232253013388' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3170035926071210582/posts/default/4644387232253013388'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3170035926071210582/posts/default/4644387232253013388'/><link rel='alternate' type='text/html' href='http://mimrsh.blogspot.com/2007/10/create-index-on-partitioned-table.html' title='Create Index on Partitioned Table'/><author><name>Mohammed Imran Shaikh</name><uri>http://www.blogger.com/profile/04935024731551151732</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3170035926071210582.post-3298561423050298779</id><published>2007-09-26T13:17:00.000+04:00</published><updated>2007-09-26T13:23:24.008+04:00</updated><title type='text'>Agent XPs Disabled</title><content type='html'>Restarting SQL Server sometimes causes Agent XP disabled, so if you try to start then SQL Server Agent it will start and then immediately stop, but it will show you Agent XPs Disabled in brackets with Agent name, to confirm you can also run the following query,&lt;br /&gt;&lt;br /&gt;Select Name, Value from sys.Configurations Where name in ('Agent XPs','Show Advanced Options')&lt;br /&gt;&lt;br /&gt;If it is showing Agent XPs Value Zero then Use the following code to change it,&lt;br /&gt;&lt;br /&gt;exec sys.sp_configure @configname = N'show advanced options', @configvalue = 1&lt;br /&gt;reconfigure with override&lt;br /&gt;exec sys.sp_configure @configname = N'Agent XPs', @configvalue = 1&lt;br /&gt;reconfigure with override&lt;br /&gt;exec sys.sp_configure @configname = N'show advanced options', @configvalue = 0&lt;br /&gt;reconfigure with override&lt;br /&gt;&lt;br /&gt;After running the above line, just sit with patience or have a cup of coffee meanwhile because it will automatically starts Agent but will take 10 to 15 minutes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3170035926071210582-3298561423050298779?l=mimrsh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mimrsh.blogspot.com/feeds/3298561423050298779/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3170035926071210582&amp;postID=3298561423050298779' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3170035926071210582/posts/default/3298561423050298779'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3170035926071210582/posts/default/3298561423050298779'/><link rel='alternate' type='text/html' href='http://mimrsh.blogspot.com/2007/09/agent-xps-disabled.html' title='Agent XPs Disabled'/><author><name>Mohammed Imran Shaikh</name><uri>http://www.blogger.com/profile/04935024731551151732</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3170035926071210582.post-7174812454657610916</id><published>2007-09-22T12:03:00.000+04:00</published><updated>2007-09-24T13:12:11.499+04:00</updated><title type='text'>Database is in Transition</title><content type='html'>There are some transactions in process and you try to make database offline, then you will have to sit with patience while SQL Server successfully abort/commit all transactions on backend and make it offline successfully meanwhile if you will try to access the database then get the msg, "Database is in transition", if you cannot sit with patience then just kill the thread from Activity Monitor where you see the command alter database set flat offline the other option is to restart the sql server, but in case of restart, it will not give you control of database, after restart the database will go in auto recovery mode, but after some minutes and this successful recovery you will be able to do any operation on database.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3170035926071210582-7174812454657610916?l=mimrsh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mimrsh.blogspot.com/feeds/7174812454657610916/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3170035926071210582&amp;postID=7174812454657610916' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3170035926071210582/posts/default/7174812454657610916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3170035926071210582/posts/default/7174812454657610916'/><link rel='alternate' type='text/html' href='http://mimrsh.blogspot.com/2007/09/sql-server-is-in-transition.html' title='Database is in Transition'/><author><name>Mohammed Imran Shaikh</name><uri>http://www.blogger.com/profile/04935024731551151732</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3170035926071210582.post-7716429482636915812</id><published>2007-09-19T12:46:00.000+04:00</published><updated>2007-09-19T13:11:42.661+04:00</updated><title type='text'>Compression on Filegroups</title><content type='html'>Microsoft SQL Server offers compression on readonly filegroups in just simple steps,&lt;br /&gt;&lt;br /&gt;Make the Filegroup Readonly&lt;br /&gt;Make Database Offline&lt;br /&gt;Right click the file, Properties, Advanced, Check Compress Contents.... , Apply, OK&lt;br /&gt;Make Database Online&lt;br /&gt;&lt;br /&gt;It really save disk space, with a minimal impact on performance, I tried on small filegroup of 30GB, it works great, and got free space around 2/3 of actual size.&lt;br /&gt;But when tried on big filegroups of size 80GB and more then just got 10% compression, and system went into sleeping state and after waiting for a number of hours, I found on that in this case system can be restarted (only option), because cannot trace or catch sleeping or backend internal system threads, so i just restarted the system and got the control of file and made my production server up and running with safe recovery. Really excellent experience with a downtime of 48 hours, without big gain on storage. So please dont try this on your server if your files are of size larger than 40GB.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3170035926071210582-7716429482636915812?l=mimrsh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mimrsh.blogspot.com/feeds/7716429482636915812/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3170035926071210582&amp;postID=7716429482636915812' title='316 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3170035926071210582/posts/default/7716429482636915812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3170035926071210582/posts/default/7716429482636915812'/><link rel='alternate' type='text/html' href='http://mimrsh.blogspot.com/2007/09/compression-on-filegroups.html' title='Compression on Filegroups'/><author><name>Mohammed Imran Shaikh</name><uri>http://www.blogger.com/profile/04935024731551151732</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>316</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3170035926071210582.post-713307812741247298</id><published>2007-09-19T12:26:00.000+04:00</published><updated>2007-09-19T12:40:39.268+04:00</updated><title type='text'>Partitioning Table - Sliding window</title><content type='html'>I have a database of 3 terabytes in production with 4 big partitioned tables of sizes between 500GB to 900GB. I was planning to move one year old data into some temporary database and backup that one to tapes and delete that old data from actual database.&lt;br /&gt;&lt;br /&gt;here are the three easy steps to do it,&lt;br /&gt;&lt;br /&gt;Step 1: Check for the partition from partition function,&lt;br /&gt;&lt;br /&gt;select $partition.MonthlyPFN('2005-May-01')&lt;br /&gt;&lt;br /&gt;It will give information, in which partition, data is stored for May 2005, My tables are partitioned on monthly basis.&lt;br /&gt;&lt;br /&gt;It has returned, FG4, as initially I created partitions for 5 years in March 2005, to keep data till 2010 in partitions from FG1 to FG60. Monthly Partitioned tables.&lt;br /&gt;&lt;br /&gt;Step 2: Create a Table exactly same as of the table, from where you want to delete or move data, in same file group,&lt;br /&gt;&lt;br /&gt;CREATE TABLE [ods].[BLA_BLA_MAY_2005](&lt;br /&gt;[ID] [bigint] NOT NULL,&lt;br /&gt;[FILENAME] [varchar](100) NULL,&lt;br /&gt;[DATELOADED] [datetime] NULL,&lt;br /&gt;) ON [FG4]&lt;br /&gt;&lt;br /&gt;Step 3: Use Alter table switch statement to move data to temporary table, which you can drop later,&lt;br /&gt;&lt;br /&gt;ALTER TABLE SCHEMA.SOURCE_TABLE SWITCH partition SOURCE_PARTITION_NUMBER TO SCHEMA.TARGET_TABLE partition TARGET_PARTITION_NUMBER&lt;br /&gt;&lt;br /&gt;e.g., ALTER TABLE ODS.BLA_BLA SWITCH partition 4 TO ODS.BLA_BLA_MAY_2005&lt;br /&gt;&lt;br /&gt;for more help on alter table switch, visit: &lt;a href="http://msdn2.microsoft.com/en-us/library/ms190273.aspx"&gt;http://msdn2.microsoft.com/en-us/library/ms190273.aspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3170035926071210582-713307812741247298?l=mimrsh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mimrsh.blogspot.com/feeds/713307812741247298/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3170035926071210582&amp;postID=713307812741247298' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3170035926071210582/posts/default/713307812741247298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3170035926071210582/posts/default/713307812741247298'/><link rel='alternate' type='text/html' href='http://mimrsh.blogspot.com/2007/09/partitioning-table-sliding-window.html' title='Partitioning Table - Sliding window'/><author><name>Mohammed Imran Shaikh</name><uri>http://www.blogger.com/profile/04935024731551151732</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3170035926071210582.post-2749463352114510557</id><published>2007-09-19T12:09:00.001+04:00</published><updated>2007-09-19T12:17:06.903+04:00</updated><title type='text'>Reporting Services Security</title><content type='html'>Microsoft SQL Server 2000 Reporting Services, we are running on some servers. My team member came to me that Report manager page does nt appear as it should be, there are no options for uploading of files, I start analysis on this and found that ReportServer Database has no issues, but only the problem was anonymous log in in IIS was enabled for virtual directory with some local user, and we have database on another SQL box. So, it appeared as the developer last time uploaded his reports and to enabled anonymous access, he just enabled the virtual directory security. I just unchecked the anonymous access of virtual directory, and restarted IIS and problem get solved. Report Manager in Microsoft SQL Server Reporting Services inherited from Report Server.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3170035926071210582-2749463352114510557?l=mimrsh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mimrsh.blogspot.com/feeds/2749463352114510557/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3170035926071210582&amp;postID=2749463352114510557' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3170035926071210582/posts/default/2749463352114510557'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3170035926071210582/posts/default/2749463352114510557'/><link rel='alternate' type='text/html' href='http://mimrsh.blogspot.com/2007/09/reporting-services-security.html' title='Reporting Services Security'/><author><name>Mohammed Imran Shaikh</name><uri>http://www.blogger.com/profile/04935024731551151732</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3170035926071210582.post-6892691215042766743</id><published>2007-09-19T11:48:00.000+04:00</published><updated>2007-09-19T11:59:58.718+04:00</updated><title type='text'>about me</title><content type='html'>I am Mohammed Imran Shaikh, working with Microsoft SQL Server since 1999. I have a good experience and sound knowledge, with almost all areas of Microsoft SQL Server. Nowadays working with Omani Qatari Telecommunications SAOC, Nawras, in Muscat Oman with the team of IT Dept as a DBA /System Analyst. Where I had a chance to develop two Multiterabyte Datawarehouses and Reporting Solutions using, Microsoft SQL Server 2005 technologies and Microsoft dot net (c#, asp.net), with the Administration of 9 SQL Servers in Production, with a lot of activities like Analysis, development, performance tuning, data integration. Enjoying my work with always overloaded work loads.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3170035926071210582-6892691215042766743?l=mimrsh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mimrsh.blogspot.com/feeds/6892691215042766743/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3170035926071210582&amp;postID=6892691215042766743' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3170035926071210582/posts/default/6892691215042766743'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3170035926071210582/posts/default/6892691215042766743'/><link rel='alternate' type='text/html' href='http://mimrsh.blogspot.com/2007/09/about-me.html' title='about me'/><author><name>Mohammed Imran Shaikh</name><uri>http://www.blogger.com/profile/04935024731551151732</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
