ADSM-L

Re: Multiple SQL Instances through the TDP

2005-06-18 04:33:08
Subject: Re: Multiple SQL Instances through the TDP
From: "Leonard, Christopher A" <christopher-leonard AT UIOWA DOT EDU>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Sat, 18 Jun 2005 00:59:35 -0500
Del said...
> Maybe some subscribers on this list with this SQL Server configuration
> will share what they have done in their environment?

We don't currently have many SQL Servers that are multi-instance, but
here's what we've done on the ones that are.  So far it seems to work
just fine.  We capture the SERVERNAME or SERVERNAME\INSTANCENAME
combination into a variable which our T-SQL script then passes in as the
/SQLServer parameter, as Del suggests.  However, in our case we only use
one TSM nodename.  By the way, for those times when somebody wants to
use the TDPSQL GUI application, we built a separate icon for each
instance, adding the appropriate /SQLServer parameter value to each
icon.  That way it's easy to pull up a GUI TDPSQL console for the
specific instance you want to work with.

Basically, our script (which is a stored procedure, really) does
something like the following.  Sorry for the heavy snipping, but there
should be enough here to make sense to T-SQL folks:

   create procedure usp_its_tdpsqlc_backup
      @bkupType varchar(4)    = NULL, -- Valid choices are 'FULL',
'LOG', or 'DIFF' for backups or NULL for usage notes.
      @dbList   varchar(8000) = '*'   -- List of databases to back up,
or '*' for all databases

   as

   <snip>

   declare @servername varchar(500)

   <snip>

   set @servername = cast(ServerProperty('ServerName') as varchar)

   <snip>

      set @bkupCmd = @tdpsqlPath + '\tdpsqlc.exe backup ' + @dbName + '
' + @bkupType 
         + ' /TSMPassword="' + @pwd + '" /MountWait /SQLServer="' +
@servername + '"'
      -- We used to print @bkupCmd, but it contained the /TSMPassword.
Since this output is piped to a log file,
      --    we decided not to do that any more (!).
      print ''
      print '***'
      print '*** ' + cast (getdate() as varchar) 
      print '*** About to perform ' + @bkupType + ' backup for database
' + @dbName
      print '***'
      raiserror ('', 10, 1) with nowait -- flush io cache
 
      exec @rc = master..xp_cmdshell @bkupCmd

      if @rc = 0
         set @successes = @successes + 1
      else
         ...

   <snip>

Hope that's enough to help somebody!

Cheers,
Chris

___________________________________________

Chris Leonard, University of Iowa ITS
Institutional Data and Database Management
300 USB / 319-384-0801
MCSE, MCDBA, MCT, OCP, CIW
___________________________________________

The Database Guy
http://www.databaseguy.com
 
Brainbench MVP for Oracle Administration
http://www.brainbench.com
___________________________________________

<Prev in Thread] Current Thread [Next in Thread>