Applies to | Version Range | Type | Description | Target Version | Release Date | Security Bulletins | KB | Download | |
SQL Server 2000 | Below 8.00.2039 | Service Pack | SQL Server 2000 SP4 | 8.00.2039 | 6-Jun-05 | ||||
SQL Server 2000 | 8.00.2039-8.00.2054 | GDR | SQL Server 2000 SP4 GDR | 8.00.2055 | 10-Feb-09 | ||||
SQL Server 2000 | 8.00.2148-8.00.2281 | QFE | SQL Server 2000 SP4 QFE | 8.00.2282 | 10-Feb-09 | ||||
SQL Server 2005 | Below 9.00.4035 | Service Pack | SQL Server 2005 SP3 | 9.00.4035 | 15-Dec-08 | N/A | |||
SQL Server 2005 | 9.00.4035-9.00.4052 | GDR | SQL Server 2005 SP3 GDR | 9.00.4053 | 12-Oct-09 | ||||
SQL Server 2005 | 9.00.4205-9.00.4261 | QFE | SQL Server 2005 SP3 QFE | 9.00.4262 | 12-Oct-09 | ||||
SQL Server 2008 | Below 10.00.2531 | Service Pack | SQL Server 2008 SP1 | 10.00.2531.00 | 27-Aug-09 | N/A |
| ||
It lists only the latest SQL Server Service Pack and Security Hot fixes as on 22nd April 2010 | |||||||||
Thursday, April 22, 2010
SQL Server Latest Service Pack and Security Hot fixes
Software Asset Management - SAM
Software Inventory Assistance
Whether we have just a few computers or a large network, a software inventory tool can make it easier to quickly know what we have and how it's being used.
The Microsoft Software Inventory Analyzer (MSIA) is a free tool available for download that can help us with our software inventory. It is built specifically to be a starting point to working with SAM.
We can use the MSIA to scan and inventory the Microsoft software that is installed on a single computer, or on multiple computers throughout a network. It generates a report that provides details of all installed Microsoft products, including the type and the number of licenses. The MSIA will work with networks that have 250 or fewer computers. The latest MSIA 5.1 features enable you to:
- Identify and report all installed Microsoft products listed under Add or Remove Programs.
- Consolidate the MSIA report with the Microsoft Licensing Statement (MLS) report (.xls only).
This information is useful for you, if you are taking care of the system administration, licensing and inventory of Microsoft software products in your organization.
BgInfo
BgInfo – Microsoft Windows SysInternal tool
How many times have you walked up to a system in your office and needed to click through several diagnostic windows to remind yourself of important aspects of its configuration, such as its name, IP address, or operating system version If you manage multiple computers you probably need BGInfo. It automatically displays relevant information about a Windows computer on the desktop's background, such as the computer name, IP address, service pack version, and more. You can edit any field as well as the font and background colors, and can place it in your startup folder so that it runs every boot, or even configure it to display as the background for the logon screen.
Wednesday, April 21, 2010
SQL Server 2005/ 2008 Query to find when the database last used
Below is the TSQL Query to find when the database last accessed for SQL Server 2005 / 2008
-- Query to find when the database last accessed on SQL Server 2005 / 2008 --- select d.name, x1 = (select X1= max(bb.xx) from ( select xx = max(last_user_seek) where max(last_user_seek) is not null union all select xx = max(last_user_scan) where max(last_user_scan) is not null union all select xx = max(last_user_lookup) where max(last_user_lookup) is not null union all select xx = max(last_user_update) where max(last_user_update) is not null) bb) FROM master.dbo.sysdatabases d left outer join sys.dm_db_index_usage_stats s on d.dbid= s.database_id group by d.name |
Differentiate your connections to SQL Instances by coloring it
What would be the case. have you ever connected to a server, thought it was a testing or development system, and only a split second after you pressed "F5" to run that command, realized that it was the production server? Yeah….me neither :).
To make sure that's never you, when you start SQL Server 2008 Management Studio (SSMS), stop for a moment on the connection dialog and press "Options". You'll see that you can select a color for the connection – I set mine to red for production servers, yellow for testing servers, and green for development servers.
Once inside SSMS, you can also set the default color for all connections – I do this and set them all to red, so that if I forget, at least I'll have that visual indicator to make sure the change I'm making is on the right server.
It helps on classifying the SQL Server Instances by Production, Development, Test or QA etc.
Tuesday, April 20, 2010
Format Date or Time without “/”
Format the date or time without dividing characters, as well as concatenate the date and time string:
Sample statement | Output |
select replace(convert(varchar, getdate(),111),'/','') | 20100413 |
select replace(convert(varchar, getdate(),101),'/','') + replace(convert(varchar, getdate(),108),':','') | 20100413 004426 |
Select cast(int, convert(char,getdate(),111)) | 20100413 |
Monday, April 19, 2010
Remote Desktop Error - The terminal server has exceeded the maximum number of allowed connections
When trying to connect using a remote desktop session you may get this Login Failure Message, because there are too many remote sessions
To resolve the exceeded connection issue execute "mstsc /admin" ( mstsc /console )command from the command prompt as shown below
If a terminal server has exceed the maximum number of sessions an "/admin" session can still be created and this will allow you to still connect to the server.
The /admin sessions don't count towards the session limit that may be configured on a terminal server to limit the number of remote sessions, so this will give you a back door into the server if you get the message "The terminal server has exceeded the maximum number of allows connections".
Monday, April 12, 2010
SQL Server - Patching : An Incremental Servicing Model is available from the SQL Server team to deliver hotfixes for reported problems
The SQL Server team is moving away from the current priority-driven hotfix release model to a scheduled delivery model. In the scheduled delivery model, a customer can receive a hotfix to address their most critical situations with a short turn-around time. Additionally, a customer can receive a fix that has undergone more testing and that is released on a schedule basis. Therefore, the SQL Server team has created the following delivery mechanisms.
Critical On Demand - COD | On Demand- OD | Cumulative Update - CU | General Distribution Release - GDR |
The hotfix is released on or before a mutually agreed upon date based on the customer's need | The hotfix is released on or before a mutually agreed upon date based on the customer's need | The update is released every 2 months. | A GDR addresses an issue that has a broad customer impact, that has security implications, or that has both. A GDR is determined and issued by Microsoft as appropriate and when appropriate. GDRs are kept to a minimum. |
It contains all previous critical on-demand hotfixes to date. |
ISM eliminates the need for hotfix rollup releases. The first CU after a new release contains the hotfix rollup, plus any additional QFEs.
A hotfix package does not replace a service pack. A hotfix package is optional. A hotfix package can be installed or uninstalled at any time. Additionally, hotfix packages are cumulative. Therefore, the latest OD hotfix package or CU hotfix package includes all previously released hotfixes.
Quick Fix Engineering - QFEs are used for the majority of fixes where the effects of the problem are not widespread or severe enough to warrant a GDR.
Monday, February 08, 2010
Can we have database on SIMPLE Recovery model for Transactional Replication?
Yes. We can have Publisher database on SIMPLE recovery model.
The reason is that;
- When executing, the Log Reader Agent first reads the publication transaction log and identifies any INSERT, UPDATE, and DELETE statements, or other modifications made to the data transactions that have been marked for replication. Next, the agent batch copies those transactions to the distribution database at the Distributor.
- The Log Reader Agent uses the internal stored procedure sp_replcmds to get the next set of commands marked for replication from the log. The distribution database then becomes the store-and-forward queue from which changes are sent to Subscribers. Only committed transactions are sent to the distribution database.
- Only committed transactions are sent to the distribution database by LogReader agent.
- After the entire batch of transactions has been written successfully to the distribution database, it is committed. Following the commit of each batch of commands to the Distributor, the Log Reader Agent calls sp_repldone to mark where replication was last completed.
- Finally, the agent marks the rows in the transaction log that are ready to be truncated. Rows still waiting to be replicated are not truncated
- The transaction log on the Publisher can be dumped without interfering with replication, because only transactions not marked for replication are purged.
Thursday, January 14, 2010
SQL Server 2005 Cluster: SQL Server Service not coming online, error on TCP port is already in use
SQL Server Error Log:
2010-06-04 15:19:37.520 Server Server is listening on [ 10.0.0.136 <ipv4> 2813].
2010-06-04 15:19:37.530 Server Error: 26023, Severity: 16, State: 1.
2010-06-04 15:19:37.530 Server Server TCP provider failed to listen on [ 10.0.0.136 <ipv4> 2813]. Tcp port is already in use.
2010-06-04 15:19:37.530 Server Error: 17182, Severity: 16, State: 1.
2010-06-04 15:19:37.530 Server TDSSNIClient initialization failed with error 0x2740, status code 0xa.
2010-06-04 15:19:37.530 Server Error: 17182, Severity: 16, State: 1.
2010-06-04 15:19:37.530 Server TDSSNIClient initialization failed with error 0x2740, status code 0x1.
2010-06-04 15:19:37.530 Server Error: 17826, Severity: 18, State: 3.
2010-06-04 15:19:37.530 Server Could not start the network library because of an internal error in the network library. To determine the cause, review the errors immediately preceding this one in the error log.
2010-06-04 15:19:37.530 Server Error: 17120, Severity: 16, State: 1.
2010-06-04 15:19:37.530 Server SQL Server could not spawn FRunCM thread. Check the SQL Server error log and the Windows event logs for information about possible related problems.
Event Viewer Error
Event Type: Error
Event Source: MSSQL$PROD2K5ISD
Event Category: (2)
Event ID: 26023
Date: 4/06/2010
Time: 2:51:31 PM
User: N/A
Computer: PROD2K5ISD
Description:
Server TCP provider failed to listen on [ 10.0.0.136 <ipv4> 2813]. Tcp port is already in use.
Resolution
Monday, January 11, 2010
SQL Server 2005 /2008 Express Edition Backup automation
SQL Database Backup Script
| declare @IDENT INT, @sql varchar(1000), @DBNAME VARCHAR(200)
select @IDENT=min(DBID) while @IDENT is begin SELECT @DBNAME = NAME FROM /*Change disk location here as required*/ SELECT @SQL = PRINT @SQL EXEC (@SQL) select @IDENT=min(DBID) end |
DOS Batch files to backup the databases
| @echo off c: if not exist c:\SQLBackup\Logs MD C:\SQLbackup\Logs if not exist c:\SQLBackup\Backup MD C:\SQLbackup\Backup cd c:\SQLBackup Echo Backup Started >> c:\SQLBackup\Logs\SQLBAckup.log Date /T > c:\SQLBackup\Logs\SQLBAckup.log Time /T >> c:\SQLBackup\Logs\SQLBAckup.log Echo. echo *************************************************************************** >> c:\SQLBackup\Logs\SQLBAckup.log isql -S (local)\Express -E -i c:\sqlbackup\backup.sql >> c:\SQLBackup\Logs\SQLBAckup.log echo *************************************************************************** >> c:\SQLBackup\Logs\SQLBAckup.log echo. Date /T >> c:\SQLBackup\Logs\SQLBAckup.log Time /T >> c:\SQLBackup\Logs\SQLBAckup.log echo Backup Finished >> c:\SQLBackup\Logs\SQLBAckup.log echo. echo *************************************************************************** >> c:\SQLBackup\Logs\SQLBAckup.log |
Folders will look like,
Schedule it on Windows Task Scheduler
That's it the SQL Server 2005 / 2008 Express Edition database backup is automated now!
Sunday, December 13, 2009
SQL Server Lever collation change
2. If applicable, backup DTS packages, Jobs, SSIS packages, mailing profiles or other objects installed by the application.
3. Script/take screenshot of logins with level of access on server level as well as the database level, user objects for example - tables, functions, types and stored procs, extended stored procs, if any on model or master db.
4. Detach all the user databases.
5. Rebuild the master database specifying the new collation in the SQLCOLLATION property of the setup command. For example:
start /wait setup.exe /qb INSTANCENAME=MSSQLSERVER REINSTALL=SQL_Engine REBUILDDATABASE=1 SAPWD=test SQLCOLLATION=SQL_Latin1_General_CP1_CI_AI
6. Check the tempdb collation and it should be ?Latin1_General_CI_AS? create users with help of screenshot/Script and restore user objects from step 3. Run scripts for functions and types if any.
7. Attach user databases from step 4 / Restore all the databases from the backup from step 1 and all the objects from the backup taken in step1. Refer client mail for further clarifications.
Wednesday, November 25, 2009
Error message when you open SQL Server Configuration Manager in SQL Server 2008: "Cannot connect to WMI provider. You do not have permission or the se
"Cannot connect to WMI provider. You do not have permission or the server is unreachable"
Cause:
This problem occurs because the WMI provider is removed when you uninstall an instance of SQL Server 2008. The 32-bit instance and the 64-bit instance of SQL Server 2008 share the same WMI configuration file. This file is located in the %programfiles(x86)% folder.
Workaround:
To work around this problem, type the following command, and then press ENTER:
mofcomp "%programfiles(x86)%\Microsoft\Microsoft SQL Server\100\Shared\sqlmgmproviderxpsp2up.mof"
Refer the KB# 956013
Tuesday, November 24, 2009
The SQL Server Service Broker or Database Mirroring transport is disabled or not configured
The Service Broker is enabled by default in SQL Server 2005. Service Broker is enabled by default when a new database is created. Please try to run the following query to see the Broker option on a database.
SELECT name, is_broker_enabled FROM sys.databases;
This alert is triggered by event 9666 in the Application Event log for the OpsMgr database server.However, this event is always generated when you restart SQL because neither the Service Broker nor Database Mirroring are enabled for the Master or
Model databases. "SELECT is_broker_enabled FROM sys.databases" identifies
that the Service Broker is enabled for all other DBs. The alert is a bit counter productive if the rule is there to try to identify which databases are missing this option that actually need it; e.g. the OpsMgr db.Currently my only option is to disable the rule.
Monday, November 23, 2009
How to Script Database Schema
2. Select Tasks --> Generate Scripts
3. Select all the objects in the selected databases
4. Select the appropriate General & Table Options
5. Select the output format
Thursday, November 19, 2009
Testing a Connection from Client to SQL Server using UDL
Step 1 - Create a .udl file
Create a text file and name it for example test.udl
Double click on test.udl to open the connection dialog.
Step 2 - Choose the type of connection
Go to the first tab “Provider”
Choose “Microsoft OLE DB Provider for SQL Server” or any other provider according to your needs.
Step 3 - Set up connection properties
Go to the second tab “Connection”, choose the server, enter username/password and choose a database from the drop down list.
Step 4 - Connection String
Once you click on “OK” a connection string based on your connection settings is written to test.udl. After you open test.udl you will find a connection string like this.
[oledb]; Everything after this line is an OLE DB initstringProvider=SQLOLEDB.1;Password=wrf%32g;Persist Security Info=True;User ID=siva;Initial Catalog=msdb;Data Source=SQLTEST
Sunday, October 11, 2009
CPU usage reaching 100% with SP3 on SQL Server 2005
You install an instance of Microsoft SQL Server 2005 on a computer that has many processors. You upgrade to SQL Server 2005 Service Pack 3 (SP3) or to Microsoft SQL Server 2008. You run a query that uses the Like operator in the WHERE clause or that uses a string comparison function, such as the CharIndex() function. When you run the query many times on multiple connections at the same time, the CPU usage reaches 100 percent, and the server performance decreases significantly.
Then refer the Microsoft article and apply the cumulative update
No Surface Area Configuration (SAC) Tool in SQL Server 2008
So how to do the functionality of SAC configuring Service, Connection and features?
1. For Instance and Database Engine Features:
Select Facets on Properties of Instance / Database on SQL Server Management Studio.
2.For Connections, Protocols and StartUp options:
Use SQL Server Configuration Manager
3.SSAS Features:
It can be done at Property Settings
4.SSRS Features
It can be done by editing the RSReportServer.config file or by using the facets feature
Saturday, September 26, 2009
Feature Pack for Microsoft SQL Server 2005 and SQL Server 2008
SQL Server 2005
SQL Server 2008
SQL Agent fails on SQL Server 2005
[298] SQLServer Error: 21, Encryption not supported on the client. [SQLSTATE 08001]
[298] SQLServer Error: 21, Client unable to establish connection [SQLSTATE 08001]
[165] ODBC Error: 0, An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. [SQLSTATE 08001]
[000] Unable to connect to server '
[298] SQLServer Error: 21, Encryption not supported on the client. [SQLSTATE 08001]
[298] SQLServer Error: 21, Client unable to establish connection [SQLSTATE 08001]
[165] ODBC Error: 0, An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. [SQLSTATE 08001]
[382] Logon to server '
[098] SQLServerAgent terminated (normally)
Resolution:
-----------
Client side setting would have messed up. Please go to SQL Server Configuration Manager and click properties for "SQL Native Client Configuration", if correct, you should be able to see two flags, one is "force client encryption", the other one is "trust server certificate" and value were set "yes" or "no".
If you see "No properties are available", that means your client registry key was messed up and leads to the connection error . To fix this, suggest reinstall SNAC(SQL Native Client). Just run the sqlncli.msi
Monday, September 21, 2009
Microsoft SQL Server 2008 advantages over Oracle 11g
Microsoft SQL Server 2008 advantages over Oracle 11g
* Better Performance and Scalability: SQL Data Services, Filtered Indexes, Advanced Sparse Columns, Column Prefix Compression
* Better Security: Module Signing using Certificate, and integrated updates and patching
* Better Business Intelligence (BI) tools: Optimized cube designers, on-demand processing and instance-based rendering, optimized integration with the 2007 Microsoft Office system
Find more on here
Thursday, September 17, 2009
Get up to 25% off Select Microsoft Certification Exams
Find the exam of your choosing from the lists below and select "Get Voucher," complete the registration form and your discounted voucher code will be emailed to you. Once you have obtained your code, plan and schedule your next exam at http://www.prometric.com/Microsoft/default.htm.
http://www.prometric.com/microsoft/careeroffer.htm
* Step 1: Using the voucher number, schedule and pay for your initial exam via Prometrics's web site
o You will need to have your voucher number available during the registration process.
* Step 2: Take your exam.
Candidates must register, schedule and take their discounted exams by December 31
Wednesday, September 16, 2009
How to reset Internel Protocol TCP / IP
Use the command below:
netsh int ip reset c:\resetlog.txt
Reference : How to reset Internet Protocol (TCP/IP)
Monday, September 14, 2009
You may be unable to use a Cisco VPN client and IPsec at the same time in Windows XP
You may be unable to use the following components at the same time in Microsoft Windows XP, in Microsoft Windows 2000, or in Microsoft Windows Server 2003 Standard Edition with Service Pack 1 (SP1):
* A Cisco virtual private network (VPN) client
* The Internet Protocol security (IPsec) implementation that is built into Windows XP, Windows 2000, and Windows Server 2003
In this situation, you cannot use a VPN tunnel to access resources on an enterprise network on which Domain and Server Isolation policies are deployed.
Refer this here
Thursday, May 14, 2009
Do we need SSIS to create Maintenance Plan
Monday, May 04, 2009
How to change the owner of a maintenance plan
-------------
One of our members of staff had left and we had the usual case of a few jobs failing with:
"Unable to determine if the owner (DOMAIN\xxx) of job
Scenario 2:
------------
A job for running a nightly transaction log maintenance plan was created and owned by an account that was a member of the Domain Admins group. The account was subsequently removed from the Domain Admins group and the job failed (owner did not have server access), as expected.
The job owner was changed to another account that is a member of the Domain Admins group, and the job ran successfully for seven days. On the eighth day, another user, also a member of Domain Admins group, edited the maintenance plan to add a database. After the maintenance plan was saved, job ownership reverted to the original job creator (no longer a Domain Admin) and the job failed on its next scheduled run.
/*Here's how to change the owner of a maintenance plan to dbo in SQL Server 2005*/
--to find the name and owner of the maintenance plan
--select * from msdb.dbo.sysdtspackages90
--to find the sid you want to use for the new owner
--select * from sysusers
UPDATE
[msdb].[dbo].[sysdtspackages90]
SET
[ownersid] = 0x01
WHERE
[name] = 'MaintenancePlan'
For SQL Server 2008:
update msdb.dbo.sysssispackages
set [ownersid] = suser_sid('sa')
where [name] = 'MaintenancePlan'
Sunday, May 03, 2009
SQL Server 2000 Service account privileges
* Act as Part of the Operating System = SeTcbPrivilege
* Bypass Traverse Checking = SeChangeNotify
* Lock Pages In Memory = SeLockMemory
* Log on as a Batch Job = SeBatchLogonRight
* Log on as a Service = SeServiceLogonRight
* Replace a Process Level Token = SeAssignPrimaryTokenPrivilege
Monday, April 27, 2009
SQL 2005 Standard Edition on Cluster
but Windows 2003 Server Standard won't:
http://technet.microsoft.com/en-us/library/cc758523.aspx
Friday, April 10, 2009
Idera SQL Safe Backup Script
DECLARE @maxCount INT
DECLARE @result INT
DECLARE @failed INT
DECLARE @dbname NVARCHAR(128)
DECLARE @backupSetName NVARCHAR(256)
DECLARE @backupSetDescription NVARCHAR(512)
SET @counter = 1
SET @maxCount = 1
SET @result = 0
SET @failed = 0
-- Create the temporary database table
IF object_id('tempdb..#databases') IS NOT NULL DROP TABLE #databases
CREATE TABLE #databases
(
id INT IDENTITY,
databaseName NVARCHAR(128),
backupSetName NVARCHAR(256),
backupSetDescription NVARCHAR(512)
)
-- Insert the databases to be backed up
INSERT INTO #databases VALUES ('User_DB1', 'Full backup for policy Backup_USER_DB_Full(Noencriptions)', '')
INSERT INTO #databases VALUES ('User_DB2', 'Full backup for policy Backup_USER_DB_Full(Noencriptions)', '')
SELECT @maxCount = MAX(id) FROM #databases
-- Loop through and backup each database
WHILE @counter <= @maxCount
BEGIN
SELECT @dbname = [databaseName], @backupSetName = [backupSetName], @backupSetDescription = [backupSetDescription] FROM #databases WHERE id = @counter
EXEC @result = [master].[dbo].[xp_ss_backup] @database = @dbname,@filename = 'D:\SQLData\MSSQL\BACKUP\IderaSQLBackups\USER_DB_BACKUPS\FULL\%instance%_%database%_%timestamp%.safe',@delete = '1days',@backupname = @backupSetName,@desc = @backupSetDescription,@verify = 1,@compressionlevel = 'ispeed',@threads = 3
IF (@result != 0) SET @failed = 1
SET @counter = @counter + 1
END
-- If one or more failures occurred, signal an error
IF (@failed != 0) RAISERROR('One or more backups failed to complete.', 16, 1)
Wednesday, April 08, 2009
SQL Server 2008 Service Pack 1 released
You can use these packages to upgrade any SQL Server 2008 edition.
SQL Server 2008 SP1 is primarily a roll-up of previous cumulative updates, quick fix engineering updates and minor fixes made in response to requests reported through the SQL Server community. While there are no new features in this service pack, customers running SQL Server 2008 should download and install SP1 to take advantage of the fixes which increase supportability and stability of SQL Server 2008.
With this service pack, Microsoft has made investments to ease deployment and make management of service packs more efficient. Key improvements in SP1 include Slipstream, Service Pack Uninstall and Report Builder 2.0 click-once deployment.
• Slipstream allows administrators to install SQL Server 2008 and Service Pack 1 in a single instance. This decreases the total time for an installation, including a fewer number of reboots thereby increasing productivity and deployment availability.
• Service Pack Uninstall allows administrators to uninstall the service pack separately from the database release. This feature also improves DBA productivity, reduces the cost of deployment and improves overall supportability
• Report Builder 2.0 Click Once improves the existing SQL Server end-user report authoring application by easing deployment to business users
For more information about SQL Server 2008 Service Pack 1, please review the Release Notes :
Sunday, March 15, 2009
Cluster Diagnostics and Verification Tool (ClusDiag)
Download details: Cluster Diagnostics and Verification Tool (ClusDiag.exe)

Friday, March 13, 2009
SQL 2005 SP2 templog is set to restricted and will not go back to unrestricted
There's no such thing as "unlimited" in the end, since the max theoretical size
• for a data file is 32TB and
• for a log file is 2TB. 2,097,152 MB = 2 TB.
I.e., the value you see is the maximum theoretical size.
Although file size is displaying as "restricted", the MAXSIZE is indeed 2TB (2,097,152MB).
So, within the confines of capacity limitations, it is unlimited so to speak.
Working with tempdb in SQL Server 2005
Sunday, March 01, 2009
Saturday, February 14, 2009
Automate SQL Server Profiler Trace
exec @rc = sp_trace_create @TraceID output, 2, N'N:\SQLTrace\15FebTrace', @maxfilesize, NULL
## Note Option 2 here
--- To set trace status
exec sp_trace_setstatus @traceid, @status
where @status = 0 Stopped
1 Running
2 Closed, cleaned from server
---
To get the Traces running on the server
select * from ::fn_trace_getinfo(0)
---
To read trace content into a table
select * from ::fn_trace_gettable('N:\SQLTrace\15FebTrace.trc',default)
Thursday, February 05, 2009
Terminal Server and Citrix Keyboard Shortcuts
If working in an RDP or ICA Session the following are keyboard shortcut key combinations that map to the native Windows shortcut keystrokes.
CTRL+F3 Task Manager
CTRL+F2 Start Menu
Sunday, February 01, 2009
SQL Profiler buffers the trace data in temporary files on the client machine
System is low on disk space on drive 'C'. All SQL Server profiler functions are temporarily disabled.
The temporary files to buffer the profiler trace data were in directory C:\Documents and Settings\Siva\local settings\Temp\1, and the names of the temporary files had this pattern: Prf*.tmp. Upon exiting SQL Profiler, these temporary files would be removed automatically.
Work around:
To work around this problem, do not use SQL Profiler to perform a client-side trace of the events in the instance of SQL Server. Instead, use system stored procedures to perform a server-side trace of the events.
You can use the following system stored procedures:
* sp_trace_create
* sp_trace_setevent
* sp_trace_setfilter
* sp_trace_setstatus
For more information about these system stored procedures, search for the stored procedures in SQL Server 2000 Books Online or in SQL Server 2005 Books Online.
Reference:
An instance of SQL Server performs slowly when you use SQL Profiler to perform a client-side trace of the events in the instance
Saturday, January 31, 2009
Error while setting reporting service and share point exclusion path
Product : SQL Server 2005 Reporting Services
Error : The setup has encountered an unexpected error while Setting reporting service and share point exclusion path. The error is: Fatal error during installation.
Resolution:
KB ID # 920803
Thursday, January 22, 2009
Cannot open backup device 'F:\foldername'. Operating system error 5(Access is denied.)
System.Data.SqlClient.SqlError: Cannot open backup device 'F:\foldername'. Operating system error 5(Access is denied.). (Microsoft.SqlServer.Smo)
Then, I did a Check Name for "SQL" and added the following two SQL accounts from the list:
1) SQLServer2005MSSQLUser$<machine name>$MSSQLSERVER
2) SQL
Monday, January 19, 2009
Unicenter command to check the service
awservices status
Tuesday, January 13, 2009
Multiple SQL Server Integration Services (SSIS) database instances on one machine
The registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTS\ServiceConfigFile specifies
the location and name for the configuration file that Integration
Services service uses. The default value of the registry key is
C:\Program Files\Microsoft SQL Server\90\DTS\Binn\ MsDtsSrvr.ini.xml.
You can update the value of the registry key to use a different name
and location for the configuration file.
Reference: Multiple SQL Server Integration Services (SSIS) database instances on one machine - Mike's Blog
Saturday, January 10, 2009
SQL Server 2005 Service Pack 3 released
On Dec 15th 2008, Microsoft released the latest Service Pack 3 on SQL Server 2005. On the same day SP3 Cumulative Update 1 and Cumulative Update 11 for SQL Server 2005 Service Pack 2 (SP2) are also released.
- For SQL users not opting for SP3, Microsoft released Cumulative Update 11 for SQL Server 2005 SP2, which contains all of the hot fixes for SP2, without the new features in SP3.
- For SQL users upgrading from SQL Server 2005 SP2 Cumulative Update 10 or from SQL Server 2005 SP2 Cumulative Update 11, they must apply a post-SP3 cumulative update after upgrade to SP3 to obtain all the fixes
This Service Pack is available for download from Microsoft Download Center. Along with the Service Pack, refreshed the Feature Pack for 2005 that can be downloaded separately. The following are all the download links for SQL Server 2005 Service Pack 3 and related downloads.
SQL Server 2005 SP3 (Eval, Std, Dev, Ent Editions) | |
SQL Server 2005 Express Edition SP3 | |
SQL Server 2005 Express Advanced SP3 | |
SQL Server 2005 Express Toolkit SP3 | |
SQL Server 2005 Feature Pack Dec 2008 | |
SQL Server 2005 Management Studio Express SP3 | |
SQL Server 2005 SP3 Data Mining Add-ins Page | |
SQL Server 2005 SP3 Reporting Services Add-in Page for Microsoft Sharepoint | |
SQL Server 2005 Books Online Refresh - December 2008 | |
What's New in SQL Server 2005 SP3 | |
Readme files for SQL Server 2005 SP3 | |
Release Notes for SQL Server 2005 SP3 | |
Cumulative update package 1 for SQL Server 2005 Service Pack 3 | |
An Incremental Servicing Model - ISM is available from the SQL Server team to deliver hotfixes for reported problems |
Monday, December 22, 2008
SQL Server 2000 SP3 Creates a SQLDebugger Windows User Account
The SQLDebugger Windows user account is created when the SQL Debugger Registry2 DCOM server process (Sqldbreg2.exe) is registered. By default, SQL Server 2000 SP3 registers this process, and the SQLDebugger Windows user account is created.
SQL Query Analyzer includes
T-SQL Debugger. By using T-SQL Debugger, you can control and monitor
how stored procedures run. T-SQL
Debugger uses the SQLDebugger Windows user account to connect to the database server.
Microsoft Visual Studio .NET applications use SQL Server Debugging to debug SQL Server stored procedures. The SQLDebugger Windows
user account is also created when you install Visual Studio
.NET.
The SQLDebugger Windows user account has the following characteristics :
- It belongs to the built-in Windows Users group.
- It does not have local logon rights.
Sunday, December 21, 2008
How to remove / uninstall SQL Server 2005 Manually
At a command prompt, run the following command:
"%ProgramFiles%\Microsoft SQL Server\90\Setup Bootstrap\ARPWrapper.exe /Remove"
Uninstall the SQL Server components one at a time until all the SQL Server components are uninstalled.
Note Add or Remove Programs also runs the ARPWrapper.exe program by using the /Remove option. However, the reference to the ARPWrapper.exe program may have been deleted.
Refer: http://support.microsoft.com/kb/909967
SQL Server 2005 - Cluster Tips
SQL Server 2005 Setup no longer installs the tools and documentation components of SQL Server 2005 on all the nodes of a cluster. The wizard will only install these
components on the node that the Setup routine is initiated from. If tools and documentation is required on the other nodes, you will need to install these components
manually after finishing the setup of the cluster.
2. Install SQL 2005 Analysis Services on separate Resource group
Microsoft recommends installing Analysis Services clustered installations in a single group with its own disk and IP resources and not on a resource group that has
the database engine installed on it.
3. Create Windows Domain Groups
It is usually recommended that you create four different domain groups when creating a cluster. One for each of the following:
1. SQL Server 2005 DB Service,
2. SQL Server 2005 Agent service,
3. SQL Server 2005 Full-Text Search service,
4. SQL Server 2005 Analysis Services service.
4.Installing Reporting Services
Unfortunately, Reporting Services is not cluster-aware and will have to be installed as stand-alone components on all nodes in the clustered environments. Reporting Services can make use of clustered databases. But when a node fails over the connections to any Reporting Services, instances on the failed node will not be automatically reconnected to the new node. Connections will have to attempt to connect to the new node using a new IP address
5. Installing SQL Server Integration Services
To install SSIS, you must install SSIS on all active nodes and then make the SSIS Service a clustered resource. To make SSIS a clustered resource, perform the following tasks:
1. Open the Cluster Administrator
2. On the File menu, point to New and then click Resource
3. On the New Resource page of the Resource Wizard, type a Name and choose “Generic Service” as the Service Type. Change the value of Group to SQL group. Click Next.
4. On the Possible Owners page, add or remove the nodes of the cluster as the possible owners of the resource. Click Next.
5. To add dependencies on the Dependencies page,select a resource under Available resources, and thenclick Add. In case of a failover, both SQL Server 2005
and the shared disk that stores Integration Services packages should come back online before Integration Services is brought online. After you have selected the
dependencies, click Next.
6. On the Generic Service Parameters page, enter MsDtsServer as the name of the service. Click Next.
7. On the Registry Replication page, click Add to add the registry key that identifies the configuration file for the Integration Services service.
a. This file needs to be located on a shared disk that is in the same group for the Integration Services service, and fails over to the next node along with for
the Integration Services service.
b. In the Registry Key dialog box, type SOFTWARE\Microsoft\MSDTS\ServiceConfigFile. Click OK, and then click Finish. The Integration Services service
has now been added as a clustered service.
8. Locate the configuration file at %ProgramFiles%\Microsoft SQL Server 2005\90\DTS\Binn\MsDtsSrvr.ini.xml. Copy it to the shared disk.
9. Create a new folder named Packages on the shared disk. Grant List Folders and Write permissions on the new folder to the built-in Users group.
10. Open the configuration file from the shared disk in a text or XML editor. Change the value of the ServerName element to the name of the virtual SQL Server 2005 which is in the same group.
11. Change the value of the StorePath element to the fully-qualified path of the Packages folder created on the shared disk in a previous step: ??:\Packages.
12. Update the value of HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTS\ServiceConfigFile in the Registry to the fully-qualified path and filename of
the service configuration file on the shared disk
13. In the Cluster Administrator, select the Integration Services service, right-click, and select Bring Online from the popup menu. The Integration Services service
is now online as a clustered service
Thursday, December 18, 2008
How to Grant ALTER TRACE permission using Management Studio?
Security tab --> Logins --> right click name to modify select properties --> securables tab --> Click add --> Select the server you want to add the permissions to. The permissions should appear in the effective permissions list
USE master;
GRANT ALTER TRACE TO [Username];
-->Where User Name for domain account is [Domain\accountname];
Tuesday, December 16, 2008
Tuesday, December 02, 2008
DOS Batch file to create a file name in data stamp
for /F "tokens=1,2,3,4 delims=/ " %%I in ('date /T') do set Logfile=%%J%%K%%L.log
:: 4. Delete all but 7 most recent log files
:: Get a sorted list of the log files oldest at the bottom of the list
Dir /b /o-d %Logfolder%\*.log > %Workfolder%\%LogList%
:: The find command counts how many log files there are and for sets TempVar with this value
For /f %%A in ('Dir /b /o %Logfolder%\*.log^| Find /c /i "log"') do set TempVar=%%A
:: If there are more logs than needed skip the number to keep and delete the oldsest one(s)
If %TempVar% GTR %LogsToKeep% For /f "skip=%LogsToKeep%" %%B in (%Workfolder%\%LogList%) do Del /q %Logfolder%\%%B
Del /q %Workfolder%\%LogList%
Saturday, November 22, 2008
Wednesday, September 17, 2008
Query TSM Archive to check file exits
set script_dir=c:\progra~1\tivoli\tsm\scripts
echo dsmc query archive %1 -su=yes -fromdate="%2" -todate="%2"
dsmc query archive %1 -optfile="c:\progra~1\tivoli\tsm\baclient\dsm_swift.opt" -fromdate="%2" -fromtime=00:00 -todate="%2" -totime=23:00
echo.%ERRORLEVEL%
IF ERRORLEVEL 12 GOTO LABEL12
IF ERRORLEVEL 0 GOTO LABEL0
:LABEL12
echo ####################### FAILED #########################################
echo #
echo # The files you are searching for are not there . Check your syntax
echo # Date range has to be MM/DD/YYYY
echo # Directory must exist , put an asterisk on the end e.g
echo # h:\extend\*
echo # or h:\extend\Orbis_1\OFAS_CN_PRD.001
echo # Archive are kept for 14 days as per Todd Rd setup
echo #
echo ########################################################################
GOTO end
:LABEL0
echo ###################### SUCCESS #########################################
echo #
echo # This is the list of available archives within the date range you specified
echo # Use this list in the DSMC RETRIEVE command
echo #
echo # dsmc query archive %1 -optfile="c:\progra~1\tivoli\tsm\baclient\dsm_swift.opt" -fromdate="%2" -fromtime=00:00 -todate="%2" -totime=07:00
echo #
echo #
echo #
echo ########################################################################
:end
-------------------------------------------
To retrieve the data from Remote Server
-------------------------------------------
@echo off
set script_dir=c:\progra~1\tivoli\tsm\scripts
dsmc set access archive %1 %3 -optfile="c:\progra~1\tivoli\tsm\baclient\dsm_swift.opt"
dsmc query archive \\%3\%1 -optfile="c:\progra~1\tivoli\tsm\baclient\dsm_swift.opt" -fromnode=%3 -fromdate="%2" -fromtime=00:00 -todate="%2" -totime=23:00
Wednesday, September 10, 2008
Who dropped objects from database?
Sometime I have been asked that how to find out who
dropped/altered/created table/stored procedure. Well, SQL 2005 has
out-of-the-box solution to this problem.
Schema Change History
is the report which would give details. This report takes data from
default trace which is enabled by default in SQL Server 2005 default
installation. Below command will help you in finding current status.
USE master;
EXEC sp_configure 'show advanced option', '1';
RECONFIGURE WITH OVERRIDE;
EXEC sp_configure 'default trace';
GO
Friday, September 05, 2008
SQL Server 2008 Release announcement
SQL Server 2008 has been released and is ready to deliver a rich set of integrated services that enable you to do more with your data, such as query, search, synchronize, report, and analyze. Many of you have been evaluating the SQL Server 2008 betas, and may be ready to try out the RTM version. TechNet Plus subscribers can find RTM versions now available for download. Speaking of TechNet Plus, read Keith Combs' Blahg for his take on the UI improvements for the newly revamped TechNet Plus Subscriber Downloads page.
TechNet Magazine recently published an overview of the key changes and what you can expect from SQL Server 2008. You can also get a rundown of the various editions and components of SQL Server 2008 and take part in SQL Server 2008 tutorials.
For more overview resources, check out:
• Webcasts: 24 Hours of SQL Server 2008 for IT Professionals
• Webcasts: 24 Hours of SQL Server 2008 for Developers
If you are looking for assistance with SQL Server 2008 planning and installation, here are some helpful links:
• Planning a SQL Server Installation
Once you've installed SQL Server 2008, these resources can help you optimize your database environment:
• Database Engine Tuning Advisor Overview
You can also find guidance for upgrading to SQL Server 2008 or migrating to SQL Server 2008. If you are upgrading, be sure to check out Using Upgrade Advisor to Prepare For Upgrades.
From our partners, you can find local partners offering SQL Server 2008 solutions or find training partners near you offering official Microsoft courses that will help you get certified on SQL Server 2008. In addition, you can search for local in-person events and online webcasts on SQL Server 2008.
And finally, from the August edition of TechNet Magazine, Paul Randal answers your SQL Server questions, showing you how to perform consistency checks, how to handle an accidental upgrade, and more in the SQL Q&A column.
If you have any questions.;
Kinga Kovacs
| Technical Account Manager - MICROSOFT Australia
61-419 746 731
| 61-2-9870 2499 |
kinga.kovacs@microsoft.com
Saturday, August 23, 2008
SQL Server DBA Telecommuting Tips
| 1 | Internet Access | Whether it's Wi-Fi, T1, Air Card, or a wired connection you can not work remotely as a DBA without being able to connect to work. There is definitely no need to dwell on this topic, but it does lead to the next item... |
| 2 | Remote Access | If it is a current or an antiquated method of connecting to the office I've done it. When I first started out I was working as an Access Developer. I'd copy my work from my workstation to disk and then develop on my home PC on the days I'd work from home using the media as a shuttle. Once it was a day to go back into the office I'd copy my work back to disk and repeat the process in reverse. Now the options are usually Citrix or VPN. In order to support your SQL environment you must be able to connect to it. Using VPN technology on my laptop I end up with the same connection whether that laptop is on my desk at home or on my desk at work. |
| 3 | SQL Management Tools | Chalk this up to the obvious. You need to have the same software you've access to at work, while at home. First and foremost for the SQL Server Database Administrator is Microsoft SQL Server Management Studio. |
| 4 | Remote Server Access | This is a must in most (but not all) SQL Server DBAs' tool belts. It is also a point of contention for many IT Departments between the Server Engineers, Security, and Database Administrators. If you think about it, how often do you physically touch the servers hosting your SQL instances? I think I've seen only five of the 80 servers I support. When it comes right to it, even when I'm in the office, I'm technically a remote worker. I rely heavily on Microsoft Terminal Services. After SQL Server Management Studio and Microsoft Outlook, it is probably my most-used application. If you need to copy backup files or detach/attach databases to migrate between PROD/TEST/DEV/BUILD, you are wise to use Terminal Services over Windows Explorer. There is a noticeable performance hit when copying a file from Server A to Server B using two Explorer windows on your workstation versus using Terminal Services to connect to Server B and then copying a file from a Explorer window on Server A. If using your workstation to move files, you are actually copying the file(s) from Server A to your workstation and then from your workstation to Server B. Think about the time difference to do this when moving a 20Gb data file from BUILD to PROD from your home office using DSL! |
| 5 | Collaboration/ Connectivity Software | Just because you're working away from the office doesn't mean you can ignore your coworkers. Besides the obligatory email/office productivity software (Outlook, Groupwise, etc.) instant messaging software is also important. We've used a variety of products in our company before settling on Microsoft's Office Communication Server (OCS). Nice thing about it - it uses a SQL Server database. Support your local Relational Database Management System! |
| 6 | VOIP | Those cell phone bills can add up over time. Anyone who has ever been on the support line to Microsoft through two shifts on their personal cell phone can attest to that. Recently I installed a product from Nortel, IP SoftPhone that allows me to answer calls and make calls from, my desk phone in the office. While this is not a requirement to working remotely it does take some of the financial pain away from it. |
| 7 | Telecommuting is not for the Social Butterfly | I do not recommend telecommuting more than a couple days per week to those individuals who crave the social aspects of the office environment. You'll find yourself going stir-crazy if this a personality trait. When in the office you'll spend too much time socializing to get your "people fix". Telecommuting is just not for everybody. |
| 8 | Don't Become Invisible; Don't Become a Nuisance | There have been studies showing that those individuals who work remotely to some extent lag behind workers that exclusively work in the office when it comes to wage increases. Much of this has been attributed to the lack of visibility these remote workers have compared to their office-bound co-workers. So, how do you get around this? With moderation. I |
| 9 | Work Within Your Limits | There is a big difference between working two days per week remotely and working three days remotely. There was a large behavioral adjustment when I shifted to three days remote, even after working remotely two days per week for six years prior. It was easier to get up and immediately start working, work through lunch, work until dinner and realize I was still in the clothes I woke up in. It is amazing how you find yourself working harder and longer and it takes a bit of time to work out of this mode; a very unhealthy mode. My recommendations to combat this:
Oddly enough, when I began working four days remotely |
| 10 | Remember: It's a Benefit, not an Endowment | Work every day remotely as if it is something that can be taken away. Sure, you may have situations where you'll need to step out and take care of something. Follow whatever protocols your office expects if you were to step away for personal matters if you were physically in the office. Sure, you may look out and see the lawn needs mowing or that the laundry is piling up. Resist the urge to do anything about it though until after work. |
Courtesy: MS SQL Tips
Sunday, August 17, 2008
Wednesday, August 06, 2008
SQL Server 2008 Released today
SQL Server 2008 Released
Some of the links are not yet live and here are some Key Dates
• Aug 6 – SQL Server 2008 RTM
• Aug 6 – Public RTM Announcements for SQL Server 2008 will go live at 10AM PDT; Aug 6 – TechNet Subscription & MSDN Subscription full product available for SQL Server 2008
• Aug 7 – TechNet & MSDN SQL Server 2008 trials available
• Aug 7 – How To Buy page updated with SQL Server 2008 info
• Aug 7 – SQL Server 2008 Feature Pack available
Aug 11 – SQL Server 2008 Express download available
• Aug 21 – SQL Server 2008 Volume Licensing SKUs available
• Aug 25 – SQL Server 2008 Express with Advanced Services and Tools available
• Sep 15 – TechNet & MSDN SQL Server 2008 Books-Online updated for all 10 Katmai languages
Announcing the release of SQL Server 2008, the enterprise data platform
for data warehousing, business intelligence, and LOB applications
The wait is over! SQL Server® 2008 is now available and is ready for purchase.
TechNet Magazine recently published an overview of the key changes and what you can expect from SQL Server 2008. You can also get a rundown of the various Editions and Components of SQL Server 2008 and take part in SQL Server 2008 Tutorials.
An Overview of SQL Server 2008 installation will help you get started with your deployments. You can also find guidance for Upgrading to SQL Server 2008 or Migrating to SQL Server 2008. And if you are upgrading, be sure to check out Using Upgrade Advisor to Prepare For Upgrades.
From the August edition of TechNet Magazine, here are answers to your SQL Server questions, showing you how to perform consistency checks, how to handle an accidental upgrade, and more in the SQL Q&A column.
Finally, you can easily find local partners offering SQL Server 2008 solutions, find training partners near you offering official Microsoft courses on SQL Server 2008, as well as attend local in-person events and online webcasts on SQL Server 2008.
