dbTalk Databases Forums  

Search for text string within DTS SQL code

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Search for text string within DTS SQL code in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
D''Animal
 
Posts: n/a

Default Search for text string within DTS SQL code - 03-28-2006 , 02:39 PM






Hello all,

I have 100 DTS packages and I am looking for particular text string (for
example:
like '%table_name%').
How can I look for it without opening each DTS and going through every step?
I'd like to perform simmilar search to the one that we do to find text
within 100s of stored procedures using sysobjects and syscomments tables.

Where does SQL server store DTS Sql code?

Thanks
D

Reply With Quote
  #2  
Old   
Satya SKJ
 
Posts: n/a

Default RE: Search for text string within DTS SQL code - 03-29-2006 , 08:27 AM






All the DTS package details will be stored in MSDB under SYSDTSPACKAGES, but
I'm not sure whether you can get required details with a search string. If
the dts packages are saved to a file then you can get few open source tools
to search thru those files.
--
-----------------
Satya SKJ
Visit http://www.sql-server-performance.com for tips and articles on
Performance topic.


"D''Animal" wrote:

Quote:
Hello all,

I have 100 DTS packages and I am looking for particular text string (for
example:
like '%table_name%').
How can I look for it without opening each DTS and going through every step?
I'd like to perform simmilar search to the one that we do to find text
within 100s of stored procedures using sysobjects and syscomments tables.

Where does SQL server store DTS Sql code?

Thanks
D

Reply With Quote
  #3  
Old   
D''Animal
 
Posts: n/a

Default RE: Search for text string within DTS SQL code - 03-29-2006 , 10:21 AM



What are those open source tools?

Dainius S.,

"Satya SKJ" wrote:

Quote:
All the DTS package details will be stored in MSDB under SYSDTSPACKAGES, but
I'm not sure whether you can get required details with a search string. If
the dts packages are saved to a file then you can get few open source tools
to search thru those files.
--
-----------------
Satya SKJ
Visit http://www.sql-server-performance.com for tips and articles on
Performance topic.


"D''Animal" wrote:

Hello all,

I have 100 DTS packages and I am looking for particular text string (for
example:
like '%table_name%').
How can I look for it without opening each DTS and going through every step?
I'd like to perform simmilar search to the one that we do to find text
within 100s of stored procedures using sysobjects and syscomments tables.

Where does SQL server store DTS Sql code?

Thanks
D

Reply With Quote
  #4  
Old   
Enric
 
Posts: n/a

Default RE: Search for text string within DTS SQL code - 03-30-2006 , 04:50 AM



Hi D''Animal,
We've got around 600 dts running in a Active-Active cluster. I did an Vb6
app which take advantage of dtspkg.dll.
I built a process which take each DTS and once open, using FOR...EACH
clauses store all the information into tables.
So this way I've got in each table info about tasks, steps, connections and
global variables and I am be able to look for any string that any dts own.

I enclose you the full script for these tables, hope helps:

if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[VISDTS_Conn]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[VISDTS_Conn]
GO

if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[VISDTS_Dts]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[VISDTS_Dts]
GO

if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[VISDTS_Pas]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[VISDTS_Pas]
GO

if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[VISDTS_Task]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[VISDTS_Task]
GO

if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[VisDts_Var]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[VisDts_Var]
GO

CREATE TABLE [dbo].[VISDTS_Conn] (
[DtsId] [int] NULL ,
[ConnectionId] [int] IDENTITY (1, 1) NOT NULL ,
[Name] [varchar] (75) COLLATE Traditional_Spanish_CI_AS NULL ,
[Description] [varchar] (200) COLLATE Traditional_Spanish_CI_AS NULL ,
[ID] [int] NULL ,
[Reusable] [bit] NULL ,
[ConnectedImmediate] [bit] NULL ,
[Connected] [bit] NULL ,
[InUse] [bit] NULL ,
[LastOwnerTaskName] [varchar] (25) COLLATE Traditional_Spanish_CI_AS NULL ,
[DataSource] [varchar] (90) COLLATE Traditional_Spanish_CI_AS NULL ,
[UserID] [char] (15) COLLATE Traditional_Spanish_CI_AS NULL ,
[Password] [char] (10) COLLATE Traditional_Spanish_CI_AS NULL ,
[ConnectionTimeOut] [int] NULL ,
[ProviderID] [varchar] (15) COLLATE Traditional_Spanish_CI_AS NULL ,
[Catalog] [varchar] (30) COLLATE Traditional_Spanish_CI_AS NULL ,
[UseTrustedConnection] [bit] NULL ,
[InTransaction] [bit] NULL ,
[UseDSL] [bit] NULL ,
[UDLPath] [varchar] (75) COLLATE Traditional_Spanish_CI_AS NULL
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[VISDTS_Dts] (
[DtsId] [int] IDENTITY (1, 1) NOT NULL ,
[Name] [varchar] (75) COLLATE Traditional_Spanish_CI_AS NULL ,
[Owner] [varchar] (75) COLLATE Traditional_Spanish_CI_AS NULL ,
[PackageID] [varchar] (225) COLLATE Traditional_Spanish_CI_AS NULL ,
[VersionID] [varchar] (225) COLLATE Traditional_Spanish_CI_AS NULL ,
[CreationDate] [datetime] NULL ,
[CreatorComputerName] [varchar] (25) COLLATE Traditional_Spanish_CI_AS NULL ,
[Description] [varchar] (100) COLLATE Traditional_Spanish_CI_AS NULL ,
[LogFileName] [varchar] (255) COLLATE Traditional_Spanish_CI_AS NULL
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[VISDTS_Pas] (
[DtsId] [int] NULL ,
[StepId] [int] IDENTITY (1, 1) NOT NULL ,
[StepName] [varchar] (100) COLLATE Traditional_Spanish_CI_AS NULL ,
[StepDescription] [varchar] (100) COLLATE Traditional_Spanish_CI_AS NULL ,
[ExecutionStatus] [int] NULL ,
[ExecutionResult] [int] NULL ,
[TaskName] [varchar] (100) COLLATE Traditional_Spanish_CI_AS NULL ,
[CommitSuccess] [bit] NULL ,
[RollbackFailure] [bit] NULL ,
[ActiveXScript] [varchar] (6000) COLLATE Traditional_Spanish_CI_AS NULL ,
[ScriptLanguage] [varchar] (20) COLLATE Traditional_Spanish_CI_AS NULL ,
[FunctionName] [varchar] (20) COLLATE Traditional_Spanish_CI_AS NULL ,
[AddGlobalVariables] [bit] NULL ,
[RelativePriority] [int] NULL ,
[CloseConnection] [bit] NULL ,
[ExecuteInMainThread] [bit] NULL ,
[IsPackageDSORowset] [bit] NULL ,
[JoinTransactionIfPresent] [bit] NULL ,
[StartTime] [datetime] NULL ,
[FinishTime] [datetime] NULL ,
[ExecutionTime] [real] NULL ,
[DisableStep] [bit] NULL
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[VISDTS_Task] (
[DtsId] [int] NULL ,
[TaskId] [int] IDENTITY (1, 1) NOT NULL ,
[Name] [varchar] (50) COLLATE Traditional_Spanish_CI_AS NULL ,
[Description] [varchar] (50) COLLATE Traditional_Spanish_CI_AS NULL ,
[SourceConnectionID] [int] NULL ,
[SourceObjectName] [varchar] (75) COLLATE Traditional_Spanish_CI_AS NULL ,
[SourceSQLStatement] [varchar] (1000) COLLATE Traditional_Spanish_CI_AS
NULL ,
[DestinationConnectionID] [int] NULL ,
[DestinationObjectName] [varchar] (75) COLLATE Traditional_Spanish_CI_AS
NULL ,
[DestinationSQLStatement] [varchar] (1000) COLLATE
Traditional_Spanish_CI_AS NULL ,
[ProgressRowCount] [int] NULL ,
[MaximumErrorCount] [int] NULL ,
[ExceptionFileName] [varchar] (100) COLLATE Traditional_Spanish_CI_AS NULL ,
[FetchBufferSize] [int] NULL ,
[UseFastLoad] [bit] NULL ,
[InsertCommitSize] [int] NULL ,
[ExceptionFileColumnDelimiter] [char] (5) COLLATE Traditional_Spanish_CI_AS
NULL ,
[ExceptionFileRowDelimiter] [char] (5) COLLATE Traditional_Spanish_CI_AS
NULL ,
[AllowIdentityInserts] [bit] NULL ,
[FirstRow] [int] NULL ,
[LastRow] [int] NULL ,
[FastLoadOptions] [int] NULL ,
[RowsComplete] [int] NULL ,
[RowsInError] [int] NULL ,
[ExceptionFileOptions] [int] NULL ,
[ExceptionFileTextQualifier] [varchar] (50) COLLATE
Traditional_Spanish_CI_AS NULL ,
[InputGlobalVariableNames] [varchar] (100) COLLATE
Traditional_Spanish_CI_AS NULL ,
[CommandTimeOut] [int] NULL ,
[ConnectionId] [int] NULL ,
[OutputAsRecordset] [bit] NULL ,
[OutputGlobalVariableNames] [varchar] (120) COLLATE
Traditional_Spanish_CI_AS NULL ,
[SQLStatement] [varchar] (2500) COLLATE Traditional_Spanish_CI_AS NULL ,
[FunctionName] [varchar] (30) COLLATE Traditional_Spanish_CI_AS NULL ,
[ScriptLanguage] [varchar] (20) COLLATE Traditional_Spanish_CI_AS NULL ,
[AddGlobalVariables] [bit] NULL ,
[ActiveXScript] [varchar] (2000) COLLATE Traditional_Spanish_CI_AS NULL ,
[Type] [varchar] (40) COLLATE Traditional_Spanish_CI_AS NULL
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[VisDts_Var] (
[DtsId] [char] (10) COLLATE Traditional_Spanish_CI_AS NULL ,
[Variables] [varchar] (3000) COLLATE Traditional_Spanish_CI_AS NULL
) ON [PRIMARY]
GO





--
Please post DDL, DCL and DML statements as well as any error message in
order to understand better your request. It''s hard to provide information
without seeing the code. location: Alicante (ES)


"D''Animal" wrote:

Quote:
What are those open source tools?

Dainius S.,

"Satya SKJ" wrote:

All the DTS package details will be stored in MSDB under SYSDTSPACKAGES, but
I'm not sure whether you can get required details with a search string. If
the dts packages are saved to a file then you can get few open source tools
to search thru those files.
--
-----------------
Satya SKJ
Visit http://www.sql-server-performance.com for tips and articles on
Performance topic.


"D''Animal" wrote:

Hello all,

I have 100 DTS packages and I am looking for particular text string (for
example:
like '%table_name%').
How can I look for it without opening each DTS and going through every step?
I'd like to perform simmilar search to the one that we do to find text
within 100s of stored procedures using sysobjects and syscomments tables.

Where does SQL server store DTS Sql code?

Thanks
D

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.