Wrox Programmer Forums
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 22nd, 2004, 01:00 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default SQL Query Analyzer

Hello,

Does SQL Server Query Analyzer support VBA and macros? I have some pretty repetitive tasks that I would like to automate... Or does anybody know of an alternative solution?

Thanks,

Brian
__________________
Brian
 
Old June 22nd, 2004, 02:09 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Sounds like a job for SQL Server DTS (Data Transformation Services).

That allows you to create packages that can do data transfers, updates / deletes, exports, run VB Scripts, send e-mail and a whole lot of other stuff.

Look for DTS in the Books Online, or start with the Data Transformation Services node under your SQL Server in the EM.

Update: hmmm, I *just* saw your post in a DTS forum, so it looks like you know how to use it....

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old June 23rd, 2004, 01:23 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hey,

Yeah, I've been using DTS at work for a couple projects. Awesome tool. To go a little further into what I want to do:

I need to provide IO statistics and execution plans for my stored procedures to the DBA's. I had posted a while ago about this, but with all the individuals helping me try to find a solution, none of us could come up with an answer (we couldn't do it programmibly via vbscript or VB at the time, didn't try .NET).

See I'm somewhat lazy (although it is justified; I have 120 procs to provide this information for) but I wanted to find an easier way to do this other than copy/paste the queries in and select run in query analyzer. I thought that maybe Query Analyzer supported VBA or macros, but I wasn't sure, and hence the post.

The only way, so far, to cut down on the time was I created a vbscript to create the statements to copy/paste in (by selecting from the INFORMATION_SCHEMA.ROUTINES view), but I want to take this a step further.

Thanks,

Brian
 
Old June 23rd, 2004, 05:58 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Right, in that case, DTS is not going to be much good.

I am not sure if there is a programmatic access to these plans. Maybe a little VB app with SendKeys (yuk) will do the trick....

Or hire a monkey.... ;)


Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Light My Fire (Live) by Massive Attack (Track 10 from the album: Protection) What's This?





Similar Threads
Thread Thread Starter Forum Replies Last Post
Query Analyzer Adam H-W SQL Server 2000 6 August 19th, 2006 04:40 AM
ADO.Net slower than SQL Server Query Analyzer s5g5r ADO.NET 1 January 26th, 2005 09:49 PM
SQL Query Analyzer Save As ioates SQL Server 2000 1 May 18th, 2004 08:01 AM
xml result set truncated in sql query analyzer xologist SQL Server 2000 2 March 22nd, 2004 05:23 PM
Query Analyzer Walden SQL Server 2000 2 October 28th, 2003 10:38 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.