<?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:blogger='http://schemas.google.com/blogger/2008' 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-5651502447967670460</id><updated>2026-02-26T03:21:44.248-08:00</updated><title type='text'>SQL Server Database Administration</title><subtitle type='html'>Different kinds of database exits each adhering to a different model of managing or organizing data in the database. Here is a blog to discuss the on going issues and try to find a resolution.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://pramodkasi.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://pramodkasi.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Pramod Kasi</name><uri>http://www.blogger.com/profile/17163751577158600868</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxbwxMaO-n8E0sgaVPkkXC_ZgG9z7phsl2RlbpDUrrt3xM_VTzoVx1R55PDx6iuc4lLr2JC_scijSkrVMi0yGvcb2iyNqwObroYfOFmb1fuyCGhG22fifYqktqc0WboQ/s220/0c2b7fd.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>32</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5651502447967670460.post-5221264232839005186</id><published>2018-05-17T08:33:00.000-07:00</published><updated>2018-06-18T08:02:49.955-07:00</updated><title type='text'>SQL Server Job Failed [SQLSTATE 42000] (Error 3013) and (Error 3202)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
My SQL Server job is failing throwing errors as shown below&amp;nbsp;&lt;/div&gt;
&lt;br /&gt;
[SQLSTATE 01000] (Message 3211)&amp;nbsp; Write on&lt;br /&gt;
&quot;\\backup-location\folder\database_name.BAK&quot;&lt;br /&gt;
failed: 2(The system cannot find the file specified.) [SQLSTATE 42000] (Error 3202)&amp;nbsp; BACKUP DATABASE is terminating abnormally. [SQLSTATE 42000] (Error 3013).&amp;nbsp; The step failed.&lt;br /&gt;
&lt;br /&gt;
The sql jobs are failing due to network dis-connectivity to the network location where my backups will be written to.&lt;br /&gt;
So I made use to retry_attempts and retry_interval parameter options available in job properties. as show below pic.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJJO_ZYd1NFeK0YhXTLwNraMtXKsJmlg_84BfOd-oSbH3dFCnCfJs7LvX6dK6rIyM144t_qpdHBvEXckhQusKtMmszeyFQGULJFHb-gmXRtgDZxnQqKu9pTHM7cbFQOd8zPH2rL4zx0bo/s1600/job_retry.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;800&quot; data-original-width=&quot;1142&quot; height=&quot;280&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJJO_ZYd1NFeK0YhXTLwNraMtXKsJmlg_84BfOd-oSbH3dFCnCfJs7LvX6dK6rIyM144t_qpdHBvEXckhQusKtMmszeyFQGULJFHb-gmXRtgDZxnQqKu9pTHM7cbFQOd8zPH2rL4zx0bo/s400/job_retry.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But I have 102 steps,&amp;nbsp; I don&#39;t want to waste my time in updating all the job steps, instead I want to update all steps at once. Here is the query that I used to update all steps of a particular job that I wanted to update retry_interval and retry_attempts of a job.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TO SET RETRY ATTEMPTS to the job&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;Update sysjobsteps&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;Set retry_attempts=3 (--set as you prefer)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;from sysjobs S&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;inner join [dbo].[sysjobsteps] j&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;on j.job_id=S.job_id&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;where name=&#39;JOB NAME&#39;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
TO SET RETRY INTERVALS to the job&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;Update sysjobsteps&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;Set retry_interval=1 (--set as you prefer)&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;from sysjobs S&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;inner join [dbo].[sysjobsteps] j&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;on j.job_id=S.job_id&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;where name=&#39;JOB NAME&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;Note: Run at your own risk. It worked for me. This may be not the ideal solution since it is more related to the Network packets being dropped, and in-stable&amp;nbsp;Network. I spent several months on resolution for network issues. But I used this, hope this helps others.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://pramodkasi.blogspot.com/feeds/5221264232839005186/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pramodkasi.blogspot.com/2018/05/sql-server-job-step-retryinterval-and.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/5221264232839005186'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/5221264232839005186'/><link rel='alternate' type='text/html' href='http://pramodkasi.blogspot.com/2018/05/sql-server-job-step-retryinterval-and.html' title='SQL Server Job Failed [SQLSTATE 42000] (Error 3013) and (Error 3202)'/><author><name>Pramod Kasi</name><uri>http://www.blogger.com/profile/17163751577158600868</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxbwxMaO-n8E0sgaVPkkXC_ZgG9z7phsl2RlbpDUrrt3xM_VTzoVx1R55PDx6iuc4lLr2JC_scijSkrVMi0yGvcb2iyNqwObroYfOFmb1fuyCGhG22fifYqktqc0WboQ/s220/0c2b7fd.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJJO_ZYd1NFeK0YhXTLwNraMtXKsJmlg_84BfOd-oSbH3dFCnCfJs7LvX6dK6rIyM144t_qpdHBvEXckhQusKtMmszeyFQGULJFHb-gmXRtgDZxnQqKu9pTHM7cbFQOd8zPH2rL4zx0bo/s72-c/job_retry.PNG" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5651502447967670460.post-6591119151041529758</id><published>2017-05-08T08:24:00.000-07:00</published><updated>2017-05-08T08:24:10.473-07:00</updated><title type='text'>Identity Specification (Is Identity) SQL Server Table</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Saving Changes is not Permitted. Tables need to be dropped and re-created. Message is appeared while you try to change the (Is Identity) Column &amp;nbsp;Property of a table.&lt;br /&gt;&lt;br /&gt;
How to make a change without dropping the table.&lt;br /&gt;
Follow the below steps.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiL-X-gf1gfebt7pjzLSntCjJHR5rTI0dVavPFKY7_pTLzXWCudc8yha5XusfoOzDc17kd3gC-9iYo-lXFL97vhhKwdtPCT8H0dRjmVyXXo6KZzc5c36RrF6CHcuiiwzK0gVk59zJ6A5js/s1600/Blog.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;310&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiL-X-gf1gfebt7pjzLSntCjJHR5rTI0dVavPFKY7_pTLzXWCudc8yha5XusfoOzDc17kd3gC-9iYo-lXFL97vhhKwdtPCT8H0dRjmVyXXo6KZzc5c36RrF6CHcuiiwzK0gVk59zJ6A5js/s400/Blog.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Go to Tools&amp;gt;Options&amp;gt;Designers&amp;gt; Un-check Prevent Saving changes that requires table re-creation.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCZjhNT0tn3OkG9-DcdoPB55CYlkX8HdySdePw_D5to4rjpwAs5Lk4S8yfYkxsePcWdCM90AugbR6Tkxt0nvOOOGXeQq1E6UG4Ed33q8ZUVJVfjrrzYnVt8qGJ75iciZDpRVWUS7-nUzI/s1600/Blog1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;225&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCZjhNT0tn3OkG9-DcdoPB55CYlkX8HdySdePw_D5to4rjpwAs5Lk4S8yfYkxsePcWdCM90AugbR6Tkxt0nvOOOGXeQq1E6UG4Ed33q8ZUVJVfjrrzYnVt8qGJ75iciZDpRVWUS7-nUzI/s400/Blog1.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://pramodkasi.blogspot.com/feeds/6591119151041529758/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pramodkasi.blogspot.com/2017/05/identity-specification-is-identity-sql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/6591119151041529758'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/6591119151041529758'/><link rel='alternate' type='text/html' href='http://pramodkasi.blogspot.com/2017/05/identity-specification-is-identity-sql.html' title='Identity Specification (Is Identity) SQL Server Table'/><author><name>Pramod Kasi</name><uri>http://www.blogger.com/profile/17163751577158600868</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxbwxMaO-n8E0sgaVPkkXC_ZgG9z7phsl2RlbpDUrrt3xM_VTzoVx1R55PDx6iuc4lLr2JC_scijSkrVMi0yGvcb2iyNqwObroYfOFmb1fuyCGhG22fifYqktqc0WboQ/s220/0c2b7fd.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiL-X-gf1gfebt7pjzLSntCjJHR5rTI0dVavPFKY7_pTLzXWCudc8yha5XusfoOzDc17kd3gC-9iYo-lXFL97vhhKwdtPCT8H0dRjmVyXXo6KZzc5c36RrF6CHcuiiwzK0gVk59zJ6A5js/s72-c/Blog.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5651502447967670460.post-6211199846476548449</id><published>2016-08-10T10:22:00.000-07:00</published><updated>2016-08-10T10:22:27.185-07:00</updated><title type='text'>Message 15063, Login Already Exists</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Recently, I received an error from a Share-Point 2013 database creation from the Farm Account&lt;br /&gt;
&lt;br /&gt;
As you all know, while triggering a new database from SharePoint Site its uses a farm account to create a new database on SQL Server, and during the creation as a DBA its our responsibility to grant necessary permissions, in my case I have granted DB_Creator server role as per MS recommendations.&lt;br /&gt;
after the database has created by the farm and is the owner of the database, but still its not able to access within the database. Very strange huh..&lt;br /&gt;
and then I got involved in to the issue to have it fixed.&lt;br /&gt;
&lt;br /&gt;
I tried to add users, since it does not exist in the database, but the user has db_owner rights when I tired to add Farm account to the database from the login in properties users mappings in the GUI very strange. and I received an error while tried to add and hit OK.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;The login already has an account under a different user name. 15063&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I verified the database login and user info by running the below script.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
SELECT &amp;nbsp;l.loginname , u.name AS username&lt;/div&gt;
&lt;div&gt;
FROM &amp;nbsp; &amp;nbsp;sysusers u INNER JOIN master..syslogins l ON u.sid = l.sid&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I found that the users is mapped to [DBO]. So &amp;nbsp;I changed the database owner to &#39;sa&#39;&lt;/div&gt;
&lt;div&gt;
by running the below script&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;sp_changedbowner &#39;sa&#39;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
and then I ran the below statements to grant access to the existing farm account.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
CREATE USER [domain\FARMacocunt] FOR LOGIN [domain\FARMacocunt]&lt;/div&gt;
&lt;div&gt;
GO&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
ALTER ROLE [db_owner] ADD MEMBER [domain\FARMacocunt]&lt;/div&gt;
&lt;div&gt;
GO&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
That&#39;s how I resolved the issue, &amp;nbsp;but I do not know why it happened to behave like this during the time of new database creation.&amp;nbsp;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://pramodkasi.blogspot.com/feeds/6211199846476548449/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pramodkasi.blogspot.com/2016/08/message-15063-login-already-exists.html#comment-form' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/6211199846476548449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/6211199846476548449'/><link rel='alternate' type='text/html' href='http://pramodkasi.blogspot.com/2016/08/message-15063-login-already-exists.html' title='Message 15063, Login Already Exists'/><author><name>Pramod Kasi</name><uri>http://www.blogger.com/profile/17163751577158600868</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxbwxMaO-n8E0sgaVPkkXC_ZgG9z7phsl2RlbpDUrrt3xM_VTzoVx1R55PDx6iuc4lLr2JC_scijSkrVMi0yGvcb2iyNqwObroYfOFmb1fuyCGhG22fifYqktqc0WboQ/s220/0c2b7fd.jpg'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5651502447967670460.post-6898501929148892887</id><published>2015-09-18T08:29:00.000-07:00</published><updated>2015-09-18T08:29:29.490-07:00</updated><title type='text'>Lost SQL Server access, forgot &#39;sa&#39; password no clue how to gain access? </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;i&gt;I recently encountered an issue where I didn&#39;t have access to SQL Server and I was asked for help to debug and gain back control on the system and the server hosting sql server database.&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;i&gt;Here is what to do.&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;i&gt;Step1) Login to the server as administrator.&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;i&gt;Step2) Download PSExec tool from&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;i&gt;https://technet.microsoft.com/en-us/sysinternals/bb897553.aspx&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;i&gt;Its windows sysinternals utility.&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;i style=&quot;background-color: white;&quot;&gt;Why?&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;i style=&quot;background-color: white;&quot;&gt;PsExec allows you to run programs as the NT AUTHORITY\SYSTEM account&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;i style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;i style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;i style=&quot;background-color: white;&quot;&gt;Step3) Find the location of your SSMS.( SQL Server Management Studio)&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;i style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;i style=&quot;background-color: white;&quot;&gt;Right click on the properties of SSMS and click on shortcut tab.&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;i style=&quot;background-color: white;&quot;&gt;Copy the location to a notepad.&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAOelFiCgcy9yY9vmUotg1f7iboauV-Sq-JyNU4taW8LRdNBGbUH58wdLB_7B_1QCVqJnx33sU6TSDDPDtDmkX35kfgu1z91B1F4uBGaAtBq7xguo6L7KlsHnCN3ogoFlbNwtaQPdbox4/s1600/SSMS_Gain_sa_access.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;i&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAOelFiCgcy9yY9vmUotg1f7iboauV-Sq-JyNU4taW8LRdNBGbUH58wdLB_7B_1QCVqJnx33sU6TSDDPDtDmkX35kfgu1z91B1F4uBGaAtBq7xguo6L7KlsHnCN3ogoFlbNwtaQPdbox4/s400/SSMS_Gain_sa_access.PNG&quot; width=&quot;273&quot; /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;i&gt;Step4) Open Command Prompt run as administrator&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;i&gt;Step5) Navigate to the folder where you have downloaded and extracted PSexec tool.&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;i&gt;Step6) Run the following command to start your SSMS.&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;PsExec -s -i &quot;F:\SQLServer\Installs\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\Ssms.exe&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: xx-small;&quot;&gt;Please refer to&amp;nbsp;https://technet.microsoft.com/en-us/sysinternals/bb897553.aspx&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;table style=&quot;border-collapse: collapse; border-spacing: 0px; border: 0px; color: #2a2a2a; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 12.0012px; line-height: 16.2016px; margin: 0px; outline: 0px; padding: 0px; width: 420px;&quot;&gt;&lt;tbody style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px;&quot;&gt;
&lt;tr align=&quot;left&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px;&quot; valign=&quot;top&quot;&gt;&lt;td style=&quot;border: 0px; font-style: inherit; margin: 0px; outline: 0px; padding: 5px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/td&gt;&lt;td style=&quot;border: 0px; margin: 0px; outline: 0px; padding: 5px;&quot;&gt;&lt;div style=&quot;font-family: inherit; font-style: inherit; font-weight: inherit;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: xx-small;&quot;&gt;&amp;nbsp;s- &amp;nbsp; &amp;nbsp;Runsthe remote process in the System account.&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;table style=&quot;border-collapse: collapse; border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border-spacing: 0px; border: 0px; color: #2a2a2a; font-family: inherit; font-size: 12.0012px; font-style: inherit; font-weight: inherit; line-height: 16.2016px; margin: 0px; outline: 0px; padding: 0px; width: 420px;&quot;&gt;&lt;tbody style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px;&quot;&gt;
&lt;tr align=&quot;left&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px;&quot; valign=&quot;top&quot;&gt;&lt;td style=&quot;border: 0px; font-style: inherit; margin: 0px; outline: 0px; padding: 5px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: xx-small;&quot;&gt;i-&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/td&gt;&lt;td style=&quot;border: 0px; font-style: inherit; margin: 0px; outline: 0px; padding: 5px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: xx-small;&quot;&gt;Runs the program so that it interacts with the desktop of the specified session on the remote system. If no session is specified the process runs in the console session.&lt;/span&gt;&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;font-family: inherit; font-style: inherit; font-weight: inherit;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;i style=&quot;font-family: inherit; font-weight: inherit; line-height: 16.2016px;&quot;&gt;&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;i style=&quot;font-family: inherit; font-weight: inherit; line-height: 16.2016px;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: small;&quot;&gt;Step7 ) &amp;nbsp;go to Security and gain access or add user as login and add them to the sysadmin server role.&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;/i&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: inherit; font-style: inherit; font-weight: inherit;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: inherit; font-style: inherit; font-weight: inherit;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://pramodkasi.blogspot.com/feeds/6898501929148892887/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pramodkasi.blogspot.com/2015/09/lost-sql-server-access-forgot-sa.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/6898501929148892887'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/6898501929148892887'/><link rel='alternate' type='text/html' href='http://pramodkasi.blogspot.com/2015/09/lost-sql-server-access-forgot-sa.html' title='Lost SQL Server access, forgot &#39;sa&#39; password no clue how to gain access? '/><author><name>Pramod Kasi</name><uri>http://www.blogger.com/profile/17163751577158600868</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxbwxMaO-n8E0sgaVPkkXC_ZgG9z7phsl2RlbpDUrrt3xM_VTzoVx1R55PDx6iuc4lLr2JC_scijSkrVMi0yGvcb2iyNqwObroYfOFmb1fuyCGhG22fifYqktqc0WboQ/s220/0c2b7fd.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAOelFiCgcy9yY9vmUotg1f7iboauV-Sq-JyNU4taW8LRdNBGbUH58wdLB_7B_1QCVqJnx33sU6TSDDPDtDmkX35kfgu1z91B1F4uBGaAtBq7xguo6L7KlsHnCN3ogoFlbNwtaQPdbox4/s72-c/SSMS_Gain_sa_access.PNG" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5651502447967670460.post-7533809527270285583</id><published>2014-10-15T13:56:00.000-07:00</published><updated>2014-10-15T13:56:00.768-07:00</updated><title type='text'>Database in Recovery Pending State</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;MsoPlainText&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoPlainText&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoPlainText&quot;&gt;
Database &#39;db_name&#39;
cannot be opened due to inaccessible files or insufficient memory or disk
space.&amp;nbsp; See the SQL Server errorlog for
details.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoPlainText&quot;&gt;
Looks like Log file got corrupted and not allowing the database to come online.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;MsoPlainText&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoPlainText&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoPlainText&quot;&gt;
First thing make sure you have .mdf and .ldf files in your drives.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;MsoPlainText&quot;&gt;
next verify&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;MsoPlainText&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoPlainText&quot;&gt;
select * from sys.sysdatabases where name =&#39;db_name&#39;&lt;/div&gt;
&lt;div class=&quot;MsoPlainText&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoPlainText&quot;&gt;
Verify the &lt;b&gt;filename &lt;/b&gt;column sees the database .mdf file with full path.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;MsoPlainText&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoPlainText&quot;&gt;
Next&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;MsoPlainText&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoPlainText&quot;&gt;
Execute the following commands to bring your database to online.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;MsoPlainText&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoPlainText&quot;&gt;
alter database [db_databasename] set offline with rollback immediate&lt;/div&gt;
&lt;div class=&quot;MsoPlainText&quot;&gt;
alter database [db_databasename] set online with rollback immediate&lt;/div&gt;
&lt;div class=&quot;MsoPlainText&quot;&gt;
with this your database is online and accessible.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;MsoPlainText&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoPlainText&quot;&gt;
I would also recommend to run the following command to make sure no corruption.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;MsoPlainText&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoPlainText&quot;&gt;
DBCC CHECKDB (&#39;db_databasename&#39;)&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://pramodkasi.blogspot.com/feeds/7533809527270285583/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pramodkasi.blogspot.com/2014/10/database-in-recovery-pending-state.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/7533809527270285583'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/7533809527270285583'/><link rel='alternate' type='text/html' href='http://pramodkasi.blogspot.com/2014/10/database-in-recovery-pending-state.html' title='Database in Recovery Pending State'/><author><name>Pramod Kasi</name><uri>http://www.blogger.com/profile/17163751577158600868</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxbwxMaO-n8E0sgaVPkkXC_ZgG9z7phsl2RlbpDUrrt3xM_VTzoVx1R55PDx6iuc4lLr2JC_scijSkrVMi0yGvcb2iyNqwObroYfOFmb1fuyCGhG22fifYqktqc0WboQ/s220/0c2b7fd.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5651502447967670460.post-8651138487765875601</id><published>2014-09-05T10:50:00.002-07:00</published><updated>2014-09-05T10:50:56.663-07:00</updated><title type='text'></title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
High PLE high Performance.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Open Sans&#39;, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 23.9959983825684px; text-align: justify;&quot;&gt;Page Life Expectancy commonly called as PLE, &amp;nbsp;is number of seconds a page will stay in the buffer pool.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Open Sans&#39;, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 23.9959983825684px; text-align: justify;&quot;&gt;The longer the pages stays in memory cache, the higher the PLE is, the high PLE gives high performance. Each time request comes, first SQL Server will check in the memory cache if it exists or not.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Open Sans&#39;, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 23.9959983825684px; text-align: justify;&quot;&gt;If the results or data is found in memory cache (which is also called as buffer pool) decreasing the search time, then it will display the results that is read from cache. If sql server could not find the information in cache then it will look for the data in pages (that is stored in hard disk) now we are increasing the search time. So the high PLE leads to high performance. Below is the query to check the PLE value.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;select&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[object_name],&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[counter_name],&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[cntr_value] as Current_value&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;from&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;sys.dm_os_performance_counters&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;where&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[object_name] LIKE &#39;%Manager%&#39;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;and&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[counter_name] = &#39;Page life expectancy&#39;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Also always Buffer cache hit Ratio should be 100 or close to 100.&lt;br /&gt;
Below is the query to check the Buffer cache hit Ratio.&lt;br /&gt;
&lt;br /&gt;
Both values can be obtained from Perfmon tool by adding respective counters.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;select&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;[object_name],&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;counter_name,&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;cntr_value as current_Value&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;from&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;sys.dm_os_performance_counters&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;where&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[object_name] LIKE &#39;%Buffer Manager%&#39;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;and&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[counter_name] = &#39;Buffer cache hit ratio&#39;&lt;/b&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://pramodkasi.blogspot.com/feeds/8651138487765875601/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pramodkasi.blogspot.com/2014/09/high-ple-high-performance.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/8651138487765875601'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/8651138487765875601'/><link rel='alternate' type='text/html' href='http://pramodkasi.blogspot.com/2014/09/high-ple-high-performance.html' title=''/><author><name>Pramod Kasi</name><uri>http://www.blogger.com/profile/17163751577158600868</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxbwxMaO-n8E0sgaVPkkXC_ZgG9z7phsl2RlbpDUrrt3xM_VTzoVx1R55PDx6iuc4lLr2JC_scijSkrVMi0yGvcb2iyNqwObroYfOFmb1fuyCGhG22fifYqktqc0WboQ/s220/0c2b7fd.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5651502447967670460.post-4808798026590674447</id><published>2014-09-04T06:31:00.000-07:00</published><updated>2014-09-04T06:31:32.338-07:00</updated><title type='text'>SQL Server Error Log Recycle (ERRORLOG file growing large)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
SQL Server Error log is too large and has grown upto 24GB, it takes a lot of time to open and sometimes hangs and SSMS gets into not-responding state.&lt;br /&gt;
&lt;br /&gt;
Go to the location of the error log and see what&#39;s the size as shown in the pics below.&lt;br /&gt;
If you &lt;b&gt;don&#39;t know the location of file&lt;/b&gt;, open management studio new query and execute the below query&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;use master&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;go&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;xp_readerrorlog 0, 1, N&#39;Logging SQL Server messages in file&#39;, null, null, N&#39;asc&#39;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;go&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
From the results set in the text column you can find the location of your error log file.&lt;br /&gt;
&lt;br /&gt;
Recycle log means creating the new error log file to start recording events in the new file so that its easy to search something in a new file rather that has fewer events rather than searching large file takes time.&lt;br /&gt;
&lt;br /&gt;
Open management studio connect to the Instance, open new query.&lt;br /&gt;
and run the following statement.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;use master&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;go&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;exec sp_cycle_errorlog&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;go&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New ERROLOG file will be created by renaming the older file (24Gb) to ERRORLOG.1. You can comfortably delete the file to save space if you don&#39;t need it.&lt;br /&gt;
and expand the management studio you will see two files.&lt;br /&gt;
&lt;br /&gt;
1) Current being the new file and starts to record new events.&lt;br /&gt;
&lt;br /&gt;
2 Archive being the old recorded events, if you don&#39;t need it you can delete the physical file from the location. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIj2LkuLTiQ6GUR7E6wOeoMIs1TR0K0kkpNJp2XeAKsxjN23_I9GBUAHN8Bmby6En2hJWTz1DJ_PKFU0Lf5PrPgGDYHhPutSTSSf3xlUZWKcNfCarKQgEgtFZYHeju3poLDmXS_Bw0cBA/s1600/Before_After_Recycle.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIj2LkuLTiQ6GUR7E6wOeoMIs1TR0K0kkpNJp2XeAKsxjN23_I9GBUAHN8Bmby6En2hJWTz1DJ_PKFU0Lf5PrPgGDYHhPutSTSSf3xlUZWKcNfCarKQgEgtFZYHeju3poLDmXS_Bw0cBA/s1600/Before_After_Recycle.JPG&quot; height=&quot;42&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgqLdJ4ccoN2Be2lFdIw1O7BxaO82OmSazlvKPMWXtOTbx0jkvJMq9_DDzZGS5UXP5OMLKtxrm-YAoRInNdyYt62FOE0zzSUhWO2r_N_4Fzdp6f18NUngi6tShyHZ_KQgGyaopiWQgt6s/s1600/Recycle_error_Log.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgqLdJ4ccoN2Be2lFdIw1O7BxaO82OmSazlvKPMWXtOTbx0jkvJMq9_DDzZGS5UXP5OMLKtxrm-YAoRInNdyYt62FOE0zzSUhWO2r_N_4Fzdp6f18NUngi6tShyHZ_KQgGyaopiWQgt6s/s1600/Recycle_error_Log.JPG&quot; height=&quot;250&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://pramodkasi.blogspot.com/feeds/4808798026590674447/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pramodkasi.blogspot.com/2014/09/sql-server-error-log-recycle-errorlog.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/4808798026590674447'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/4808798026590674447'/><link rel='alternate' type='text/html' href='http://pramodkasi.blogspot.com/2014/09/sql-server-error-log-recycle-errorlog.html' title='SQL Server Error Log Recycle (ERRORLOG file growing large)'/><author><name>Pramod Kasi</name><uri>http://www.blogger.com/profile/17163751577158600868</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxbwxMaO-n8E0sgaVPkkXC_ZgG9z7phsl2RlbpDUrrt3xM_VTzoVx1R55PDx6iuc4lLr2JC_scijSkrVMi0yGvcb2iyNqwObroYfOFmb1fuyCGhG22fifYqktqc0WboQ/s220/0c2b7fd.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIj2LkuLTiQ6GUR7E6wOeoMIs1TR0K0kkpNJp2XeAKsxjN23_I9GBUAHN8Bmby6En2hJWTz1DJ_PKFU0Lf5PrPgGDYHhPutSTSSf3xlUZWKcNfCarKQgEgtFZYHeju3poLDmXS_Bw0cBA/s72-c/Before_After_Recycle.JPG" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5651502447967670460.post-1336779866664780565</id><published>2014-07-21T07:43:00.000-07:00</published><updated>2014-07-21T07:44:38.442-07:00</updated><title type='text'>Where does SQL Server 2012 License Key gets stored?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Many of my folks had a question about MicroSoft SQL Server License Key.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
SQL Server license key can be found at the below location the registries.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: blue; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 14px; line-height: 15.399999618530273px; white-space: pre;&quot;&gt;launch REGEDIT(Registry Editor) from the command prompt type: regedit&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: blue; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 14px; line-height: 15.399999618530273px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: blue; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 14px; line-height: 15.399999618530273px; white-space: pre;&quot;&gt;Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\110\Tools\Setup DIGITALPRODUCT ID&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj41Jzlfe4RbpgE7Vw3Ia9l8fGbDzF3yswD8YKjN3Pt7jN3qKzg_BwS-AMUiZiUpmghUlMXvlee2cHLrFixVEV5SS8u5c66ZWMzmS3NZ-NJduqxA5g1qcFz2Ro3TAKXRZSjElA5vXhOSiI/s1600/LICENSE_KEY.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj41Jzlfe4RbpgE7Vw3Ia9l8fGbDzF3yswD8YKjN3Pt7jN3qKzg_BwS-AMUiZiUpmghUlMXvlee2cHLrFixVEV5SS8u5c66ZWMzmS3NZ-NJduqxA5g1qcFz2Ro3TAKXRZSjElA5vXhOSiI/s1600/LICENSE_KEY.JPG&quot; height=&quot;140&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://pramodkasi.blogspot.com/feeds/1336779866664780565/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pramodkasi.blogspot.com/2014/07/where-does-sql-server-2012-license-key.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/1336779866664780565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/1336779866664780565'/><link rel='alternate' type='text/html' href='http://pramodkasi.blogspot.com/2014/07/where-does-sql-server-2012-license-key.html' title='Where does SQL Server 2012 License Key gets stored?'/><author><name>Pramod Kasi</name><uri>http://www.blogger.com/profile/17163751577158600868</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxbwxMaO-n8E0sgaVPkkXC_ZgG9z7phsl2RlbpDUrrt3xM_VTzoVx1R55PDx6iuc4lLr2JC_scijSkrVMi0yGvcb2iyNqwObroYfOFmb1fuyCGhG22fifYqktqc0WboQ/s220/0c2b7fd.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj41Jzlfe4RbpgE7Vw3Ia9l8fGbDzF3yswD8YKjN3Pt7jN3qKzg_BwS-AMUiZiUpmghUlMXvlee2cHLrFixVEV5SS8u5c66ZWMzmS3NZ-NJduqxA5g1qcFz2Ro3TAKXRZSjElA5vXhOSiI/s72-c/LICENSE_KEY.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5651502447967670460.post-2435264793647797297</id><published>2014-07-21T07:23:00.000-07:00</published><updated>2014-07-21T07:23:08.671-07:00</updated><title type='text'>Connecting to the Integration Services service on the computer &quot;SERVER_NAME&quot; failed with the following error: &quot;Access is denied.&quot;</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
TITLE: Connect to Server&lt;br /&gt;
------------------------------&lt;br /&gt;
Connecting to the Integration Services service on the computer &quot;SERVER_NAME&quot; failed with the following error: &quot;Access is denied.&quot;&lt;br /&gt;
By default, only administrators have access to the Integration Services service. On Windows Vista and later, the process must be running with administrative privileges in order to connect to the Integration Services service. See the help topic for information on how to configure access to the service.&lt;br /&gt;
------------------------------&lt;br /&gt;
Connecting to the Integration Services service on the computer &quot;SERVER_NAME&quot; failed with the following error: &quot;Access is denied.&quot;&lt;br /&gt;
By default, only administrators have access to the Integration Services service. On Windows Vista and later, the process must be running with administrative privileges in order to connect to the Integration Services service. See the help topic for information on how to configure access to the service.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLV55LoV2rmFEgAEHqSeIUzQwECsQmTi-hYbfAUqIu5l0lFwYomlJSBzPR1GrYaFFZ7ciq2Q2VIEZCBDcNdacMBVjiS-jQYaudhRtXbV5etVvFh1GB5ZR1SB9pu_hJR0zZrkNqAvQJjsI/s1600/SSIS_Error.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLV55LoV2rmFEgAEHqSeIUzQwECsQmTi-hYbfAUqIu5l0lFwYomlJSBzPR1GrYaFFZ7ciq2Q2VIEZCBDcNdacMBVjiS-jQYaudhRtXbV5etVvFh1GB5ZR1SB9pu_hJR0zZrkNqAvQJjsI/s1600/SSIS_Error.JPG&quot; height=&quot;177&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
This error occurred when I upgraded SQL Server 2008R2 to SQL Server 2012.&lt;br /&gt;
Everything was working until then, then I realized going back to old school its permission error, after integration services installed as an administrator needs to grant access to the users and groups who were in earlier version of SQL Server 2008R2, 2005 including me who actually installed\upgraded to sql 2012.&lt;br /&gt;
&lt;br /&gt;
Here is the fix that I used it works after I granted access to the users or groups as below to DCOM.&lt;br /&gt;
First launch Component services.&lt;br /&gt;
from Search type component or from command prompt &amp;nbsp;type Dcomcnfg.exe and hit enter.&lt;br /&gt;
And from the below figure expand DCOM Config, to the&lt;br /&gt;
MicroSoft SQL Server Integration Services 11.0&lt;br /&gt;
1) Right click and select Properties.&lt;br /&gt;
2) Select Security Tab&lt;br /&gt;
3) On Launch and Activation Permissions select Edit.&lt;br /&gt;
4) now Add the member or groups that needs access to Integration Services.&lt;br /&gt;
and Finally Restart your Integration Services and Restart SSMS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhD49YdXcOiSrrrTUqfKmNvq19VbH-VF3kQnCnv2SGOcqwMD1aAMAr3fxEeo1-vj8fx4omdRRkCzhWReZEqnsMV0sDf3mYxKUJd1qA3HfarvJCR-NWH3rRR64lLmiqOYduZb3wbz2kqwe0/s1600/COM_1.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhD49YdXcOiSrrrTUqfKmNvq19VbH-VF3kQnCnv2SGOcqwMD1aAMAr3fxEeo1-vj8fx4omdRRkCzhWReZEqnsMV0sDf3mYxKUJd1qA3HfarvJCR-NWH3rRR64lLmiqOYduZb3wbz2kqwe0/s1600/COM_1.JPG&quot; height=&quot;233&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeAMqBig18M_QbOWgtZHiQ8ThE5UpNtL_jzwajKL1qVRTxpJ7peLEapITyNovVk7CFIxJq2BaywejoLO-tYeyIxe77sPHCxXZHfuAlfV_56PM-pKGH-5UY1DMjKYSQgk9ZxG_RW7n4d10/s1600/COM_2.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeAMqBig18M_QbOWgtZHiQ8ThE5UpNtL_jzwajKL1qVRTxpJ7peLEapITyNovVk7CFIxJq2BaywejoLO-tYeyIxe77sPHCxXZHfuAlfV_56PM-pKGH-5UY1DMjKYSQgk9ZxG_RW7n4d10/s1600/COM_2.JPG&quot; height=&quot;287&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
.&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://pramodkasi.blogspot.com/feeds/2435264793647797297/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pramodkasi.blogspot.com/2014/07/connecting-to-integration-services.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/2435264793647797297'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/2435264793647797297'/><link rel='alternate' type='text/html' href='http://pramodkasi.blogspot.com/2014/07/connecting-to-integration-services.html' title='Connecting to the Integration Services service on the computer &quot;SERVER_NAME&quot; failed with the following error: &quot;Access is denied.&quot;'/><author><name>Pramod Kasi</name><uri>http://www.blogger.com/profile/17163751577158600868</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxbwxMaO-n8E0sgaVPkkXC_ZgG9z7phsl2RlbpDUrrt3xM_VTzoVx1R55PDx6iuc4lLr2JC_scijSkrVMi0yGvcb2iyNqwObroYfOFmb1fuyCGhG22fifYqktqc0WboQ/s220/0c2b7fd.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLV55LoV2rmFEgAEHqSeIUzQwECsQmTi-hYbfAUqIu5l0lFwYomlJSBzPR1GrYaFFZ7ciq2Q2VIEZCBDcNdacMBVjiS-jQYaudhRtXbV5etVvFh1GB5ZR1SB9pu_hJR0zZrkNqAvQJjsI/s72-c/SSIS_Error.JPG" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5651502447967670460.post-4294594776611967767</id><published>2014-06-27T09:06:00.005-07:00</published><updated>2014-06-27T09:06:59.417-07:00</updated><title type='text'>Cannot see ODBC Driver after installation of Oracle 11g client.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
I installed the ORACLE client tool full Administrator option&lt;br /&gt;
Still not able to see the ODBC drivers for Oracle?&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://1.bp.blogspot.com/-Xa6dx5UH9kw/U62T-LYHvOI/AAAAAAAAIDc/iu6135-2_co/s1600/ODBC.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-Xa6dx5UH9kw/U62T-LYHvOI/AAAAAAAAIDc/iu6135-2_co/s1600/ODBC.JPG&quot; height=&quot;302&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
I know I have installed full administrator. Now next thing what I did was I went back and verified what version of Oracle Client I installed, I found it was 32 bit and My server is windows server 2008 r2 is 64 Bit.&lt;br /&gt;
So that explains we have a compatibility issues.&lt;br /&gt;
&lt;br /&gt;
Without again re-installing 64 bit Oracle 11g client.&lt;br /&gt;
I went into&lt;br /&gt;
&lt;b&gt;C:\Windows\SysWOW64\odbcad32.exe&lt;/b&gt; and launched the ODBC data source Administrator.&lt;br /&gt;
Now I see all the driver of 32 bit that I installed.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://4.bp.blogspot.com/-DKKX1nMvJBg/U62VGWkdOcI/AAAAAAAAIDk/ynzaY33kfOA/s1600/ODBC.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-DKKX1nMvJBg/U62VGWkdOcI/AAAAAAAAIDk/ynzaY33kfOA/s1600/ODBC.JPG&quot; height=&quot;312&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
In my case I need 32 bit drivers, so If you still need 64 bit drivers Please install 64 bit client Oracle 11G drivers only.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://pramodkasi.blogspot.com/feeds/4294594776611967767/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pramodkasi.blogspot.com/2014/06/cannot-see-odbc-driver-after.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/4294594776611967767'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/4294594776611967767'/><link rel='alternate' type='text/html' href='http://pramodkasi.blogspot.com/2014/06/cannot-see-odbc-driver-after.html' title='Cannot see ODBC Driver after installation of Oracle 11g client.'/><author><name>Pramod Kasi</name><uri>http://www.blogger.com/profile/17163751577158600868</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxbwxMaO-n8E0sgaVPkkXC_ZgG9z7phsl2RlbpDUrrt3xM_VTzoVx1R55PDx6iuc4lLr2JC_scijSkrVMi0yGvcb2iyNqwObroYfOFmb1fuyCGhG22fifYqktqc0WboQ/s220/0c2b7fd.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-Xa6dx5UH9kw/U62T-LYHvOI/AAAAAAAAIDc/iu6135-2_co/s72-c/ODBC.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5651502447967670460.post-3263302703983000610</id><published>2014-02-04T08:48:00.000-08:00</published><updated>2014-02-04T08:48:14.688-08:00</updated><title type='text'>Error: 9003, Severity: 20, State: 9 SQL Server 2012</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
I have got this error message earlier this morning and all my user database backups failed due to this.&lt;br /&gt;
&lt;br /&gt;
The log scan number (87817:27:0) passed to log scan in database &#39;AdventureWorks2012&#39; is not valid. This error may indicate data corruption or that the log file (.ldf) does not match the data file (.mdf). If this error occurred during replication, re-create the publication. Otherwise, restore from backup if the problem results in a failure during Startup.&lt;br /&gt;
&lt;br /&gt;
These are the steps that I took to resolve the issue.&lt;br /&gt;
&lt;br /&gt;
I ran &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;DBCC CHECKDB&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;and there are lot of allocations errors and database has been corrupted.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Fix1: Restore the Previous nights good backup can fix this.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Before you restore make sure you have good backup it can be verified by running the below.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;pre&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;RESTORE VERIFYONLY FROM&amp;nbsp;DISK = H:\Backups\AdventureWorks2012.BAK
GO&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;and then restore to the earlier nights good backup.&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;================================================================&lt;/pre&gt;
&lt;pre&gt;
&lt;/pre&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Fix2:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Rename your log file or move your log file to different location.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;You can you do this by detaching the database first and then move the files or rename the files.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;pre style=&quot;line-height: 17.549999237060547px; overflow: auto; padding: 5px; word-wrap: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;USE master;
GO
EXEC sp_detach_db @dbname = &#39;AdventureWorks2012&#39;;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;line-height: 17.549999237060547px; overflow: auto; padding: 5px; word-wrap: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Now rename the .ldf  file or move to a different location.&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;line-height: 17.549999237060547px; overflow: auto; padding: 5px; word-wrap: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;CREATE DATABASE AdventureWorks2012&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; ON (FILENAME = &#39;D:\MSSQL\DATA\AdventureWorks2012_DATA01.mdf&#39;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;--(FILENAME = &#39;E:\MSSQL\LOGS\AdventureWorks2012_LOG01.ldf&#39;)&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; FOR ATTACH;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;OR&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;pre style=&quot;line-height: 17.549999237060547px; overflow: auto; padding: 5px; word-wrap: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;EXEC sp_attach_single_file_db @dbname = &#39;AdventureWorks2012&#39;, 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@physname = 
N&#39;&lt;span style=&quot;line-height: normal; white-space: normal;&quot;&gt;MSSQL\DATA\AdventureWorks2012_DATA01.mdf&lt;/span&gt;&#39;;&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Note: I commented .LDF file attachment, without it a NEW log file will be created in the default location.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;and run the DBCC CHECKDB (Databasename)&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://pramodkasi.blogspot.com/feeds/3263302703983000610/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pramodkasi.blogspot.com/2014/02/error-9003-severity-20-state-9-sql.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/3263302703983000610'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/3263302703983000610'/><link rel='alternate' type='text/html' href='http://pramodkasi.blogspot.com/2014/02/error-9003-severity-20-state-9-sql.html' title='Error: 9003, Severity: 20, State: 9 SQL Server 2012'/><author><name>Pramod Kasi</name><uri>http://www.blogger.com/profile/17163751577158600868</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxbwxMaO-n8E0sgaVPkkXC_ZgG9z7phsl2RlbpDUrrt3xM_VTzoVx1R55PDx6iuc4lLr2JC_scijSkrVMi0yGvcb2iyNqwObroYfOFmb1fuyCGhG22fifYqktqc0WboQ/s220/0c2b7fd.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5651502447967670460.post-8738610635382570480</id><published>2012-12-17T10:25:00.002-08:00</published><updated>2012-12-17T10:25:29.155-08:00</updated><title type='text'>Evaluation period has expired, SQL Server 2012</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
How to upgrade Evaluation edition or use Licence key to the SQL Server Services.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9XzCTkzCRtvyPQ4pSGpxg2m3n99lYIROlplbds1mnSYCMarPV6P1AW5PLGsaZUs5b6rsVKOu9VqBfMuwSPXUoYFe0z_0zmGfk0-Bn_He9OVKAPYJZFFJ-xAQDLG5oizZP94BVekdwy7Y/s1600/Capture.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;140&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9XzCTkzCRtvyPQ4pSGpxg2m3n99lYIROlplbds1mnSYCMarPV6P1AW5PLGsaZUs5b6rsVKOu9VqBfMuwSPXUoYFe0z_0zmGfk0-Bn_He9OVKAPYJZFFJ-xAQDLG5oizZP94BVekdwy7Y/s400/Capture.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Run SQL Server 2012 Setup file as administrator&amp;nbsp;and select maintenance link as shown below.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Select Edition Upgrade; Edition Upgrade meaning you are actually Upgrading&amp;nbsp;Evaluation&amp;nbsp;edition to Enterprise edition by entering Licence key. Make sure you have Enterprise Edition KEY only other editions keys are not Accepted.&amp;nbsp;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxes0aN1TTO7eGZ7zZTuKqX4FDx8vHpncQk7jRM7V3THLBcXEbnnce8QB_aQL5fgyQnSNS71z-leeiFUz0ssDFXLHAfc3Q0ExI5d3i9NOBVd1OTwxO1PXs0nvwG85ZbS2TUJUB8RXhvMk/s1600/Capture1JPG.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;299&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxes0aN1TTO7eGZ7zZTuKqX4FDx8vHpncQk7jRM7V3THLBcXEbnnce8QB_aQL5fgyQnSNS71z-leeiFUz0ssDFXLHAfc3Q0ExI5d3i9NOBVd1OTwxO1PXs0nvwG85ZbS2TUJUB8RXhvMk/s400/Capture1JPG.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1wCo608RHyJqPNVckS8ni_MS8JY8gd2fui7izFnmeiENOcpqCPIciJPwUknRN8y0Z4KkFQmS-KQPDuYDio220c70ozacv3bQqxoarwjtK5YRF_G9era0By1FPDIxommDTmGpQz1g646I/s1600/Capture2.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;292&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1wCo608RHyJqPNVckS8ni_MS8JY8gd2fui7izFnmeiENOcpqCPIciJPwUknRN8y0Z4KkFQmS-KQPDuYDio220c70ozacv3bQqxoarwjtK5YRF_G9era0By1FPDIxommDTmGpQz1g646I/s400/Capture2.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjj402eas7aVyazD77omjIwWvHIoJO7Mugk6mC7rCYqkGL_u0vDiTps0eNPVZNKUrn9cIKQfNUp9ZsRRDXMLiPysiARKCCBkQiEJQjWdkrsJB-C2Vf1pxKLivvK1aLzzCs_4SHRRi7gIHw/s1600/Capture3.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;293&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjj402eas7aVyazD77omjIwWvHIoJO7Mugk6mC7rCYqkGL_u0vDiTps0eNPVZNKUrn9cIKQfNUp9ZsRRDXMLiPysiARKCCBkQiEJQjWdkrsJB-C2Vf1pxKLivvK1aLzzCs_4SHRRi7gIHw/s400/Capture3.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg18qKNlR1dOUa6uiwKfGROYJoaV_sUSJIIhwWAUmfPPwxHj6mX8R6FzqyGfvHsKdOhhVtuU5c-hemQspYGMUsTkocy1K95UMgByfBfCRN_M7Hb9XfnSgxV06ZeITEu3ekM1CsSbsQ-2u4/s1600/Capture4.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;296&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg18qKNlR1dOUa6uiwKfGROYJoaV_sUSJIIhwWAUmfPPwxHj6mX8R6FzqyGfvHsKdOhhVtuU5c-hemQspYGMUsTkocy1K95UMgByfBfCRN_M7Hb9XfnSgxV06ZeITEu3ekM1CsSbsQ-2u4/s400/Capture4.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhucVsLdI5tjeMfOiQisNK0bxa5mBkvrp2Pa9SrMDjfnEGW0tpKCStPGlAJPwrN1XgeQ2sYit-jjqxhFnZVJyayMJlfVfA4awIyDZQOWmZIaizIqwgJHUYabiIFW-zYHiitKKBNTSEE0Rc/s1600/Capture5.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;295&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhucVsLdI5tjeMfOiQisNK0bxa5mBkvrp2Pa9SrMDjfnEGW0tpKCStPGlAJPwrN1XgeQ2sYit-jjqxhFnZVJyayMJlfVfA4awIyDZQOWmZIaizIqwgJHUYabiIFW-zYHiitKKBNTSEE0Rc/s400/Capture5.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4hnnHKYhwAy7iBw1LC1diD3YlfcNYVGm9IwYnL8kCkYOjpoUHh1NoWypcMGbrMmw5lS3aOvR4MGdk7wdBuoV2yG7JaGiCraelNypGBKOCMCpPUR3wD5niNmBjiy0iDkAFAsRKoxrxvkI/s1600/Capture6.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;295&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4hnnHKYhwAy7iBw1LC1diD3YlfcNYVGm9IwYnL8kCkYOjpoUHh1NoWypcMGbrMmw5lS3aOvR4MGdk7wdBuoV2yG7JaGiCraelNypGBKOCMCpPUR3wD5niNmBjiy0iDkAFAsRKoxrxvkI/s400/Capture6.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl1AYBz1r8xOg0CKDjNXHPKB45BoW5BqjvpMtAmMuMDsq7MRExxEfih0SJInXDD2XD8tQnVIwXkmbo7zi8bzMnwwNwgg11ROWEn3g3WyWQrGO_6zlsS6rJ2GkRdbwrGcgt-icRN9_ILbk/s1600/Capture7.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;220&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl1AYBz1r8xOg0CKDjNXHPKB45BoW5BqjvpMtAmMuMDsq7MRExxEfih0SJInXDD2XD8tQnVIwXkmbo7zi8bzMnwwNwgg11ROWEn3g3WyWQrGO_6zlsS6rJ2GkRdbwrGcgt-icRN9_ILbk/s400/Capture7.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
And finally restart services and start the Management Studio.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZWdSJp0ViLblK9N34lrftAdoBVQrk8aMaE531blJrlYd6J0WT5SAyMOp3eLmO9zXZj2nP_dIekgeQF8sN1iifKdxl3oPHJ3euqbxly-SaABfGFR70FErD89qNdMimoscDj0oHUG_RtbA/s1600/Capture8.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;251&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZWdSJp0ViLblK9N34lrftAdoBVQrk8aMaE531blJrlYd6J0WT5SAyMOp3eLmO9zXZj2nP_dIekgeQF8sN1iifKdxl3oPHJ3euqbxly-SaABfGFR70FErD89qNdMimoscDj0oHUG_RtbA/s400/Capture8.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://pramodkasi.blogspot.com/feeds/8738610635382570480/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pramodkasi.blogspot.com/2012/12/evaluation-period-has-expired-sql.html#comment-form' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/8738610635382570480'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/8738610635382570480'/><link rel='alternate' type='text/html' href='http://pramodkasi.blogspot.com/2012/12/evaluation-period-has-expired-sql.html' title='Evaluation period has expired, SQL Server 2012'/><author><name>Pramod Kasi</name><uri>http://www.blogger.com/profile/17163751577158600868</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxbwxMaO-n8E0sgaVPkkXC_ZgG9z7phsl2RlbpDUrrt3xM_VTzoVx1R55PDx6iuc4lLr2JC_scijSkrVMi0yGvcb2iyNqwObroYfOFmb1fuyCGhG22fifYqktqc0WboQ/s220/0c2b7fd.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9XzCTkzCRtvyPQ4pSGpxg2m3n99lYIROlplbds1mnSYCMarPV6P1AW5PLGsaZUs5b6rsVKOu9VqBfMuwSPXUoYFe0z_0zmGfk0-Bn_He9OVKAPYJZFFJ-xAQDLG5oizZP94BVekdwy7Y/s72-c/Capture.JPG" height="72" width="72"/><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5651502447967670460.post-8095315477842866182</id><published>2012-11-30T10:30:00.002-08:00</published><updated>2012-11-30T10:30:41.816-08:00</updated><title type='text'>Role Management Tool to Install .NET FrameWork 3.5</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div&gt;
You get this error when Installing SQL Server 2012 Enterprise edition.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
Because SQL Server 2012 ships with .NET 4.0 Framework.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
And Windows 2008R2 already has 3.5 inbuilt you just need to enable the already&amp;nbsp;existed&amp;nbsp;feature within WINDOWS 2008R2 from server manager as shown below.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh83ER1eQFIk1PykF6nDV_gbBPIa-BHaDNoJ2WjVNN7u5rN5tD4FDoz7n-J_fOlNCW3S3gN7qLI5bSvZ_OmS6oNlVUjovkZblAVVR00GIQAqQE5aR3dpRZsMGOVYIF2f_v1K7HJBeJcGqM/s1600/ROLE_ERROR.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;145&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh83ER1eQFIk1PykF6nDV_gbBPIa-BHaDNoJ2WjVNN7u5rN5tD4FDoz7n-J_fOlNCW3S3gN7qLI5bSvZ_OmS6oNlVUjovkZblAVVR00GIQAqQE5aR3dpRZsMGOVYIF2f_v1K7HJBeJcGqM/s400/ROLE_ERROR.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Server Manager Enable .NET FrameWork 3.5.1 Feature.&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
Right click on computer and select Manager and browse to Features as shown below.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Once selected this feature and continue SQL Server 2012 Installation it will be go smooth.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXb3bJzqmsUOC40e1Q3AaYL1NI39tc_YrQJL1zlDB4yErskE17xkLkEzDVhLXcy-41Hf9ljVBzpoJv2npHOqPuFdCM8z_PufIhOMVlm1K3otPHltAb2of2SipStb_tYwUGRdWadjbuhc4/s1600/Servermanager.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;147&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXb3bJzqmsUOC40e1Q3AaYL1NI39tc_YrQJL1zlDB4yErskE17xkLkEzDVhLXcy-41Hf9ljVBzpoJv2npHOqPuFdCM8z_PufIhOMVlm1K3otPHltAb2of2SipStb_tYwUGRdWadjbuhc4/s400/Servermanager.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://pramodkasi.blogspot.com/feeds/8095315477842866182/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pramodkasi.blogspot.com/2012/11/role-management-tool-to-install-net.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/8095315477842866182'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/8095315477842866182'/><link rel='alternate' type='text/html' href='http://pramodkasi.blogspot.com/2012/11/role-management-tool-to-install-net.html' title='Role Management Tool to Install .NET FrameWork 3.5'/><author><name>Pramod Kasi</name><uri>http://www.blogger.com/profile/17163751577158600868</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxbwxMaO-n8E0sgaVPkkXC_ZgG9z7phsl2RlbpDUrrt3xM_VTzoVx1R55PDx6iuc4lLr2JC_scijSkrVMi0yGvcb2iyNqwObroYfOFmb1fuyCGhG22fifYqktqc0WboQ/s220/0c2b7fd.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh83ER1eQFIk1PykF6nDV_gbBPIa-BHaDNoJ2WjVNN7u5rN5tD4FDoz7n-J_fOlNCW3S3gN7qLI5bSvZ_OmS6oNlVUjovkZblAVVR00GIQAqQE5aR3dpRZsMGOVYIF2f_v1K7HJBeJcGqM/s72-c/ROLE_ERROR.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5651502447967670460.post-3150573064898548247</id><published>2012-10-04T13:40:00.001-07:00</published><updated>2012-10-04T13:41:00.771-07:00</updated><title type='text'>Shrinking Database Log Files. </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Often&amp;nbsp;many&amp;nbsp;get confused when the log grows and don&#39;t know what to do? &lt;br /&gt;
&lt;br /&gt;
So here it goes. &lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;em&gt;It is recommended that you back up the log immediately before switching the recovery model of your database From FULL TO Simple. &lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;kwd&quot;&gt;&lt;strong&gt;backup log blogs_db_log with truncate_only;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;pln&quot;&gt;You still have a point in time of recovery if your database goes down during this process. &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Step1: Change&amp;nbsp;recovery model of your&amp;nbsp;database to SIMPLE. it will truncate the log&lt;br /&gt;
Step2: Shrinking the LOG file to bare minimum. &lt;br /&gt;
Step3: Changing the recovery model to FULL. &lt;br /&gt;
Step4: If you taking periodic LogsBackups from sql agnet job take a FULL Database backup of your database because your LOG backup will fail since we changed recovery model from &lt;br /&gt;
Full&amp;gt;Simple&amp;gt;Full. &lt;br /&gt;
&lt;br /&gt;
Check your logspace on the server&lt;br /&gt;
dbcc sqlperf (logspace) &lt;br /&gt;
Check Available&amp;nbsp;Free&amp;nbsp;space on all drives&lt;br /&gt;
xp_fixeddrives&lt;br /&gt;
&lt;br /&gt;
Example to Shrink your Logfiles. &lt;br /&gt;
Step:1&lt;br /&gt;
&lt;span class=&quot;kwd&quot;&gt;use blogs_db&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;kwd&quot;&gt;go &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;kwd&quot;&gt;alter database blogs_db&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;kwd&quot;&gt;set recovery simple&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;kwd&quot;&gt;go&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;kwd&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;I am shriking to 2MB You may even opt for 0&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;kwd&quot;&gt;(It will shrink to the initial size of your Log file which you assigned while creating your Database log file) &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;kwd&quot;&gt;Step:2&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;kwd&quot;&gt;dbcc shrinkfile(glogs_db_log, 2) &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;kwd&quot;&gt;&lt;/span&gt;go&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;kwd&quot;&gt;Step:3&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;kwd&quot;&gt;alter database blogs_db&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;kwd&quot;&gt;set recovery full&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;kwd&quot;&gt;go&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;pln&quot;&gt;Optional &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;pln&quot;&gt;Step4: backup database BLogs_DB to DISK &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;pln&quot;&gt;&#39;C:\backups\BLogs_DB.BAK&#39; &lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://pramodkasi.blogspot.com/feeds/3150573064898548247/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pramodkasi.blogspot.com/2012/10/shrinking-database-log-files.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/3150573064898548247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/3150573064898548247'/><link rel='alternate' type='text/html' href='http://pramodkasi.blogspot.com/2012/10/shrinking-database-log-files.html' title='Shrinking Database Log Files. '/><author><name>Pramod Kasi</name><uri>http://www.blogger.com/profile/17163751577158600868</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxbwxMaO-n8E0sgaVPkkXC_ZgG9z7phsl2RlbpDUrrt3xM_VTzoVx1R55PDx6iuc4lLr2JC_scijSkrVMi0yGvcb2iyNqwObroYfOFmb1fuyCGhG22fifYqktqc0WboQ/s220/0c2b7fd.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5651502447967670460.post-4388852438327025307</id><published>2012-08-29T11:15:00.000-07:00</published><updated>2012-08-29T11:15:12.298-07:00</updated><title type='text'>Restore table from Backup file SQL Server 2005</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Few days before I was asked to restore a Table from a backup file? Can you really attain this in sql server 2005? Which is currently under LogShipping.&lt;br /&gt;
&lt;br /&gt;
And then I suggested easiest way to achieve your goal is&lt;br /&gt;
&lt;br /&gt;
1)&amp;nbsp; Restore backup to another server and apply all the transactions logs with NO RECOVERY and last one with RECOVERY until where you want the data to be recovered. &lt;br /&gt;
&lt;br /&gt;
2) STOP LogShipping.&lt;br /&gt;
&lt;br /&gt;
3) Rename the Table which is corrupted or which you want to restore from Backup file.&lt;br /&gt;
&lt;br /&gt;
4) Export the Table from the RESTORED Database which is in another server to the CURRENT production server.&lt;br /&gt;
&lt;br /&gt;
5) Enable Log Shipping.&lt;br /&gt;
&lt;br /&gt;
You should be good to go. &lt;br /&gt;
&lt;br /&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms189071%28v=sql.100%29&quot;&gt;How to Remove LogShipping SSMS&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://pramodkasi.blogspot.com/feeds/4388852438327025307/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pramodkasi.blogspot.com/2012/08/restore-table-from-backup-file-sql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/4388852438327025307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/4388852438327025307'/><link rel='alternate' type='text/html' href='http://pramodkasi.blogspot.com/2012/08/restore-table-from-backup-file-sql.html' title='Restore table from Backup file SQL Server 2005'/><author><name>Pramod Kasi</name><uri>http://www.blogger.com/profile/17163751577158600868</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxbwxMaO-n8E0sgaVPkkXC_ZgG9z7phsl2RlbpDUrrt3xM_VTzoVx1R55PDx6iuc4lLr2JC_scijSkrVMi0yGvcb2iyNqwObroYfOFmb1fuyCGhG22fifYqktqc0WboQ/s220/0c2b7fd.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5651502447967670460.post-2986697309611421668</id><published>2012-08-29T06:21:00.000-07:00</published><updated>2012-08-29T06:21:02.158-07:00</updated><title type='text'>Ghost Process or Ghost Cleanup Tasks in SQL Server Blocking</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span&gt;&lt;span id=&quot;_ctl5_ctlTopic&quot;&gt;&lt;span id=&quot;_ctl5_ctlTopic_ctlPanelBar&quot;&gt;&lt;span id=&quot;_ctl5_ctlTopic_ctlPanelBar_ctlTopicsRepeater__ctl18_lblFullMessage&quot;&gt;Yesterday I got a call from a user about Database not being connected or getting timed out, well actually there are many different solutions for resolving performance issues.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;&lt;span id=&quot;_ctl5_ctlTopic&quot;&gt;&lt;span id=&quot;_ctl5_ctlTopic_ctlPanelBar&quot;&gt;&lt;span id=&quot;_ctl5_ctlTopic_ctlPanelBar_ctlTopicsRepeater__ctl18_lblFullMessage&quot;&gt;But the issues what I had was not actually realated to performance there is something else I noticed behind the scene when I ran sp_who2 I had no clue.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;&lt;span id=&quot;_ctl5_ctlTopic&quot;&gt;&lt;span id=&quot;_ctl5_ctlTopic_ctlPanelBar&quot;&gt;&lt;span id=&quot;_ctl5_ctlTopic_ctlPanelBar_ctlTopicsRepeater__ctl18_lblFullMessage&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span id=&quot;_ctl5_ctlTopic&quot;&gt;&lt;span id=&quot;_ctl5_ctlTopic_ctlPanelBar&quot;&gt;&lt;span id=&quot;_ctl5_ctlTopic_ctlPanelBar_ctlTopicsRepeater__ctl18_lblFullMessage&quot;&gt;Then I ran select * from sysprocesses where blocked&amp;lt;&amp;gt;0&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;&lt;span id=&quot;_ctl5_ctlTopic&quot;&gt;&lt;span id=&quot;_ctl5_ctlTopic_ctlPanelBar&quot;&gt;&lt;span id=&quot;_ctl5_ctlTopic_ctlPanelBar_ctlTopicsRepeater__ctl18_lblFullMessage&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;&lt;span id=&quot;_ctl5_ctlTopic&quot;&gt;&lt;span id=&quot;_ctl5_ctlTopic_ctlPanelBar&quot;&gt;&lt;span id=&quot;_ctl5_ctlTopic_ctlPanelBar_ctlTopicsRepeater__ctl18_lblFullMessage&quot;&gt;to give me the list of blocked processed.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span&gt;&lt;span id=&quot;_ctl5_ctlTopic&quot;&gt;&lt;span id=&quot;_ctl5_ctlTopic_ctlPanelBar&quot;&gt;&lt;span id=&quot;_ctl5_ctlTopic_ctlPanelBar_ctlTopicsRepeater__ctl18_lblFullMessage&quot;&gt;Then I noticed GHOST CLEANUP process was constantly running and blocking the other SIPD and using most of the resources.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;&lt;span id=&quot;_ctl5_ctlTopic&quot;&gt;&lt;span id=&quot;_ctl5_ctlTopic_ctlPanelBar&quot;&gt;&lt;span id=&quot;_ctl5_ctlTopic_ctlPanelBar_ctlTopicsRepeater__ctl18_lblFullMessage&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span id=&quot;_ctl5_ctlTopic&quot;&gt;&lt;span id=&quot;_ctl5_ctlTopic_ctlPanelBar&quot;&gt;&lt;span id=&quot;_ctl5_ctlTopic_ctlPanelBar_ctlTopicsRepeater__ctl18_lblFullMessage&quot;&gt;First lets understand what is Ghost Process&amp;nbsp; or what are Ghost records.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;

&lt;strong&gt;Ghost records&lt;/strong&gt; are the records which are logically deleted but still they exist physically deleted in a page.&amp;nbsp; Just to give a brief overview, having ghost records simplfies key-range locking and 
transaction rollback.&lt;br /&gt;
&lt;br /&gt;
The Ghost record is marked with a bit that indicates it&#39;s a ghost record 
and cannot be physically deleted until the transaction that caused it to
 be ghosted commits or until the transaction is committed. As soon as it is committed, records are deleted by an asynchronous
 background process (called the ghost-cleanup task) or it is converted 
back to a real record by an insert of a record with the exact same set 
of keys.&lt;br /&gt;
&lt;br /&gt;
&lt;span&gt;&lt;span id=&quot;_ctl5_ctlTopic&quot;&gt;&lt;span id=&quot;_ctl5_ctlTopic_ctlPanelBar&quot;&gt;&lt;span id=&quot;_ctl5_ctlTopic_ctlPanelBar_ctlTopicsRepeater__ctl18_lblFullMessage&quot;&gt;&lt;b&gt;To Resolve this issue quickly,&lt;/b&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span id=&quot;_ctl5_ctlTopic&quot;&gt;&lt;span id=&quot;_ctl5_ctlTopic_ctlPanelBar&quot;&gt;&lt;span id=&quot;_ctl5_ctlTopic_ctlPanelBar_ctlTopicsRepeater__ctl18_lblFullMessage&quot;&gt;I 
disabled the Auto Create Statistics and Auto Update Statistics options 
on the database. As soon as I hit the apply button the GHOST CLEANUP 
process stopped.&lt;br /&gt;&lt;br /&gt;To me it looks like when SQL tries to 
create stats or update them, it will run the Ghost Cleanup process first
 to cleanup the indexes and tables, before getting the stats. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;&lt;span id=&quot;_ctl5_ctlTopic&quot;&gt;&lt;span id=&quot;_ctl5_ctlTopic_ctlPanelBar&quot;&gt;&lt;span id=&quot;_ctl5_ctlTopic_ctlPanelBar_ctlTopicsRepeater__ctl18_lblFullMessage&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span id=&quot;_ctl5_ctlTopic&quot;&gt;&lt;span id=&quot;_ctl5_ctlTopic_ctlPanelBar&quot;&gt;&lt;span id=&quot;_ctl5_ctlTopic_ctlPanelBar_ctlTopicsRepeater__ctl18_lblFullMessage&quot;&gt;But don&#39;t forget to create a job when you are disabling these tasks on the database. Create a job during non-business hours or when the load on the database is minimum. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://pramodkasi.blogspot.com/feeds/2986697309611421668/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pramodkasi.blogspot.com/2012/08/ghost-process-or-ghost-cleanup-tasks-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/2986697309611421668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/2986697309611421668'/><link rel='alternate' type='text/html' href='http://pramodkasi.blogspot.com/2012/08/ghost-process-or-ghost-cleanup-tasks-in.html' title='Ghost Process or Ghost Cleanup Tasks in SQL Server Blocking'/><author><name>Pramod Kasi</name><uri>http://www.blogger.com/profile/17163751577158600868</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxbwxMaO-n8E0sgaVPkkXC_ZgG9z7phsl2RlbpDUrrt3xM_VTzoVx1R55PDx6iuc4lLr2JC_scijSkrVMi0yGvcb2iyNqwObroYfOFmb1fuyCGhG22fifYqktqc0WboQ/s220/0c2b7fd.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5651502447967670460.post-1980043158566916323</id><published>2012-08-21T08:47:00.000-07:00</published><updated>2012-08-21T08:47:48.278-07:00</updated><title type='text'>Query to Find out Orphaned Users and Fixing them</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
When a restore of any database has been performed for example; SERVER A to SERVER B, Users cannot access the database on the SERVER B because they become Orphans even if they have Login ID on the SERVER B, to fix this.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
Run this to find out the list of Orphaned Users&lt;br /&gt;
&lt;br /&gt;
EXEC sp_change_users_login &#39;Report&#39;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;After finding the orphaned users report, run the following command to Fix the Orphaned Users.&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;EXEC sp_change_users_login &#39;Auto_Fix&#39;, &#39;&lt;i&gt;user&lt;/i&gt;&#39;&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create a new login with password for user it can be achieved by running the below command.&amp;nbsp;&lt;code&gt; &lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;EXEC sp_change_users_login &#39;Auto_Fix&#39;, &#39;&lt;i&gt;user&lt;/i&gt;&#39;, &#39;&lt;i&gt;login&lt;/i&gt;&#39;, &#39;&lt;i&gt;password&lt;/i&gt;&#39;&lt;/code&gt;&lt;br /&gt;

&lt;blockquote&gt;
 
&lt;/blockquote&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://pramodkasi.blogspot.com/feeds/1980043158566916323/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pramodkasi.blogspot.com/2012/08/query-to-find-out-orphaned-users-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/1980043158566916323'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/1980043158566916323'/><link rel='alternate' type='text/html' href='http://pramodkasi.blogspot.com/2012/08/query-to-find-out-orphaned-users-and.html' title='Query to Find out Orphaned Users and Fixing them'/><author><name>Pramod Kasi</name><uri>http://www.blogger.com/profile/17163751577158600868</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxbwxMaO-n8E0sgaVPkkXC_ZgG9z7phsl2RlbpDUrrt3xM_VTzoVx1R55PDx6iuc4lLr2JC_scijSkrVMi0yGvcb2iyNqwObroYfOFmb1fuyCGhG22fifYqktqc0WboQ/s220/0c2b7fd.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5651502447967670460.post-513690040976166448</id><published>2012-08-08T12:43:00.005-07:00</published><updated>2012-08-08T12:43:53.393-07:00</updated><title type='text'>Monitoring SQL Server Database Backups</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;This scripts will give you when was the last time database has been backed up. &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;select&amp;nbsp;&amp;nbsp;&amp;nbsp; sdb.name as databasename,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; coalesce(convert(varchar(12), max(bus.backup_finish_date), 101),&#39;-&#39;) as lastbackuptime&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; from &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; sys.sysdatabases sdb&lt;br /&gt;left outer join &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; msdb.dbo.backupset bus&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; on &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; bus.database_name = sdb.name&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; group by sdb.name&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&amp;nbsp;This Script will give you backup file location of a particular Database&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;** ENTER THE DATABASE NAME ** &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;
select&amp;nbsp; physical_device_name,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; backup_start_date,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; backup_finish_date,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; backup_size/1024.0 as backupsizekb&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; from &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; msdb.dbo.backupset b&lt;br /&gt;join &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; msdb.dbo.backupmediafamily m &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; on&amp;nbsp;&amp;nbsp;&amp;nbsp; b.media_set_id = m.media_set_id&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;where&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; database_name = &lt;span style=&quot;font-size: large;&quot;&gt;&lt;b style=&quot;color: red;&quot;&gt;&#39;yourdb_name&#39;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; order by backup_finish_date desc&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Check to see if your database has been backed up from the past 2days or not&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;select &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; databasename = d.name,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; latetstbackupdate = isnull(convert(varchar(30),max(b.backup_finish_date),120),&#39;no backup&#39;),&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;days&#39; = min(datediff(hh,b.backup_finish_date,getdate())) / 24,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;hours&#39; = min(datediff(hh,b.backup_finish_date,getdate())) % 24&lt;br /&gt;from &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; master.sys.databases d&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; left outer join &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; msdb.dbo.backupset b &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; on&amp;nbsp;&amp;nbsp;&amp;nbsp; d.name = b.database_name&lt;br /&gt;where &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; d.name not in (&#39;tempdb&#39;,&#39;model&#39;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; group by d.name&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; having isnull(min(datediff(hh,b.backup_finish_date,getdate())),999) &amp;gt;= 24 * 2-- change the 2 when you want to use a different amount of days&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; order by d.name &lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pramodkasi.blogspot.com/feeds/513690040976166448/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pramodkasi.blogspot.com/2012/08/monitoring-sql-server-database-backups.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/513690040976166448'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/513690040976166448'/><link rel='alternate' type='text/html' href='http://pramodkasi.blogspot.com/2012/08/monitoring-sql-server-database-backups.html' title='Monitoring SQL Server Database Backups'/><author><name>Pramod Kasi</name><uri>http://www.blogger.com/profile/17163751577158600868</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxbwxMaO-n8E0sgaVPkkXC_ZgG9z7phsl2RlbpDUrrt3xM_VTzoVx1R55PDx6iuc4lLr2JC_scijSkrVMi0yGvcb2iyNqwObroYfOFmb1fuyCGhG22fifYqktqc0WboQ/s220/0c2b7fd.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5651502447967670460.post-662808654520247558</id><published>2011-07-21T22:27:00.001-07:00</published><updated>2011-07-21T22:27:40.502-07:00</updated><title type='text'>WAIT Stats</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Query to check WAIT Stats&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; select &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; db_name(exec_re.database_id) databasename,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; wait_tsk.wait_duration_ms,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; wait_tsk.wait_type,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; exec_txt.text,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; exec_qpln.query_plan,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; wait_tsk.session_id,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; exec_ssion.cpu_time,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; exec_ssion.memory_usage,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; exec_ssion.logical_reads,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; exec_ssion.total_elapsed_time,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; exec_ssion.program_name,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; exec_ssion.status&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; from &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; sys.dm_os_waiting_tasks wait_tsk&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; inner join sys.dm_exec_requests exec_re &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; on &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; wait_tsk.session_id = exec_re.session_id&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; inner join sys.dm_exec_sessions exec_ssion &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; on&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; exec_ssion.session_id = exec_re.session_id&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; cross apply sys.dm_exec_sql_text (exec_re.sql_handle) exec_txt&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; cross apply sys.dm_exec_query_plan (exec_re.plan_handle) exec_qpln&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; where &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; exec_ssion.is_user_process = 1&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pramodkasi.blogspot.com/feeds/662808654520247558/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pramodkasi.blogspot.com/2011/07/wait-stats.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/662808654520247558'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/662808654520247558'/><link rel='alternate' type='text/html' href='http://pramodkasi.blogspot.com/2011/07/wait-stats.html' title='WAIT Stats'/><author><name>Pramod Kasi</name><uri>http://www.blogger.com/profile/17163751577158600868</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxbwxMaO-n8E0sgaVPkkXC_ZgG9z7phsl2RlbpDUrrt3xM_VTzoVx1R55PDx6iuc4lLr2JC_scijSkrVMi0yGvcb2iyNqwObroYfOFmb1fuyCGhG22fifYqktqc0WboQ/s220/0c2b7fd.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5651502447967670460.post-1255046805076463051</id><published>2011-07-21T22:25:00.001-07:00</published><updated>2011-07-21T22:26:24.182-07:00</updated><title type='text'>TempDB size</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Query to check Temp Db size immediately.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
\&lt;br /&gt;
SELECT&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [name]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AS [Logical FILE Name],&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CASE type_desc&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHEN &#39;ROWS&#39; THEN &#39;Data&#39;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHEN &#39;LOG&#39;&amp;nbsp; THEN &#39;Log&#39;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AS [FILE Type],&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; physical_name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AS [FILE PATH],&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [SIZE]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AS [FILE SIZE],&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CASE growth&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHEN 0 THEN &#39;Enabled&#39;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ELSE &#39;Disabled&#39;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AS [Auto Growth]&lt;br /&gt;
FROM tempdb.sys.database_files&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pramodkasi.blogspot.com/feeds/1255046805076463051/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pramodkasi.blogspot.com/2011/07/tempdb-size.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/1255046805076463051'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/1255046805076463051'/><link rel='alternate' type='text/html' href='http://pramodkasi.blogspot.com/2011/07/tempdb-size.html' title='TempDB size'/><author><name>Pramod Kasi</name><uri>http://www.blogger.com/profile/17163751577158600868</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxbwxMaO-n8E0sgaVPkkXC_ZgG9z7phsl2RlbpDUrrt3xM_VTzoVx1R55PDx6iuc4lLr2JC_scijSkrVMi0yGvcb2iyNqwObroYfOFmb1fuyCGhG22fifYqktqc0WboQ/s220/0c2b7fd.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5651502447967670460.post-887546249833757621</id><published>2011-06-14T22:12:00.000-07:00</published><updated>2011-06-14T22:20:36.997-07:00</updated><title type='text'>Temp DB Full and not able to Shrink? Restart SQL Server is a good option..</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;I know there are many different blogs about tempdb, but I just wanted to share what I have experienced in my environment.&amp;nbsp; TempDB was growing very fast and it already grew ~ 120GB but the used space is 100MB, general idea would be to restart the SQL Server services that way new TempDB is re-created.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;So I tried first shrinking the files.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;div class=&quot;syntaxhighlighter  sql ie&quot; id=&quot;highlighter_967779&quot;&gt;&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;gutter&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;div class=&quot;container&quot;&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code class=&quot;sql plain&quot;&gt;DBCC SHRINKFILE (&lt;/code&gt;&lt;code class=&quot;sql string&quot;&gt;&#39;tempdev&#39;&lt;/code&gt;&lt;code class=&quot;sql plain&quot;&gt;, 1024)&lt;/code&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;div&gt;&lt;div class=&quot;syntaxhighlighter  sql ie&quot; id=&quot;highlighter_967779&quot;&gt;&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;gutter&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;div class=&quot;container&quot;&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code class=&quot;sql plain&quot;&gt;DBCC SHRINKFILE (&lt;/code&gt;&lt;code class=&quot;sql string&quot;&gt;&#39;tempdev2&#39;&lt;/code&gt;&lt;code class=&quot;sql plain&quot;&gt;, 1024)&lt;/code&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code class=&quot;sql plain&quot;&gt;Still not able to shrink&lt;/code&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code class=&quot;sql plain&quot;&gt;Command(s) completed. It is of no use hmmm interesting.&amp;nbsp;&lt;/code&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code class=&quot;sql plain&quot;&gt;&lt;br /&gt;
&lt;/code&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code class=&quot;sql plain&quot;&gt;&lt;br /&gt;
&lt;/code&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code class=&quot;sql plain&quot;&gt;tempdb_ID&amp;nbsp;&lt;/code&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code class=&quot;sql plain&quot;&gt;SELECT database_id,*,session_id FROM sys.dm_exec_requests it will give you session ID and by default I believe database_id for tempDB is 2. &lt;/code&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;div style=&quot;background-color: transparent; border-color: -moz-use-text-color; border-style: none; border-width: medium; color: black; overflow: hidden; text-align: left; text-decoration: none;&quot;&gt;&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;code&quot;&gt;&lt;div class=&quot;container&quot;&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code class=&quot;sql keyword&quot;&gt;Now we will see if there are any locks or open transactions by running (DBCC OPENTRAN) on tempBD&lt;/code&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code class=&quot;sql keyword&quot;&gt;&lt;br /&gt;
&lt;/code&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;div&gt;&lt;div class=&quot;syntaxhighlighter  sql ie&quot; id=&quot;highlighter_884226&quot;&gt;&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;code&quot;&gt;&lt;div class=&quot;container&quot;&gt;&lt;div class=&quot;line number2 index1 alt1&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code class=&quot;sql keyword&quot;&gt;SELECT &lt;/code&gt;&lt;code class=&quot;sql plain&quot;&gt;* FROM &lt;/code&gt;&lt;code class=&quot;sql plain&quot;&gt;sys.dm_tran_locks&lt;/code&gt;&lt;code class=&quot;sql keyword&quot;&gt; where&lt;/code&gt; &lt;code class=&quot;sql plain&quot;&gt;resource_database_id= 2&lt;/code&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code class=&quot;sql keyword&quot;&gt;and to check open transactions you can also write query &lt;/code&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code class=&quot;sql keyword&quot;&gt;SELECT&lt;/code&gt; &lt;code class=&quot;sql plain&quot;&gt;* &lt;/code&gt;&lt;code class=&quot;sql keyword&quot;&gt;FROM&lt;/code&gt; &lt;code class=&quot;sql plain&quot;&gt;sys.dm_exec_requests &lt;/code&gt;&lt;code class=&quot;sql keyword&quot;&gt;WHERE&lt;/code&gt; &lt;code class=&quot;sql plain&quot;&gt;database_id = 2&lt;/code&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code class=&quot;sql plain&quot;&gt;I verified no locks and no open transactions.&amp;nbsp;&lt;/code&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code class=&quot;sql plain&quot;&gt;&lt;br /&gt;
&lt;/code&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code class=&quot;sql plain&quot;&gt;Now I have seen all the tables in tempDB&lt;/code&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code class=&quot;sql plain&quot;&gt;SELECT * FROM tempdb..sysobjects&amp;nbsp;&lt;/code&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-KFqc3TgwtUo/Tfg2VUxQYfI/AAAAAAAADr4/qj_lWtk0Xyc/s1600/temp.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;170&quot; src=&quot;http://3.bp.blogspot.com/-KFqc3TgwtUo/Tfg2VUxQYfI/AAAAAAAADr4/qj_lWtk0Xyc/s400/temp.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code class=&quot;sql plain&quot;&gt;This may be due to many reasons, may be a developer or user has run a query or&amp;nbsp;&lt;/code&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code class=&quot;sql plain&quot;&gt;Stored Proc that caused tempDB grow and ran out of space, by creating cached objects on tempDB. When a table is created in Cache they are TRUNCATED instead DELETE&lt;/code&gt; because these tables can be reused when the stored procedure is run again. &lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;So now what do you do?&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Clean Procedure Cache or Restart SQL Server Services? And of-course stored procedures have to be recompiled if you clean up Procedure cache, that is going to be a different topic.&amp;nbsp; But in my case I simply Cleared Procedure cache in SQL Server 2005 by executing&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;div&gt;&lt;div class=&quot;syntaxhighlighter  sql ie&quot; id=&quot;highlighter_954967&quot;&gt;&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;code&quot;&gt;&lt;div class=&quot;container&quot;&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code class=&quot;sql plain&quot;&gt;DBCC FREEPROCCACHE WITH NO_INFOMSGS (this is used to prevent information messages from begin displayed)&lt;/code&gt;&lt;code&gt; &lt;/code&gt;there by allowing my tempdb to shrink it to bare minimum.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;In sql server 2008&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;h3 class=&quot;subHeading&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Gives you plan_handle and cached entries that are reused&lt;/span&gt;&lt;/h3&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;SELECT&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; plan_handle,&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objtype,&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; usecounts,&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cacheobjtype,&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objtype,&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; text &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;FROM&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sys.dm_exec_cached_plans &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;CROSS APPLY&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sys.dm_exec_sql_text(plan_handle) &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;WHERE&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; usecounts &amp;gt; 1 &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;ORDER BY&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; usecounts DESC;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;h3 class=&quot;subHeading&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Gives you memory breakdown of all cached compiled plans&lt;/span&gt;&lt;/h3&gt;&lt;span style=&quot;font-size: small;&quot;&gt;SELECT &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; plan_handle, &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ecp.memory_object_address AS CompiledPlan_MemoryObject, &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; omo.memory_object_address, &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; pages_allocated_count, &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; type, &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; page_size_in_bytes &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;FROM &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; sys.dm_exec_cached_plans AS ecp &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;JOIN&amp;nbsp;&amp;nbsp;&amp;nbsp; sys.dm_os_memory_objects AS omo &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ON &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ecp.memory_object_address = omo.memory_object_address &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OR&amp;nbsp;&amp;nbsp;&amp;nbsp; ecp.memory_object_address = omo.parent_address&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;WHERE &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; cacheobjtype = &#39;Compiled Plan&#39;;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-CqZv5Fg7YFI/Tfg9fidH2CI/AAAAAAAADuA/zr16Oq-AHnw/s1600/te1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;50&quot; src=&quot;http://2.bp.blogspot.com/-CqZv5Fg7YFI/Tfg9fidH2CI/AAAAAAAADuA/zr16Oq-AHnw/s400/te1.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;So I took the plan_handle and cleared only that particular cache there by allowing me shrink TempDB&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;You can clear any specific plan from cache there by allowing tempdb to shrink and gain back space and avoid ing SQL Server services restart.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;DBCC FREEPROCCACHE (0x0600040057AFE42740A14D80000000000000000000000000); &lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pramodkasi.blogspot.com/feeds/887546249833757621/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pramodkasi.blogspot.com/2011/06/temp-db-full-and-not-able-to-shrink.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/887546249833757621'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/887546249833757621'/><link rel='alternate' type='text/html' href='http://pramodkasi.blogspot.com/2011/06/temp-db-full-and-not-able-to-shrink.html' title='Temp DB Full and not able to Shrink? Restart SQL Server is a good option..'/><author><name>Pramod Kasi</name><uri>http://www.blogger.com/profile/17163751577158600868</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxbwxMaO-n8E0sgaVPkkXC_ZgG9z7phsl2RlbpDUrrt3xM_VTzoVx1R55PDx6iuc4lLr2JC_scijSkrVMi0yGvcb2iyNqwObroYfOFmb1fuyCGhG22fifYqktqc0WboQ/s220/0c2b7fd.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-KFqc3TgwtUo/Tfg2VUxQYfI/AAAAAAAADr4/qj_lWtk0Xyc/s72-c/temp.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5651502447967670460.post-6561358039069492512</id><published>2011-06-12T21:53:00.000-07:00</published><updated>2011-06-12T21:53:25.870-07:00</updated><title type='text'>Cannot connect to WMI provider.Invalid namespace[0x80041010]</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Few days before I had experienced issue with the WMI not able to connect as shown in the below figure. &lt;br /&gt;
&lt;br /&gt;
&quot;Cannot connect to WMI provider. You do  not have permission or the server is unreachable. Note that you can only  manage SQL Server 2005 and later servers with the SQL Server  Configuration Manager. Invalid namespace[0x80041010]&quot;) when you install a  32-bit version of Microsoft SQL Server 2008 on 64-bit machine and you  install an 64-bit version of SQL Server 2008 on the same machine. If you  uninstall any instances you will receive the error message when you  open SQL Server Configuration Manager.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEic5k7GuTr6hQyeO7NF60w94drEgJSaazrnzxWYe_1Trr-ruyZIEkgwk-2N18QGo63OS3YskbJbc32qAaX-jXQfiWmws7xdKfiVty__1VdQONuejyDjIH4_owAUyJrbFjcm7rcc4f2rVhg/s1600/read.bmp&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;
&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjvvPKftOogKAd8MHpev66l_deilJgyJblKiUelzAhJlhhLvW3agcIe5zNQHQdL6hbvoecr-b_j5soNOo0siJP2sKIZE2nKcVLezvW_ygC1WMXVv-ugk-y4me7o22EyTA5bG4fH3lOIMo/s1600/read1.bmp&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;158&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjvvPKftOogKAd8MHpev66l_deilJgyJblKiUelzAhJlhhLvW3agcIe5zNQHQdL6hbvoecr-b_j5soNOo0siJP2sKIZE2nKcVLezvW_ygC1WMXVv-ugk-y4me7o22EyTA5bG4fH3lOIMo/s400/read1.bmp&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEic5k7GuTr6hQyeO7NF60w94drEgJSaazrnzxWYe_1Trr-ruyZIEkgwk-2N18QGo63OS3YskbJbc32qAaX-jXQfiWmws7xdKfiVty__1VdQONuejyDjIH4_owAUyJrbFjcm7rcc4f2rVhg/s1600/read.bmp&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;
&lt;/a&gt;&lt;/div&gt;When you install sql server 2008 WMI provider also gets installed and if 2005already existed on the machine then WMI provider is common for both versions, Soif you uninstall SQL Server 2008 it deletes WMI Provider. This file is located in the %programfiles(x86)% folder.&lt;br /&gt;
The WMI  (Windows Management Instrumentation) provider is a published layer that  is used with the SQL Server Configuration Manager snap-in for Microsoft  Management Console (MMC) and the Microsoft SQL Server Configuration  Manager. It provides a unified way for interfacing with the API calls  that manage the registry operations requested by SQL Server  Configuration Manager and provides enhanced control and manipulation  over the selected SQL Server services. The SQL Server WMI Provider is a  DLL and a MOF file, which are compiled automatically by SQL Server  Setup.  &lt;br /&gt;
The resolution is, open command prompt run as ADMINISTRATOR. &lt;br /&gt;
&lt;b&gt;mofcomp &quot;%programfiles(x86)%\Microsoft\Microsoft SQL Server\100\Shared\sqlmgmproviderxpsp2up.mof&quot;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;Note: The location may be different as shown in the figure below.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEic5k7GuTr6hQyeO7NF60w94drEgJSaazrnzxWYe_1Trr-ruyZIEkgwk-2N18QGo63OS3YskbJbc32qAaX-jXQfiWmws7xdKfiVty__1VdQONuejyDjIH4_owAUyJrbFjcm7rcc4f2rVhg/s1600/read.bmp&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;165&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEic5k7GuTr6hQyeO7NF60w94drEgJSaazrnzxWYe_1Trr-ruyZIEkgwk-2N18QGo63OS3YskbJbc32qAaX-jXQfiWmws7xdKfiVty__1VdQONuejyDjIH4_owAUyJrbFjcm7rcc4f2rVhg/s400/read.bmp&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pramodkasi.blogspot.com/feeds/6561358039069492512/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pramodkasi.blogspot.com/2011/06/cannot-connect-to-wmi-providerinvalid.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/6561358039069492512'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/6561358039069492512'/><link rel='alternate' type='text/html' href='http://pramodkasi.blogspot.com/2011/06/cannot-connect-to-wmi-providerinvalid.html' title='Cannot connect to WMI provider.Invalid namespace[0x80041010]'/><author><name>Pramod Kasi</name><uri>http://www.blogger.com/profile/17163751577158600868</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxbwxMaO-n8E0sgaVPkkXC_ZgG9z7phsl2RlbpDUrrt3xM_VTzoVx1R55PDx6iuc4lLr2JC_scijSkrVMi0yGvcb2iyNqwObroYfOFmb1fuyCGhG22fifYqktqc0WboQ/s220/0c2b7fd.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjvvPKftOogKAd8MHpev66l_deilJgyJblKiUelzAhJlhhLvW3agcIe5zNQHQdL6hbvoecr-b_j5soNOo0siJP2sKIZE2nKcVLezvW_ygC1WMXVv-ugk-y4me7o22EyTA5bG4fH3lOIMo/s72-c/read1.bmp" height="72" width="72"/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5651502447967670460.post-4625282736613902925</id><published>2011-06-07T21:54:00.000-07:00</published><updated>2011-06-07T21:54:17.634-07:00</updated><title type='text'>DMV sys.dm_os_waiting_tasks and sys.dm_exec_requests – Wait Type</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;This Query gives the current processes running in SQL Server. Also if you want to know what is stored in the Cache or what is running . &lt;br /&gt;
&lt;br /&gt;
Once this is run you will get the following info.&lt;br /&gt;
&lt;br /&gt;
wait_duration_ms – Means current wait of the query which is run at that time.&lt;br /&gt;
wait_type – Means the current wait type of the query&lt;br /&gt;
text – Has the Query in TEXT FORMAT&lt;br /&gt;
query_plan – Gives you the Query plan which could be very helpful to find some missing inxexes, etc and all that fun stuff.&lt;br /&gt;
Session_id, and all others(Columns) are pretty much self explanatory. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; select &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; db_name(exec_re.database_id) databasename,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; wait_tsk.wait_duration_ms,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; wait_tsk.wait_type,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; exec_txt.text,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; exec_qpln.query_plan,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; wait_tsk.session_id,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; exec_ssion.cpu_time,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; exec_ssion.memory_usage,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; exec_ssion.logical_reads,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; exec_ssion.total_elapsed_time,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; exec_ssion.program_name,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; exec_ssion.status&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; from &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; sys.dm_os_waiting_tasks wait_tsk&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; inner join sys.dm_exec_requests exec_re &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; on &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; wait_tsk.session_id = exec_re.session_id&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; inner join sys.dm_exec_sessions exec_ssion &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; on&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; exec_ssion.session_id = exec_re.session_id&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; cross apply sys.dm_exec_sql_text (exec_re.sql_handle) exec_txt&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; cross apply sys.dm_exec_query_plan (exec_re.plan_handle) exec_qpln&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; where &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; exec_ssion.is_user_process = 1&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pramodkasi.blogspot.com/feeds/4625282736613902925/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pramodkasi.blogspot.com/2011/06/dmv-sysdmoswaitingtasks-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/4625282736613902925'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/4625282736613902925'/><link rel='alternate' type='text/html' href='http://pramodkasi.blogspot.com/2011/06/dmv-sysdmoswaitingtasks-and.html' title='DMV sys.dm_os_waiting_tasks and sys.dm_exec_requests – Wait Type'/><author><name>Pramod Kasi</name><uri>http://www.blogger.com/profile/17163751577158600868</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxbwxMaO-n8E0sgaVPkkXC_ZgG9z7phsl2RlbpDUrrt3xM_VTzoVx1R55PDx6iuc4lLr2JC_scijSkrVMi0yGvcb2iyNqwObroYfOFmb1fuyCGhG22fifYqktqc0WboQ/s220/0c2b7fd.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5651502447967670460.post-8580060086228424493</id><published>2011-06-06T12:54:00.000-07:00</published><updated>2011-06-06T12:54:11.398-07:00</updated><title type='text'>SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED NO LOCK</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Everyone undergoes a blocking or locking issues when one forgets to write&lt;br /&gt;
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED NO LOCK or what ever...&lt;br /&gt;
&lt;br /&gt;
In order to avoid such situation and which can also save a lot of time, you can setup READ UNCOMMITTED Option From SSMS&amp;gt;Tools&amp;gt;Options&amp;gt; Query Execution SQL Server&amp;gt; Advanced as shown below. also there is whole bunch of options available where you can play with ..&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;float: left; margin-right: 1em; text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8GFtOb3YLsK0q1YSr-eME9U4ew2T4kvuzdHLe1SvmPckJtRfM0_im6K6DEAj-Ku4jpy_j3I48iGuxqFbNTN1Hmc-j7cC7Eezr1yO_4rGmMT_X7h3WPBkqRu-cSC77mIIdXEwXDIqoriw/s1600/read.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;230&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8GFtOb3YLsK0q1YSr-eME9U4ew2T4kvuzdHLe1SvmPckJtRfM0_im6K6DEAj-Ku4jpy_j3I48iGuxqFbNTN1Hmc-j7cC7Eezr1yO_4rGmMT_X7h3WPBkqRu-cSC77mIIdXEwXDIqoriw/s400/read.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Setting up Isolation Level&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pramodkasi.blogspot.com/feeds/8580060086228424493/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pramodkasi.blogspot.com/2011/06/set-transaction-isolation-level-read.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/8580060086228424493'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/8580060086228424493'/><link rel='alternate' type='text/html' href='http://pramodkasi.blogspot.com/2011/06/set-transaction-isolation-level-read.html' title='SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED NO LOCK'/><author><name>Pramod Kasi</name><uri>http://www.blogger.com/profile/17163751577158600868</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxbwxMaO-n8E0sgaVPkkXC_ZgG9z7phsl2RlbpDUrrt3xM_VTzoVx1R55PDx6iuc4lLr2JC_scijSkrVMi0yGvcb2iyNqwObroYfOFmb1fuyCGhG22fifYqktqc0WboQ/s220/0c2b7fd.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8GFtOb3YLsK0q1YSr-eME9U4ew2T4kvuzdHLe1SvmPckJtRfM0_im6K6DEAj-Ku4jpy_j3I48iGuxqFbNTN1Hmc-j7cC7Eezr1yO_4rGmMT_X7h3WPBkqRu-cSC77mIIdXEwXDIqoriw/s72-c/read.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5651502447967670460.post-2680029988899847004</id><published>2011-06-05T16:06:00.000-07:00</published><updated>2011-06-05T16:06:34.483-07:00</updated><title type='text'>Linked Server errors Microsoft SQL Server, Error:7411)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Server &#39;ServerName&#39; is not configured for DATA ACCESS (Microsoft SQL Server, Error: 7411)&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSYiZJrfUeXt85wDPH57C_cwWa20P3NoFirtm9MqPcrblCLEXPnDqUso_zwKTW79c37ScJ2JxKA2SK4_t-XbzXfV6ikxMv4QU91HRgrbEPWTHOIv9RXpNFucxn8QtLYiAI5bct3hMGEyQ/s1600/Linkedservererror.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;125&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSYiZJrfUeXt85wDPH57C_cwWa20P3NoFirtm9MqPcrblCLEXPnDqUso_zwKTW79c37ScJ2JxKA2SK4_t-XbzXfV6ikxMv4QU91HRgrbEPWTHOIv9RXpNFucxn8QtLYiAI5bct3hMGEyQ/s400/Linkedservererror.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
This occurs if any of the following are not configured, even if you are trying to security.&lt;br /&gt;
Not be Made,be made without using a security context, login;s security context and using security context.&lt;br /&gt;
Data access, RPC, RPC Out, Use Remote collation has to be configured in-order to set up linked server without having 7411 error.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7Dlikom1IZ6kcznoK5vtNMLwQAFqly6An8TOAO_IBAaZSh_RQ0o-7dyGoLxy7ey9TvXzUs_-N3vqSLxLwcsZtzRFCZPcYYMY3Aj5BOovgtGVR36w0aHOEZDMkfLHDDUCqTyNHYkkrJsw/s1600/linkedserver.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;347&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7Dlikom1IZ6kcznoK5vtNMLwQAFqly6An8TOAO_IBAaZSh_RQ0o-7dyGoLxy7ey9TvXzUs_-N3vqSLxLwcsZtzRFCZPcYYMY3Aj5BOovgtGVR36w0aHOEZDMkfLHDDUCqTyNHYkkrJsw/s400/linkedserver.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pramodkasi.blogspot.com/feeds/2680029988899847004/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pramodkasi.blogspot.com/2011/06/linked-server-errors-microsoft-sql.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/2680029988899847004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5651502447967670460/posts/default/2680029988899847004'/><link rel='alternate' type='text/html' href='http://pramodkasi.blogspot.com/2011/06/linked-server-errors-microsoft-sql.html' title='Linked Server errors Microsoft SQL Server, Error:7411)'/><author><name>Pramod Kasi</name><uri>http://www.blogger.com/profile/17163751577158600868</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxbwxMaO-n8E0sgaVPkkXC_ZgG9z7phsl2RlbpDUrrt3xM_VTzoVx1R55PDx6iuc4lLr2JC_scijSkrVMi0yGvcb2iyNqwObroYfOFmb1fuyCGhG22fifYqktqc0WboQ/s220/0c2b7fd.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSYiZJrfUeXt85wDPH57C_cwWa20P3NoFirtm9MqPcrblCLEXPnDqUso_zwKTW79c37ScJ2JxKA2SK4_t-XbzXfV6ikxMv4QU91HRgrbEPWTHOIv9RXpNFucxn8QtLYiAI5bct3hMGEyQ/s72-c/Linkedservererror.png" height="72" width="72"/><thr:total>5</thr:total></entry></feed>