DTS Active X Transform Script Error

Sep 5, 2007

I can't for the life of me figure out why I am getting an error with this simple script. The error I get is "expected end" on line "22" which is the first "elseif" in the nested if statement. This makes no sense as obviously I don't want an end if statement there. Any ideas where my syntax is wrong would be greatly appreciated.

'************************************************* *********************
' Visual Basic Transformation Script
'************************************************* ***********************

' Copy each source column to the destination column
Function Main()

dim txncode
dim cashin

txncode = Trim(DTSSource("Col004"))
Cashin = Trim(DTSSource("Col005"))

if txncode = "" or IsNull(txncode) then
Main = DTSTransformStat_SkipRow
exit Function
end if

select case txncode
case "210"
if (Cashin > "0" and Cashin < "1000") then txncode = "210-1000"
'msgbox txncode
elseif ("1000" < Cashin and Cashin < "5000") then txncode = "210-1000-5000"
elseif (Cashin > "5000") then txncode = "210-5000"
else txncode = "210"
end if
msgbox txncode
Main = DTSTransformStat_OK
exit function

case else
Main = DTSTransformStat_OK
exit function

end select

DTSDestination("TransactionCode") = txncode
Main = DTSTransformStat_OK
End Function

View 5 Replies


ADVERTISEMENT

Transform Active X Script To What?

Jan 23, 2007

HI

I'm totally new to integration services, I was savy with DTS but now having been told to get on with it in SQL 2005 I'm a bit stuck.

I've got an ActiveX task which basically does the following:-

Function Main()

DTSDestination("Title") = DTSSource("Title")
DTSDestination("Surname") = DTSSource("LastName")
DTSDestination("FirstName") = DTSSource("FirstName")
DTSDestination("OtherNames") = DTSSource("PersonCode")

IF (IsNull( DTSSource("LastName") ) ) and (IsNull( DTSSource("FirstName") ) ) THEN
IF Not (IsNull( DTSSource("PersonCode") ) ) then
DTSDestination("Surname") = DTSSource("PersonCode")
Else
DTSDestination("Surname") ="Satff Name not set"
END IF
END IF

DTSDestination("TelephoneNumber") = DTSSource("Telephone")
DTSDestination("CollectorNo") =DTSSource("ID")

IF DTSSource("Active") =1 then

DTSDestination("StatusRef") = 1
ELSE
DTSDestination("StatusRef") = 2
END IF

Main = DTSTransformStat_OK

End Function

Thus as you can see I want to query the value of a source field and then put what I need in the destination coloumn - how do I go about doing this in SQL 2005, I've had a look at trying to do this in a dataflow - script task but can't seem to get the destination columns to appear like the source columns do? any ideas

many thanks

scooby

View 9 Replies View Related

There Is Not Enough Disk Space Error While Installing SQL In A Active/Active/Passive Cluster

Mar 5, 2008



Hi

I am having some teething problems while installing SQL on a 3 node cluster. Within the Cluster configuration I have 3 Cluster Groups with each of them having their associated disk resources. All these disk resources physically exist on a SAN.

The actual cluster is running absolutely fine and I can access all the disks from their respective owner node. The problem only starts when I start installing SQL Server 2005 on this cluster. I specify the Cluster group from the Cluster Group Selection and choose the desired partition and then the error message pops up

"There is not enough diskspace on the destination disk for the current SQL Server data files. To proceed, free up disk space to make room for data files, or install the data files to a different drive"

But the disk I am trying to install it on is 264Gb and none of it is used. I have also tried to change it to a different disk within the same Cluster group but to no avail. I have even tried to install it in a different cluster group all together but I get the same error message.

I have googled around havent found anything so far. The disks have got full permissions for the account I am installing SQL with.

Any help will be much appreciated.


Regards

Adnan

View 5 Replies View Related

Error Using Pivot Transform

Jan 5, 2006

Hey, did someone try to use the pivot transform?
It's not what you would call easy to configure...

In BOL there is the following section:
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/extran9/html/55f5db6e-6777-435f-8a06-b68c129f8437.htm

I have followed the instructions there and I get an error when I try to map the new output column to the pivotkey:

"Output column "Yellow" (69) cannot be mapped to PivotKey input column"

So I mapped the new output column to the column holding the quantity values. This worked.
May this be a bug in BOL?

Further on I got some strange behaviour of the pivot transform:

My input is the following CSV-Flatfile:
sk1;sk2;pk1;qty
A;1;Yellow;2
A;1;Green;1
B;1;Yellow;5
A;2;Blue;3
A;2;Green;9
A;1;Green;5

If I omit the last line, everything is fine.
When passing the file as is into the pivot transform the output is:

SK1    SK2    Yellow    Green    Blue
A        1        2            1            NULL
B        1        5            NULL    NULL
A        2        NULL    9            3
A        1        NULL    5            NULL

As you can see the key a;1 is duplicate. The cols SK1 and SK2 are my primary key of the destination table.

When the input is sorted by the first two colums the pivot transform throws an Error:

Error: 0xC02020CF at Pivot w sort, Pivot [39]: Duplicate pivot key value "Green".

I expected to have a sum over all Green for the key A;1. It seems that I have to use an aggregate which in my opinion should
be obsolete here.

As a conclusion I have to say that this task is far away from perfect but not bad for a start.

Regards
Fridtjof

View 3 Replies View Related

Error In Lookup Transform (Advice Please!!)

May 14, 2008

Hi,

I get the following error when



i configure the lookup transform in the data flow task "Input column has a data type that cannot be matched".

This is the query that i use to set the reference table dataset

select firstname, lastname, address, email from customers_dimension cd , cust_test ct where cd.address<>ct.address.

I basically want to try and find all those records that have the same firstname, lastname, email in the customer dimension table where the records do not match. Both the input fields and the lookup fields have the same data type [varchar(max)].

It is pretty confusing, so much so that i did the lookup against the exact same table and got the same error.

Does anyone have a better idea as to what the problem is?

Thankyou

P.S.-This is the caching statement in the advanced tab
select * from




(SELECT firstName
FROM Customers_Dimension) as refTable
where [refTable].[firstName] = ?

View 1 Replies View Related

Memory Error When Trying To Edit A Transform Task In Dts

Oct 4, 2004

I am trying to use a DTS package to get data from db2 in a s390 environment. I am able to use the Import task and then run a query on db2, save the package and execute the package.But when i try edit the transform task i get a mmc.ese application error...it says that the instruction at addres "" tries referencing memory at address "". The memory could not be read...

I installed a ibm odbc driver on my client...obviously the connection seem to work since the package executes...But then the edit issue...

If any one faced this problem or know what i am doing wrong....appreciate ur time and effort...
Thanks

View 1 Replies View Related

Lookup Transform Error When Linking Using A DT_R8

Oct 25, 2005

I'm trying to lookup a value in another table linking on a column of datatype DT_R8.  The lookup transform is complaining that I can't link on that datatype.  However, the documentation says that it should work.  I'm using the April CTP.  Is this fixed in a later version?  Any suggestions?

View 6 Replies View Related

DTS Error ? No Query Specification Returned By Transform Status

Mar 3, 2004

I'm getting this error in a simple DTS package.

No query specification returned by transform status.

Any ideas what's causing this ?

DTS is simply running a query (which returns data via preview)
and insert results into a table.

Thanks
Mark

View 1 Replies View Related

OLEDB Command Transform Error Code: 0x80004005

Dec 20, 2007

I'm receiving an Error Code: 0x80004005 ... a "non-specific error" when trying to use a fairly simple insert in the oleDB command transform. SQL command works fine if I specify the parameters in the values clause of the INSERT statement. If however, I try to use the parameters in setting a variable, I get the 0x80004005 error. Is this a known issue/limitation, or am I just reallly doing something wrong?

View 4 Replies View Related

Parameter Error When Performing A Transform Data Task From Access To SQL Server 2K

Dec 21, 2005

I have an Access 2.0 database that holds call data on a mapped drive. I am running MS SQL Server 2000. I can open it and view the records inside. I can even run the query below and get results, if I removed the CallDate and CallTime parameters.

SELECT CallDate, CallTime, Mid(CallRecordData, 68, 3) AS Extension, 'I' AS Direction, Mid(CallRecordData, 34, 11) AS Called,
Val(Mid(CallRecordData, 18, 2)) + Val(Mid(CallRecordData, 21, 2))/ 60 AS Minutes, Val(Mid(CallRecordData, 21, 2)) AS Seconds
FROM CallRecords
WHERE (CallDate = ?) AND (CallTime >= ?) AND (CallTime < ?) AND (Mid(CallRecordData, 30, 1) <> '9')

When I preview in the Transform Data Task, I get:
Package Error
Error Source: Microsoft JET Database Engine
Error Description: No value given for one or more required parameters.

When I look at the parameters, they are listed. I check their values, and they have the appropriate values (DateCalled, String, 07/14/2005) (StartTime, String, 06:30) (EndTime, String, 07:00)

When I run it in the build query or in Access with a linked table to the source, I can enter the values when asked for them and it works.

Thanks for any help you can provide.

View 2 Replies View Related

SQL Server 2012 :: Query To Count How Many Sessions Are Active And Remain Active Per Hour

Jan 22, 2015

I have a table with the following columns employeeSessionID, OpDate, OpHour, sessionStartTime, sessionCloseTime. I need to see how many users remain active per hour. I can calculate how many logged in per hour, but I am stumped on how to count how many are active per hour. I have a single table that stores login data. I have created a query that pulls out the only the data needed from the table into a temp table using this query. Also note it is possible that the sessionCloseTime is null if the device has not been logged out this would need to be counted a active.

TABLE NAME #empSessionLog Contains the time stamp data OpDate, sessionStartTime and sessionCloseTime.
OpDatesessionStartTimesessionCloseTime
2015-01-202015-01-20 14:32:59.1302015-01-20 14:33:14.6299166
2015-01-202015-01-20 06:58:33.7302015-01-20 15:27:16.9133442
2015-01-202015-01-20 09:56:22.8402015-01-20 17:56:29.7555853
2015-01-202015-01-20 05:59:18.6132015-01-20 14:05:19.0426707

[code]....

can see how many sessions logged in per hour with the following statement:

SELECT
opDate,
FORMAT(DATEPART(HOUR, sessionStartTime), '00') AS opHour,
Count(*) AS Total
FROM #empSessionLog
Group BY opDate, FORMAT(DATEPART(HOUR, sessionStartTime), '00')
Order BY opDate, FORMAT(DATEPART(HOUR, sessionStartTime), '00') ASCResults:
opDateopHourTotal
2015-01-20041

[code]....

Where I am stuck is how do I count the sessions that remain active per hour until the session is closed with the sessionCloseTime.

View 5 Replies View Related

Active X Script Error

Oct 31, 2007

We are converted our DTS 2000 packages to Sql Server 2005 SSIS. I am getting following error on my ActiveX script that got converted. I am new to SSIS and DTS. Never ever worked with ActiveX also. So any help would be appreciated. Following is the script followed by error I get:

'**********************************************************************
' Visual Basic ActiveX Script
'************************************************************************

Function Main()
DTSGlobalVariables.Parent.Steps("Record Stats").DisableStep = False 'Record Stats

if (DTSGlobalVariables("FILE_EXISTS").Value > 0) then
'right click on task, go to workflow, options to see task name
DTSGlobalVariables.Parent.Steps("SET VALID FILENAMES").ExecutionStatus = DTSStepExecStat_Waiting ''call SET_VALID_FILENAMES
DTSGlobalVariables.Parent.Steps("Record Stats").DisableStep = True 'do not run l
end if


Main = DTSTaskExecResult_Success
End Function

Error I get Is:

[ActiveX Script Task] Error: Retrieving the file name for a component failed with error code 0x000A39BC.

Thank You

View 2 Replies View Related

ACTIVE X SCRIPT ERROR

Sep 11, 2007

I have the following code in an ActiveX Script task for SSIS 2005 package... This worked about a year ago when it was first developed. I am coming in to try to update some things and i am running into this problem


Function Main()



Dim crDocument

Dim crApp





Dim sCRConnectionString

Dim crTable

strServer = DTSGlobalVariables("DBServer")

strDatabase = DTSGlobalVariables("DBName")

strCR = DTSGlobalVariables("CrystalReportPath")

strOutput = DTSGlobalVariables("OutputPath")



sFileOutputPDF = strOutput & "EventLogReport.pdf"



strReportLocation = strCR & "LoggedEvents.rpt"





Set crApp = CreateObject("CrystalRuntime.Application")

Set crDocument = crApp.OpenReport(strReportLocation )

sCRConnectionString = "Provider=SQLOLEDB;server=" & strServer & ";database=" & strDatabase & ";Integrated Security=True"



crDocument.DisplayProgressDialog = False

crDocument.ExportOptions.DestinationType = 1

crDocument.ExportOptions.DiskFileName = sFileOutputPDF

crDocument.ExportOptions.FormatType = 31

MSGBOX("EXPORTING..")

crDocument.Export(False)

MSGBOX("EXPORTING FINISHED!!")





Main = DTSTaskExecResult_Success

End Function



It makes it to the "Exporting.." msg box and then i get the following error

Error: 0xC0048006 at ActiveX Script Task, ActiveX Script Task: Retrieving the file name for a component failed with error code 0x0173DA5C.


At first I thought it may have been an issue with the crystal report having a popup or something come up while this was executing.. but I was able to open the crystal and export the data to a pdf no problem... Any suggestions????

Thanks in Advance!!!

View 2 Replies View Related

Active/Active SQL Server Clustering With Multiple Instances

May 12, 2008

Hi

I am newbie in SQL Clustering. I have set up a Windows Server Cluster with 2 nodes and am having the following problem with Physical Disk resource for cluster groups:

My Default Cluster Group (named Cluster Group) has IP Address, Network Name, Physical Disk and MSDTC resources. In addition to that my Default SQL Server instance resources are also in this group. I had this initial set up for Active/Passive mode.

Now I am trying to set up a SQL Cluster in Active/Active mode. For this I have to install another instance of SQL Server in the existing cluster and make a separate cluster group for its resources. I made a new cluster group (SQL Instance Group) with an IP Address and a Network Name resource for this new instance but I dont have any Physical Disk resource to allocate to it. As such while installing the SQL Server Instance I get stuck when I'm asked to select the quorum disk to be used.

Is it possible to configure two quorum disks, one for each group?
What's the concept of dedicated disks resource for each sql instance in a group? Is this same as the quorum disk? If this is not a shared disk how do I configure a dedicated disk resource for my second cluster group (SQL Instance Group)?

Anyone could please help me out with this?

View 12 Replies View Related

Are There Any Issues With An Active/Active Cluster With A Remote Mirror For DRP

Nov 30, 2006

Hi folks,

We are going thru the process of scoping an active/active cluster at one site.
I was wondering whether there will be any issues with mirroring (DB by DB) off the cluster into non clustered server at an alternate DRP site.

Regards, Brian
Sutherland

View 1 Replies View Related

Install Active Active Sql 2005 2 Node Cluster

Mar 12, 2008




Hi all, My aim to install active/active 2 node SQL 2005 cluster. I have installed sql cluster on one mode, which automatically installed on node 2.

it works great. However When i tried to install second virtual server, it is not allowing me to install.

it says already install, can anyone tell me how to install active active cluster

View 1 Replies View Related

Modal Dialog Is Active Error

Mar 5, 2008

has anyone encountered the "microsoft visual studio cannot shut down because a modal dialog is active. close the active dialog and try again." error when shutting down.

i have been getting that every once and awhile, and do not see any open dialog windows that need to be closed, and i end up having to end-task on my visual studio session.

does anyone know what is causing this error and how to avoid it?

thanks a bunch!

-dk

View 5 Replies View Related

Active X Script Task Error

May 5, 2006

Hi,

I am working with an active x script task and I keep getting this error.

[ActiveX Script Task] Error: Retrieving the file name for a component failed with error code 0x01DF3DD4.

I have tried to delete all but the first couple of lines but I keep getting this error. Does anyone have any ideas on how I can fix this. This code worked fine in SQL Server 2000.

Thanks

Brian

This is a snippet of my code

Function Main()
Const adOpenForwardOnly = 0
Const adOpenKeyset = 1
Const adOpenDynamic = 2
Const adOpenStatic = 3

Const adCmdUnknown = &H0008
Const adCmdText = &H0001
Const adCmdTable = &H0002
Const adCmdStoredProc = &H0004

set mySourceConn = CreateObject("ADODB.Connection")
set rstemp = CreateObject("ADODB.Recordset")
set newtbltemp = CreateObject("ADODB.Recordset")

Main = DTSTaskExecResult_Success
End Function

View 1 Replies View Related

Active/active Sql Server Config; Shared Dbs

Nov 2, 1999

Hi,

We are trying to set up an active/active configuration of a SQL Server
cluster, and we had a few questions.

Initially, we want to have 2 Database Servers that would share the same
Database (both reading/writing to the same tables).
However, from reading the MS docs, we find out that we can have what
they call an "active/active" configuration using a Cluster but they
need to have 2 different disk sets, i.e. having 2 separate databases.
If this assumption is correct, how does the data get synchronised
between the 2 databases (that are on the 2 different disks sets)?

Can anyone help? thanks
Axel

View 1 Replies View Related

ACTIVE/ACTIVE SQL Server 2000 Cluster

Oct 12, 2002

ACTIVE/ACTIVE SQL Server 2000 Cluster

This was my plan.

Physical box - box1,box2
virtual box - virtual1

i have a active/passive cluster virtual1 (primary node box1, secondary box2)

I am creating another virtual box on box2 as primary node by name virtual2)

whenever my installation setup runs my default server name is greyed out. it always requires a instance name.

Is that the way it should work?

i can only use instance for active/active failover?

please advice

View 1 Replies View Related

MSDTC In Active/Active MSCS Cluster

Jun 29, 2004

How do I install MSDTC in an active/active MSCS cluster environment?
If I run comclust.exe, I can only activate MSDTC on one of the nodes at a time.

I need DTC on both nodes.

(Opsys is W2K with SQL 2000)


//Mange :)

View 2 Replies View Related

Active/Active SQL Server Cluster And OLTP

Sep 27, 2005

Hello folks,

have you ever heard of an Active/Active SQL Sever 2000 Cluster deployed in a pure OLTP environment?

Some 8 years ago I have learned about a bespoke solution for the SAP ERP system (not the BW!) with DB2 Parallel Server for a huge German company. Then again, I would expect that Oracle RAC might fit into an OLTP environment, although I never heard about a real world implementation.

All this led me to believe clustering is good for failover purposes, and for decision support services, not quite for OLTP applications.

So if you see a point in Active/Active Clustering and OLTP please come forward and explain.

Cheers,

Johann

P.S: For those of you who want to know: Consultants from www.hiltes.com want us to deploy an Active/Active Cluster for their Fashion 3000 Net stock software.

View 6 Replies View Related

SQL 2000 Active/active Cluster And Different IP Adresses

Mar 22, 2007

We run several SQL 2000 SP4 instances on IA64 active/active cluster. The OS we run with is Windows Server 2003 SP1. We have different network cards : 2 network cards teamed for production purposes in domain X and 1 network card dedicated for problem solving in domain Y.
First we configured the cluster with only the 2 teamed network cards for production purposes in domain X. Later we introduced the second network card for problem solving in domain Y.
Everything looks fine. The (virtual) SQL instance listens on two different IP adresses on TCP port 1034. If we try to make connection via isql, EM or Query analyzer than we can directly contact the SQL instance from a workstation/server within domain X but this doesn't work form a workstation/server within domain Y. However if we use the specific TCP port in the connection in domain Y the connection is setup. We wish however not to use explicit TCP ports in setting up connections.
Has anyone experienced the same problem before or has anyone an idea how to solve the problem?

View 1 Replies View Related

Applying SP To 2005 Active/active Cluster

Jun 8, 2007

I have a 2005 active/active cluster and want to apply SQL server 2005 SP2 to both node.
I know that for active/passive , the sp can simple be installed on the active node(instance) and everything will be replicated to the other node.
bear in mind what I have SSIS and SSAS and SSRS running on the active/active cluster.

what is the rigth method for applying the SP to activeactive cluster?

Thanks

View 1 Replies View Related

SQLServer Error: 15404 With Active Directory

Apr 9, 2007

Hello,

I'm having trouble running jobs with my active directory (ADS) account. I've setup my SQL services to run under an ADS account, but jobs cannot seem to query ADS for user information. We're running Windows Server 2003 and SQL Server 2005 SP2.

Here is the error message:

==

The job failed. Unable to determine if the owner (ADSme) of job eFASRtest has server access (reason: Could not obtain information about Windows NT group/user 'ADSme', error code 0x5. [SQLSTATE 42000] (Error 15404)).

==



also this message in log:

==

[298] SQLServer Error: 15404, Could not obtain information about Windows NT group/user 'ADSme, error code 0x5. [SQLSTATE 42000] (ConnIsLoginSysAdmin)

==



I have done a *lot* of searching and cannot find the solution. I believe the 0x5 code is access denied.

The same job runs if I change the owner to a SQL login that's not an ADS account.

I'm not certain how to confirm that the SQL Agent account is the account actually querying ADS, also.

Any help would be greatly appreciated!



Thanks,



-Tony

View 19 Replies View Related

Active / Active Cluster Win2K

Mar 5, 2001

Hi
While configuring an active / active cluster, do I need to run the SQL setup on both nodes?
The SQL2K setup installs binaries on localdisks of both nodes - hence the question.

thanks
Liju

View 3 Replies View Related

Active/Active Clustering Config

Feb 22, 2000

I have setup an active/active clustering environment for SQL Server, however it is 2 seperate virtual servers. How can I set them up to exist as one virtual server containing both active installations? Can this be done? I have two compaq 8500 w/8 processors each. I need to be able to cluster these configurations to take advantage of all 16 processors in one virtual SQL Server. Can it be done?

If you can answer these questions, you will have my undying gratitude.

Thanks in advance.

View 1 Replies View Related

SQL7 In Active/active Cluster

Sep 21, 2000

Hi
I am running some tests on SQL7 in an active/active cluster and have a couple of queries
1. When I create an ODBC DSN, why is the "Use the Failover SQL Server if the primary SQL Server" checkbox disabled
2. To test, I was running SQL queries from Access over the DSN created. When the Primary Server went down, I had to reconnect to re run the query - Is this normal?
3. Can someone point me to any documentation on the above scenario that would shed some more light?

Thanks
Liju

View 5 Replies View Related

Upgrad SQL 6.5 To 7.0 In An Active/active Cluster

Oct 26, 1999

I currently have a two node HP hardware active/active cluster server. Running windows NT 4.0 Enterprise and dSQL server 6.5 sp 3. I want to upgrade the cluster to SQL 7. I would like to know if anyone ran into any problems or has sucessfully attempted this.

Also I read a few months ago about a gottcha involving NT sp4 and SQL sp5a that would prevent a node from failing over. Has this been corrected and does it affect SQL 7.

thanks

View 1 Replies View Related

Active/active SQL 2000 Cluster

Sep 27, 2002

Hi

Is there anyone who knows where I can get some information about
installing an ACTIVE/ACTIVE SQL 2000 Cluster server (MSCS).
I have no problem setting up an active/passive failover cluster.

Where can I get more information? Do I need two instances? Two databases?
What's the difference between active/active and active/passive?

Thanks!

View 2 Replies View Related

Active/active Sql Server Cluster

Jan 20, 2004

Hello, Can anyone please explain how the failover processes works on a sql server 2000 2 node active/active cluster.

Given the following
You have 2 node active/active cluster NodeA & NodeB

Question
1. How many SQL instances need to be installed on each node?

2. If the answer to question #1 is one instance per node, then
say if NodeA fails NodeB will take over all the resources of NodeA
including the master database, How does that work , how can once instance (in nodeB) handle two master database i.e its own master database and the one taken over from NodeA.

View 1 Replies View Related

RAM Config For Active/active Sql Cluster

May 18, 2008

Hi,
I've just setup an 2 node active/active sql cluster (my first). Both servers have exactly the same specification, 16GB of RAM each and SAN attached. My question is, how do I configure the min and max memory for each sql instance. I've read some where that I need to follow the 20-40-40 rule as, 20% for the OS, 40% for the active sql instance on the node and the other 40% is for the other sql instance if it fails over. Are there any other gotcha that I need to be aware of? Can someone share some light with me in regards to this? Thanks

Ken

View 4 Replies View Related

Detect Active/Active Node

Jul 3, 2007

We have an active/active node setup with SQL 2005. Does anyone have any samples of VBS I could use to see what node is actually taking requests at a certain time? What I want to determine is what the actual active node is.

Thanks.

View 1 Replies View Related







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