Thursday, February 05, 2009

Terminal Server and Citrix Keyboard Shortcuts

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

SQL Profiler buffers the trace data in temporary files on the client machine, and if the drive on which these temporary files reside doesn't have ample free space, a Profiler trace (e.g. with the standard trace template) could deplete the drive of the free space rather quickly and end up disabling the trace.


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

Encountered the error while installing SQL 2005 Reporting Service "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

Unicenter command to check the service is installed on running on a server

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)

http://go.microsoft.com/fwlink/?LinkId=135960

SQL Server 2005 Express Edition SP3

http://go.microsoft.com/fwlink/?LinkId=135970

SQL Server 2005 Express Advanced SP3

http://go.microsoft.com/fwlink/?LinkId=135973

SQL Server 2005 Express Toolkit SP3

http://go.microsoft.com/fwlink/?LinkId=135974

SQL Server 2005 Feature Pack Dec 2008

http://go.microsoft.com/fwlink/?LinkId=135971

SQL Server 2005 Management Studio Express SP3

http://go.microsoft.com/fwlink/?LinkId=135772

SQL Server 2005 SP3 Data Mining Add-ins Page

http://go.microsoft.com/fwlink/?LinkId=135959

SQL Server 2005 SP3 Reporting Services Add-in Page for Microsoft Sharepoint

http://go.microsoft.com/fwlink/?LinkId=135962

SQL Server 2005 Books Online Refresh - December 2008

http://go.microsoft.com/fwlink/?LinkId=130167

What's New in SQL Server 2005 SP3

http://go.microsoft.com/fwlink/?LinkId=131442

Readme files for SQL Server 2005 SP3  

http://go.microsoft.com/fwlink/?LinkId=130542

Release Notes for SQL Server 2005 SP3

http://go.microsoft.com/fwlink/?LinkId=12952

Cumulative update package 1 for SQL Server 2005 Service Pack 3

http://support.microsoft.com/kb/959195

An Incremental Servicing Model - ISM is available from the SQL Server team to deliver hotfixes for reported problems

http://support.microsoft.com/kb/935897

Monday, December 22, 2008

SQL Server 2000 SP3 Creates a SQLDebugger Windows User Account

INF: 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

Run the command to uninstall the SQL Server components
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

1. Installing Tools and Documentation
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?

In SQL Server 2005 / 2008 to grant SQL Profiler access for a user;
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

PMP - Formula

Tuesday, December 02, 2008

DOS Batch file to create a file name in data stamp

:: 2. Set logfile name based on today's date

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

@echo off
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?

Balmukund : 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:

•          SQL Server 2008 Videos

•          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

•          Installing SQL Server 2008

•          Quick Start Installation

•          Installation How-to Topics

•          Locating Previous Versions of SQL Server for SQL Server 2008 migration using Microsoft Assessment and Planning Toolkit

Once you've installed SQL Server 2008, these resources can help you optimize your database environment:

•          Configuring SQL Server 2008

•          Database Engine Tuning Advisor Overview

•          System and Sample Databases

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











































1Internet 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...
2Remote
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.
3SQL 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.
4Remote 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!
5Collaboration/
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!
6VOIP 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.
7Telecommuting 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.
8Don'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
find that keeping a running email with nothing more than bullet points
highlighting what I worked on over the course of the day, with high-level
detail, provides the proper amount of information to keep my Manager
"in-the-loop". He's often commented that he knows more about what I do than any
of the other staff that report to him. What this also does is prevents the
formation of a bad habit of cc-ing your supervisor on each email you write
during the day in order to simply keep him/her involved and aware of what you're
doing. This documentation also serves a valuable purpose when it comes to your
drafting your annual self-performance review.

9Work 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:

  • Maintain a dedicated home office or area dedicated
    just to work, be it a desk in the dining room or a room solely for this
    purpose.

  • Keep to a routine - get up and take that shower,
    grab your coffee, and walk into your home office. I've known of people who will
    get in their car, drive around the block and then come in through the front door
    and walk into their home office just to put mental separation between working
    from home and being at home.

  • Fight the urge to keep working for just a "few
    minutes more" at the end of the day. It is so easy just to keep working, since
    you don't have to commute back home at the end of the work day. Just like at
    the start of the day, come up with a process that separates work from personal
    life.

Oddly enough, when I began working four days remotely
per week I found the transition easier.

10Remember: 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 2008 has today been released to manufacturing:
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.