Advice On Scripting In SSIS..

May 17, 2007

Hi all,
I am new to SSIS...and wanted to know where can i get a lot of info(from web/book) on how to deal with ActiveX Scripttasks & Script tasks in SSIS...the place i am working has a lot of VB Scripting done in DTS Packages...having a hard time in understanding the Scripts, as i am more like back-end guy and wanted to learn a lot in SSIS, once i understand the scripts it will help me a great deal as to how to approach the tasks...Is there any website which teaches how to avoid Scripting in SSIS as i read somewhere that Scripting should be avoided as much as possible by making using of so many tasks in the SSIS tool.

I will look forward for someone to help me out and show me a way.

thanks
ravi



Nothing much that i can do..!!

View 1 Replies


ADVERTISEMENT

About Scripting In SSIS.

May 17, 2007

Hi all,
I am new to SSIS...and wanted to know where can i get a lot of info on how to deal with ActiveX Scripttasks & Script tasks in SSIS...the place i am working has a lot of VB Scripting done in DTS Packages...having a hard time in understanding the Scripts, as i am more like back-end guy and wanted to learn a lot in SSIS, once i understand the scripts it will help me a great deal as to how to approach the tasks...Is there any website which teaches how to avoid Scripting in SSIS as i read somewhere that Scripting should be avoided as much as possible by making using of so many tasks in the SSIS tool.

I will look forward for someone to help me out and show me a way.

thanks
ravi



Nothing much that i can do..!!

View 1 Replies View Related

SSIS Scripting

Feb 6, 2008

Has anyone used this shiit ??

its an absolutely useless pile of crap ??

I can't do simple things that were done easily with Active X ..

USELESS...

View 7 Replies View Related

Scripting In SSIS

Dec 6, 2007

Hi, Does anyone have any suggestions on a book about scripting in SSIS. I'm currently using the WROX SQL Server 2005 Integratin Services book. This is an excellent book, but I need something that has more on scripting in SSIS.
My background is dba work, not programming. Thanks.

View 1 Replies View Related

Books For Scripting (.NET) In SSIS...

Apr 10, 2008

Could someone recommend good books for scripting with .NET in SSIS? Anyother useful websites that have this kind of stuff? Appreciate any help.

View 5 Replies View Related

Best SSIS Scripting Tome?

Nov 29, 2006

Is The Rational Guide to Scripting SQL Server 2005 Integration Services Beta Preview by Donald Farmer the best way to learn how to use scripting in SSIS as of late 2006? I'm not a .NET developer, although I come from a Java and C++ background.

I already own Professional SQL Server 2005 Integration Server, but that one doesn't cover scripting so much.

Thanks in advance.

View 2 Replies View Related

How To Run An Exe In The SSIS Scripting Task

Jan 11, 2006

Hi,

Can anyone help me how to run an exe file in the scripting task.

I was trying the below code but it's giving an error.

Set wshShell = WScript.CreateObject ("WSCript.shell")
wshshell.run "c:TestABC.exe", 6, True
set wshshell = nothing

 

Thanks,

rkn

 

View 5 Replies View Related

4 Errors When Using SSIS Scripting Component

Nov 7, 2006



Hi guys, I got these errors when writing a scripting component. Anyone encounteer these errors before?

Warning 1 The dependency 'EnvDTE' could not be found.
Warning 2 The dependency 'Microsoft.SqlServer.VSAHosting' could not be found.
Warning 3 The dependency 'Microsoft.SqlServer.DtsMsg' could not be found.
Warning 4 The dependency 'Microsoft.SqlServer.VSAHostingDT' could not be found.



-Daren

View 4 Replies View Related

SSIS Data Transformation Using Look Up Or Scripting???

Mar 6, 2008

Hi all,

I've got to change values in my source database as follows:

Source: Target:

X 1
Y 1
Z 2

Can I create a lookup table and us a look up task in SSIS to do this or do I need to script it?

Thanks

F

View 1 Replies View Related

Deleting Files Using SSIS Scripting Object

Jun 5, 2006

I am utlizing a scripting object in my ssis to combine two text files into one final file, and then I want to delete the original files. To do this I am utilizing the FileSystemInfo namespace and associating the file names, then utilizing the DELETE functionality.

The creation of the final file works perfectly...unfortunately, my base files do not delete, and I do not get a failure message or indictator.

Here is my code:


' Microsoft SQL Server Integration Services Script Task
' Write scripts using Microsoft Visual Basic
' The ScriptMain class is the entry point of the Script Task.

Imports System
Imports System.Data
Imports System.Math
Imports System.IO
Imports System.IO.File
Imports System.IO.FileSystemInfo
Imports Microsoft.SqlServer.Dts.Runtime

Public Class ScriptMain


' The execution engine calls this method when the task executes.
' To access the object model, use the Dts object. Connections, variables, events,
' and logging features are available as static members of the Dts class.
' Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.
'
' To open Code and Text Editor Help, press F1.
' To open Object Browser, press Ctrl+Alt+J.

Public Sub Main()

Dim strCurrentMonth As String
Dim strCurrentYear As String
Dim strWriteFileName As String
Dim strReadHeaderFileName As String
Dim strReadBodyFileName As String

'Utilizing a case statement, determine the monthname & year and set the appropriate variables
Select Case Month(Now())
Case 1
strCurrentMonth = "January"
Case 2
strCurrentMonth = "February"
Case 3
strCurrentMonth = "March"
Case 4
strCurrentMonth = "April"
Case 5
strCurrentMonth = "May"
Case 6
strCurrentMonth = "June"
Case 7
strCurrentMonth = "July"
Case 8
strCurrentMonth = "August"
Case 9
strCurrentMonth = "September"
Case 10
strCurrentMonth = "October"
Case 11
strCurrentMonth = "November"
Case 12
strCurrentMonth = "December"
End Select

strCurrentYear = Year(Now()).ToString

'Set variables with file names (reader files and write file) for ease in readability and to
'set final (write file) with appropriate nameing convention utilized by Matria HealthCare.

strWriteFileName = "\CUPSRV05SHAREDISPublicData ExportMatriaFiles TO Matriacup_ref_cup_" & strCurrentMonth & strCurrentYear & "_ftp_ReferralFormat.txt"

strReadHeaderFileName = "\CUPSRV05SHAREDISPublicData ExportMatriaFiles TO MatriaMatria_Referral_Control.txt"

strReadBodyFileName = "\CUPSRV05SHAREDISPublicData ExportMatriaFiles TO MatriaMatria_Referral.txt"

'create stream reader/writer objects

Dim sr As New StreamReader(strReadHeaderFileName)
Dim sr2 As New StreamReader(strReadBodyFileName)
Dim sw As New StreamWriter(strWriteFileName)

'feed the header record into the final file

Do Until sr.Peek = -1
'write the header record
sw.WriteLine(sr.ReadLine)
Loop

'close the read stream for the header record file
sr.Close()

'Feed the body records into the final file
Do Until sr2.Peek = -1
'write all base records
sw.WriteLine(sr2.ReadLine)
Loop

'close the read stream for the body records
sr2.Close()

'close the write stream for the final distribution file
sw.Close()

'dispose of all stream objects
sr.Dispose()
sr2.Dispose()
sw.Dispose()

Dim EligBaseFile As New FileInfo("strReadBodyFileName")
Dim EligHeaderFile As New FileInfo("strReadHeaderFileName")

EligBaseFile.Delete() <--These do not delete or through an error
EligHeaderFile.Delete()

'final statement for SSIS package to determine script result

Dts.TaskResult = Dts.Results.Success

End Sub

End Class

I would appreciate any light you can shed on this. Thanks!

View 5 Replies View Related

Add Reference To Excel In Scripting Tool In SSIS 2005

Sep 24, 2007

How can I add a reference to the Microsoft excel 2003 in the script tool in SSIS 2005? I need to automate Excel for formatting.
Thank you.

Dan

View 1 Replies View Related

Data Scripting Tool ( NOT DATABASE Scripting)

Mar 16, 2004

Hi to all
Is there any option in sql server DTS or any other third party tool that can script data. By scripting data i mean that....

if a table "Employee" contains 50 rows, i want the tool to write 50 insert queries for me so that i can run in it anywhere.

Problem is i have to insert data in a remote server where i cannot use DTS. I just have a text area to write my query and press the run button..

Hope u understand my problem. In case of any explanation please reply. Waiting for your response. Thanx in advance.

by to all

View 1 Replies View Related

Advice In Loading Data Through SSIS

Dec 27, 2007

I have 2 flat files to load into a datamart via SSIS.
Need to implement:-
1. How can I prevent loading of same file again?
2. If by chance wrong data has been loaded how can I rollback?
Kindlt guide asap as I have to implement these.
JigJan

View 1 Replies View Related

Quick Question - Need Some Advice On Troubleshooting SSIS Errors

Apr 3, 2007



Hi Everyone:



I have a SSIS Package which in brief moves data from one SQL data store to another. On my local machine, the package executes fines, and does what it is supposed to do, by moving data from Point A to Point B. I have both Point A(DB) and Point B(DB) on my local machine. But when I deploy this package over to ASSEMBLY which is basically another environment, I get weird intermittent errors. What should I do? Can someone give me some tips on how to do good error logging in SSIS? I am currently writing to Windows Event Log, and I seem to look at some errors that are coming thru. What else can I do on SSIS Package side, to improve error reporting and handling, so troubleshooting is faster and more effective. I just need some stable advice on how to setup my package to do error logging where troubleshooting issues in different environments is more effective. Also I need to know, what could be causing these issues? Thanks.



MA

View 8 Replies View Related

Little Urgent.....Advice On Logic Flow In SSIS Transformation......!

May 19, 2008

Dear All,

I have a table A with a KEY column and SSN column.
KEY = 12 digits ( first 3 digits are Department Id , and last 9 digits are SSN)

I have a table B with SSN column only.

both KEY and SSN columns are Primary keys so duplicate entries must be Avoided.

Table A is intended to be popluated weekly from TXT file (SSIS package RUN). I want to achieve somethign like this..!

P-Code sample:

for each Row in TXT file
if TXTfile.KEY = TableA.KEY then
skip and Read/Go to next Row in TXT file
else
INSERT TXTfile.KEY into TABLEA.KEY
SSN_Var = EXTRACT the SSN part (SSNpart.READ)
if SSN_VAR.Exists In TableB.AnyRow then
skip
else
Insert into TableB
End If.
End If
End For Loop.

-----------------------------------------------------------------
Using SSIS controls, what will be best flow and logic to achieve this.....?
any sample scripting code ????

Many Thanks.

View 9 Replies View Related

Scripting Job - ??? ARG !!! Help Please ...

Jun 29, 2001

SQL 7

I am trying to run a script written for an asp page (pure vbscript) in a active script job. I am getting errors on:

Server.CreateObject("ADODB.Connection")

Yes, ADO is up to date and loaded. The error says

Error Code: 0 Error Source= Microsoft VBScript runtime error Error Description: Object required: 'Server' Error on Line 14. The step failed.

Thoughts ..

Craig

View 1 Replies View Related

Scripting

Sep 14, 2000

I know it's a simple question, just can't figure it out:
How do I script a new column into an existing table in SQL? I am using MS SQL 7.0 and need to create several new columns in existing tables.
thanks all.

View 2 Replies View Related

Scripting SPs In EM

Oct 28, 2002

Does anyone know how to prevent or change the

SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO

that appear between each Create? I can't see any options for changing then or eliminating them when generating the SQL Script for my stored procedures.

Thanks,

Scott

View 3 Replies View Related

Scripting Help

May 3, 2006

I have to come up a script that will be going across 60 different servers that will be looking for document type that are not being used across all servers and then deleting them.

To start with:

Select Enabled from MHGROUP.CUSTOM5
where Enabled ='N'

then delete records

and where would I run this type of script or should I say can this be done?

Thanks

View 4 Replies View Related

SQL 6.5 Scripting

Oct 7, 2005

Anyone know how to write a script for sql 6.5 that identifies what column is a primary key on a table? (INFORMATION_SCHEMA doesn't exist) Thanks for the help in advance.

View 10 Replies View Related

I Just Need To Know - Is This Even Possible To Do W/o Scripting???

Mar 21, 2007

What I need to do - can it be done without scripting?

1.) I need to get a list of sp's from a table (EXEC SQL task)

2.) Next, loop through the list of sp's and execute (FOREACHLOOP)

3.) Then, write the output of each sp to a uniquely named file. (DATA FLOW task)

So far, I have had success with 1 and 2. But getting the DATA FLOW task to work has been imposssible thus far.

I tried everything I can think of. I even created a child package that gets called from the FOREACHLOOP, using a Parent Variable Configuration to pass down the name of the stored procedure variable to the child package. No dice.

I am ready to throw in the towel here.

So, my question is, can what I want to do even be DONE without scripting? I was trying to avoid the "manual" approach to this project. It seems like what I want to do "should" be so simple.

In sum, I am simply trying to read a list of sp's from a table, execute the sp's, then write the output of the sp's to a uniquely named file.

Can this be done without scripting? I am beginning to think NOT.

Sigh. This is driving me crazy.

Please, any advice!!

Thanks

View 14 Replies View Related

SQL CMD And Scripting

May 15, 2006

Hi Gurus/MVPS:

Can you please share or show me the code for scripting out stored procedures in SQL Server 2005 using SQL Cmd?. I need to perform the following:



1). Script out the text of the stored procedure

2). Output to a sql file (text file) under some directory like C:sql

3). Import the file into the destination db and run it.

The above three need to be automated in a DTS Package. I tried to use the DMO but my source server is a SQL2k5 and so DTS desginer does not let me use the ActiveX with DMO against SQL 2k5. I need to run the first step against a SQL2k5 machine and the second and third on a SQL2k machine.

Please help!!!.

Thanks

Ankith

View 3 Replies View Related

Scripting A Database

Nov 18, 2003

I just starting working for a new client this week. They have a custom install program written in VB.NET which installs the database to SQL Server 2000. Normally, when I want to create a SQL script to create a database, I would go into Enterprise Manager, right-click on a database, and select All Tasks | Generate SQL Script. However, that's not how this client works. Much to my horror, the CREATE DATABASE, CREATE TABLE, etc. statements are both hard-coded and hand-coded within the install program itself. When I asked them why they weren't using SQL Server's scripting capabilities to automatically generate the script, they said that SQL Server scripting is buggy and that it doesn't work properly. It was hard getting specific details but they said it would leave out indexes, for example. Now, I'm no SQL Server expert, but I've never had a problem using SQL Server's scripting capabilities. The database they use isn't that big - maybe 20-30 tables. So, before I make an issue out of it, I was wondering what everyone else's experience with SQL Server 2000's scripting features? If you've used SQL Servers scripting to recreate a database, does it work? Did you have issues?

View 6 Replies View Related

Scripting Database Changes

Nov 4, 2004

Can you write a script that compares table changes. I have a testing database with a bunch of table changes that i need to move to production and instead of handtypeing the changes in I was wondering if there was a method of creating a script.

View 1 Replies View Related

Scripting Constraints

Nov 30, 2001

Hi,

Just getting into scripting sql. I have a little script that adds and drops a default value for a column. But I cannot get it to run when the column already has a default value specified. If I didn't script the contraint and specify a name I have no name to specify when trying to drop it.

ALTER TABLE users ADD CONSTRAINT dev1 DEFAULT 1 FOR ns_email_flag
ALTER TABLE users DROP CONSTRAINT dev1

How do I remove any existing default values using script?

TIA,

Seoras.

View 2 Replies View Related

Scripting DTS Packages?

Mar 26, 2001

I am currently running SQL7 sp3 and will be moving the database to SQL2k. I have restored the database without any problems, but have not moved the dts packages. What would be the best solution: script the packages, save the packages to the 2k db, or just build from scratch? Any feedback would be appreciated. Thanks! -J-

View 2 Replies View Related

Scripting Jobs

Apr 10, 2001

I would like to move over all of my DTS packages and corresponding jobs onto another MS SQL server machine. The problem that I have is that I haven't been able to find any straight-forward info on how to script up these jobs, move them onto another machine and execute them. I have scanned through previous posts written by people with the same problem, but every response is simply "script up the jobs and move them onto another server." Maybe I'm missing something, but how "exactly" do I get a job to show up on this destination machine in EM, in the management/sql server agent/jobs folder. I did the jobs/all tasks/script job... but then what? I saved it on this destination machine, but am unclear as what to do next. The MS SQL Server Administrators companion book is of no help on this subject, and I do not understand how this simple task can be so confusing and is not documented. Any help would be greatly appreciated.
Thanks in advance!
TB

View 2 Replies View Related

Scripting DTS Packages

Jun 5, 2001

Many times here I have read about scripting DTS packages to copy them to another server. How is this done? Under "All tasks/Generate SQL Scripts" there is no option for DTS. Sould I be looking elsewhere??

View 2 Replies View Related

Scripting GRANTS

Aug 7, 2000

I know there must be a way to script GRANTS for all users for specific objects(tables, sp's, etc). Can't find much in BOL, etc. Does anyone know how?
Any comments would be appreciated.

View 1 Replies View Related

Scripting Triggers

Jul 16, 2002

How can I get a script of triggers (drop & create them) without scripting the tables with them ?

Thanks!

View 9 Replies View Related

DTS Package Scripting

Jun 28, 2004

Is there any way to script DTS Packages? :confused:

View 1 Replies View Related

SSMS Scripting

Jan 29, 2008

Are you kidding me?

I can't create 1 object per file anymore AND I can't have the drop created along with the create

Are they forcing you to use ALTER?

What a piece of junk

View 7 Replies View Related

Scripting Triggers

May 7, 2004

Hi all,
Is there any way to script all the triggers in a database just the way we script tables and stored procedures?
currently I am using the system tables.
regards,
Harshal.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved