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