Friday, October 25, 2013

Using a self-signed ssl certificate for SSRS 2008 R2

1. Open IIS 7, click on the computer you wish to create the certificate for.  In the Content View double click on Server Certificates.
2. The top right has an “Actions” menu.  Click on “Create self-signed Certificate Request”
3. Type in a name for your certificate .
4.  Launch Reporting Services Configuration Manager, go to “Web Service URL”, select your newly created SSL certificate from the list and click apply.

Wednesday, October 2, 2013

Check the enforced password expiration setting of all users on SQL Server


select name,is_expiration_checked
from sys.sql_logins
where is_expiration_checked=1

Monday, September 16, 2013

SQL Server Trace Files (Database Schema Chang History)

EXEC master.dbo.sp_configure 'allow updates', 1;
GO
EXEC master.dbo.sp_configure 'show advanced options', 1;
GO
EXEC master.dbo.sp_configure 'default trace enabled', 1;
GO
RECONFIGURE WITH OVERRIDE;
GO

SELECT * FROM sys.configurations WHERE configuration_id = 1568

SELECT * FROM ::fn_trace_getinfo(0)

SELECT   * FROM sys.traces
WHERE id = 1;

Wednesday, June 26, 2013

How to Find the Original Install Date and Time of Windows OS

 cmd /k systeminfo | find "Original Install Date" 

Wednesday, June 19, 2013

Checking SET Options for the Current Session in SQL Server

DECLARE @options INT

SELECT @options = @@OPTIONS

PRINT @options
IF ( (1 & @options) = 1 ) PRINT 'DISABLE_DEF_CNST_CHK'
IF ( (2 & @options) = 2 ) PRINT 'IMPLICIT_TRANSACTIONS'
IF ( (4 & @options) = 4 ) PRINT 'CURSOR_CLOSE_ON_COMMIT'
IF ( (8 & @options) = 8 ) PRINT 'ANSI_WARNINGS'
IF ( (16 & @options) = 16 ) PRINT 'ANSI_PADDING'
IF ( (32 & @options) = 32 ) PRINT 'ANSI_NULLS'
IF ( (64 & @options) = 64 ) PRINT 'ARITHABORT'
IF ( (128 & @options) = 128 ) PRINT 'ARITHIGNORE'
IF ( (256 & @options) = 256 ) PRINT 'QUOTED_IDENTIFIER'
IF ( (512 & @options) = 512 ) PRINT 'NOCOUNT'
IF ( (1024 & @options) = 1024 ) PRINT 'ANSI_NULL_DFLT_ON'
IF ( (2048 & @options) = 2048 ) PRINT 'ANSI_NULL_DFLT_OFF'
IF ( (4096 & @options) = 4096 ) PRINT 'CONCAT_NULL_YIELDS_NULL'
IF ( (8192 & @options) = 8192 ) PRINT 'NUMERIC_ROUNDABORT'
IF ( (16384 & @options) = 16384 ) PRINT 'XACT_ABORT'

http://www.mssqltips.com/sqlservertip/1415/determining-set-options-for-a-current-session-in-sql-server/

Monday, June 17, 2013

Plan cache and optimizing for adhoc workloads (fixing plan cache bloat problem)

SELECT objtype AS [CacheType]
        , count_big(*) AS [Total Plans]
        , sum(cast(size_in_bytes as decimal(18,2)))/1024/1024 AS [Total MBs]
        , avg(usecounts) AS [Avg Use Count]
        , sum(cast((CASE WHEN usecounts = 1 THEN size_in_bytes ELSE 0 END) as decimal(18,2)))/1024/1024 AS [Total MBs - USE Count 1]
        , sum(CASE WHEN usecounts = 1 THEN 1 ELSE 0 END) AS [Total Plans - USE Count 1]
FROM sys.dm_exec_cached_plans
GROUP BY objtype
ORDER BY [Total MBs - USE Count 1] DESC
go

Turn "Optimize for Ad Hoc Workloads" on

http://www.sqlskills.com/blogs/kimberly/plan-cache-and-optimizing-for-adhoc-workloads/

Thursday, May 23, 2013

enables the SQL Server Agent extended stored procedures in SQL Server 2012


The possible values are:

0, indicating that SQL Server Agent extended stored procedures are not available (the default).

1, indicating that SQL Server Agent extended stored procedures are available.


The following example enables the SQL Server Agent extended stored procedures.

sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
sp_configure 'Agent XPs', 1;
GO
RECONFIGURE
GO

Thursday, April 4, 2013

Installing Web Front End Only requires install from command line


If you want to install just a web front end, you have to run the install from the command line. 

Follow the instructions at http://technet.microsoft.com/en-us/library/cc262897.aspx and create a config file for server type="WFE"

Thursday, March 28, 2013

Allowing other machines to use filesharing via the DNS Alias in Windows OS


Allowing other machines to use filesharing via the DNS Alias (DisableStrictNameChecking)

This change alone will allow other machines on the network to connect to the machine using any arbitrary hostname. (However this change will not allow a machine to connect to itself via a hostname, see BackConnectionHostNames below).

    Edit the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters and add a value DisableStrictNameChecking of type DWORD set to 1.

    Edit the registry key (on 2008 R2) HKLM\SYSTEM\CurrentControlSet\Control\Print and add a value DnsOnWire of type DWORD set to 1

Wednesday, March 20, 2013

SSIS Services 32 and 64 bit with Oracle Clients

Win2003+ SQL2005SSIS + two Oracle Homes (32,64bit)

Win2008+SQL2005SSIS + two Oracle Homes (32,64bit)

Win2008+SQL2008SSIS +One Oracle Home (32,64bit)

Tuesday, March 19, 2013

Rebuild System databases on SQL 2005

start /wait "T:\Installation\SQL 2005 64Ent\Disk1\setup.exe" /qn INSTANCENAME=PROD REINSTALL=SQL_Engine REBUILDDATABASE=1 SAPWD=1.uwsw0542

Thursday, February 28, 2013

Error 1053: The service did not respond to the start or control request in a timely fashion ---- Fixed

1.Click Start, click Run, type regedit, and then click OK.

2.Locate and then click the following registry subkey:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control

3.In the right pane, locate the ServicesPipeTimeout entry.

Note If the ServicesPipeTimeout entry does not exist, you must create it. To do this, follow these steps:

a.On the Edit menu, point to New, and then click DWORD Value.

b.Type ServicesPipeTimeout, and then press ENTER.

4.Right-click ServicesPipeTimeout, and then click Modify.

5.Click Decimal, type 60000, and then click OK.

This value represents the time in milliseconds before a service times out.

6.Restart the computer.

Wednesday, February 20, 2013

Github Vs Bitbucket

http://www.pocoo.org/~blackbird/github-vs-bitbucket/bitbucket.html

http://getcomparisons.com/github-vs-bitbucket

Thursday, January 3, 2013

VMware for MAC OS X Mount Lion

mainMem.useNamedFile = "FALSE"

VMware Mac OS X Mountain Lion