How To Excute Package In Sequence

Jun 14, 2006

How to excute package in sequence . i have an requirement like this the package should execute in a sequence

1.PKG1

2.PKG2

3.PKG3

and in some case PKG1,.PKG2,.PKG3 shoule run parallel.



Thanks & Regards

Jegan.T



View 3 Replies


ADVERTISEMENT

Can't Excute SSIS Package

Feb 26, 2007

So everything was working great. Now I have a few problems. The little play button is no longer available for me to puch and when I try a right click execute package a get a "Unexpected internal error: Invalid state for operation. (Microsoft Visual Studio)". Does anyone know how to fix this? Also when I try and copy tasks from within my package I get a "An error occurred while objects were being copied. SSIS Designer could not serialize the SSIS runtime objects. (Microsoft Visual Studio)"
followed by "Could not copy object 'package name' to the clipboard.
(Microsoft.DataTransformationServices.Design)" and then "Invalid access to memory location. (Exception from HRESULT: 0x800703E6) (Microsoft.SqlServer.ManagedDTS)"



Does anyone what might be wrong



Thanks in advance

View 4 Replies View Related

Help: Why Excute A Stored Procedure Need To More 30 Seconds, But Direct Excute The Query Of This Procedure In Microsoft SQL Server Management Studio Under 1 Second

May 23, 2007

Hello to all,
I have a stored procedure. If i give this command exce ShortestPath 3418, '4125', 5 in a script and excute it. It takes more 30 seconds time to be excuted.
but i excute it with the same parameters  direct in Microsoft SQL Server Management Studio , It takes only under 1 second time
I don't know why?
Maybe can somebody help me?
thanks in million
best Regards
Pinsha 
My Procedure Codes are here:set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
-- =============================================
ALTER PROCEDURE [dbo].[ShortestPath] (@IDMember int, @IDOther varchar(1000),@Level int, @Path varchar(100) = null output )
AS
BEGIN
 
if ( @Level = 1)
begin
select @Path = convert(varchar(100),IDMember)
from wtcomValidRelationships
where wtcomValidRelationships.[IDMember]= @IDMember
and PATINDEX('%'+@IDOther+'%',(select RelationshipIDs from wtcomValidRelationships where IDMember = @IDMember) ) > 0
end
if (@Level = 2)
begin
select top 1 @Path = convert(varchar(100),A.IDMember)+'-'+convert(varchar(100),B.IDMember)
from wtcomValidRelationships as A, wtcomValidRelationships as B
where A.IDMember = @IDMember and charindex(convert(varchar(100),B.IDMember),A.RelationshipIDS) > 0
and PATINDEX('%'+@IDOther+'%',B.RelationshipIDs) > 0
end
if (@Level = 3)
begin
select top 1 @Path = convert(varchar(100),A.IDMember)+ '-'+convert(varchar(100),B.IDMember)+'-'+convert(varchar(100),C.IDMember)
from wtcomValidRelationships as A, wtcomValidRelationships as B, wtcomValidRelationships as C
where A.IDMember = @IDMember and charindex(convert(varchar(100),B.IDMember),A.RelationshipIDS) > 0
and charindex(convert(varchar(100),C.IDMember),B.RelationshipIDs) > 0 and PATINDEX('%'+@IDOther+'%',C.RelationshipIDs) > 0
end
if ( @Level = 4)
begin
select top 1 @Path = convert(varchar(100),A.IDMember)+ '-'+convert(varchar(100),B.IDMember)+'-'+convert(varchar(100),C.IDMember)+'-'+convert(varchar(100),D.IDMember)
from wtcomValidRelationships as A, wtcomValidRelationships as B, wtcomValidRelationships as C, wtcomValidRelationships as D
where A.IDMember = @IDMember and charindex(convert(varchar(100),B.IDMember),A.RelationshipIDS) > 0
and charindex(convert(varchar(100),C.IDMember),B.RelationshipIDs) > 0 and charindex(convert(varchar(100),D.IDMember), C.RelationshipIDs) > 0
and PATINDEX('%'+@IDOther+'%',D.RelationshipIDs) > 0
end
if (@Level = 5)
begin
select top 1 @Path = convert(varchar(100),A.IDMember)+ '-'+convert(varchar(100),B.IDMember)+'-'+convert(varchar(100),C.IDMember)+'-'+convert(varchar(100),D.IDMember)+'-'+convert(varchar(100),E.IDMember)
from wtcomValidRelationships as A, wtcomValidRelationships as B, wtcomValidRelationships as C, wtcomValidRelationships as D, wtcomValidRelationships as E
where A.IDMember = @IDMember and charindex(convert(varchar(100),B.IDMember),A.RelationshipIDS) > 0
and charindex(convert(varchar(100),C.IDMember),B.RelationshipIDs) > 0 and charindex(convert(varchar(100),D.IDMember), C.RelationshipIDs) > 0
and charindex(convert(varchar(100),E.IDMember),D.RelationshipIDs) > 0 and PATINDEX('%'+@IDOther+'%',E.RelationshipIDs) > 0
end
if (@Level = 6)
begin
select top 1 @Path = '' from wtcomValidRelationships
end
END
 
 
 

View 6 Replies View Related

Problem When From Sequence File Insert Into Oracle Destination Table In SSIS Package

Jun 20, 2006

Hi ,



i was used the Follwing DataFlow for my Package.using Oracle 8i



FalteFile Source -------------> Data Conversion --------------->OLEDB Destination (Oracle Data table)

using above control flow to map the Source file to Destination . When i run the SSIS Package teh Folwing Error i got

"Truncation Occur maydue to inserting data from data flow column "columnName " with a length of 50 "

regarding this Error i i understood its for happening Data Length . so that i was changed the Source Column Length Exactly Match with the The Destination table.

still i am getting this Error. pls any one give me a solution . SHould i Change the DataType also?

pls give your suggestion



Thanks & Regards

Jeyakumar.M

chennai

View 3 Replies View Related

Excute Xp_cmdshell Run BCP In SQL Scheduler

May 26, 1999

Hi,

I have a schedule task with the following command:
xp_cmdshell 'bcp DBName.TBLOwner.TBLName in h:datafile.txt /fh:formatfile.fmt /Sservername /Usa /Ppassword'
The error message that I recieved is "Unable to open Host file. I can run the BCP command in Dos C prompt successfully, but
cannot run this in the SQL Server Scheduler. H drive is net use to the Server and it is where my data file and format file located.
Does anyone has any idea? I do appreciate for your help.

View 3 Replies View Related

Automattically Excute A Procedure

Jun 3, 2006

I am using MS sql 2000. I think I need to use SQL agent to run a job, but not sure how to call up the procedure! The procedure runs collectly when run from SQL query.

Thank You,

Ernie

View 5 Replies View Related

Question About Excute Store Procedure

Mar 14, 2004

Hi, all

i create a function("changefilepermission") to execute a procedure ("grant_file_access") to change the file permission. i click the permission checkbox to change new permission, after that i will click the submit button to update change to the database. but it does not change to the database. this is my part of code. is anybody can give me a help?

thanks in advanced!!!!!!!!!

Private Sub btnsubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnSubmit.Click

Dim FileTitle As New String("")
Dim FileName As New String("")

FileName = DGPermission.Items.Item(0).Cells(0).Text 'retrieve filename from datagrid
FileTitle = DatabaseCommand(userid, "fa_title", filename) ' retrieve the filetitle from table

Dim permission As Char ' set the permission value
If (CkRead.Checked) Then
Permission = "r"
ElseIf (CkWrite.Checked) Then
Permission = "w"
ElseIf (CkExecute.Checked) Then
Permission = "o"
End If

Try
' call the store procedure function by passing 4 value
ChangeFileAccess(userid, FileName, FileTitle, Permission) '
Catch ex As Exception
lblErrorMsg.Text = ex.ToString
End Try
End Sub

' execute store procedure function
Public Sub ChangeFileAccess(ByVal userid As String, ByVal DiskFilename As String, ByVal Title As String, ByVal Access As Char)
Dim UpdateCommand As SqlCommand
UpdateCommand = New SqlCommand

With UpdateCommand
.Connection = SqlConnection
.CommandType = CommandType.StoredProcedure
.CommandText = "Grant_File_Access"
.Parameters.Add("@vu_id", SqlDbType.VarChar, 20).Value = userid
.Parameters.Add("@DiskFilename", SqlDbType.VarChar, 64).Value = DiskFilename
.Parameters.Add("@Title", SqlDbType.VarChar, 50).Value = Title
.Parameters.Add("@Access", SqlDbType.Char, 1).Value = Access
End With

Try
UpdateCommand.Connection.Open()
UpdateCommand.ExecuteReader() ' call the store procedure
UpdateCommand.Connection.Close()
Catch ex As Exception
lblErrorMsg.Text = ex.ToString
End Try
End Sub

View 1 Replies View Related

Variable Problem In Excute SQL Task

Nov 27, 2006

Hi there

I have a bit confusing problem,

In Execute SQL Task I am having a stmt like : (Select * from Emp where EmpNm=?) also I m passing variable value through Parameter Mapping.

Problem I am facing is that if I remove brakets from both end task is executed successfull but if I but those braket as they are task execution fails. and i need those brakets as it is inside a if statement.

Problem is with parameter passing ,even if i put some value as EmpNm="ABC " with brakets, it runs successfully



Any Solution to above problem

Thanks and Regards

Rahul Kumar, Software Engineer





View 3 Replies View Related

How Do I Excute DBCC DBreindex From Public Group

Aug 24, 2000

Hi All
Could you guys help me i have small problem in running dbcc dbreindex.I could run this command from dbo,sysadmin and
Object owner logins to rebuild the index but what i want to do is i want to run this command in a stored procedure.
this is also fine if i run the stored procedure any one of above logins it executes when i grant exec permission on this procedure
to public it will not execute in public group since public group is not a owner of this object..
How do i excute DBCC DBreindex from public group.Could you please help me.....................

View 1 Replies View Related

How To Excute Stored Procedure That Insert Record And Return Last Inserted Value

Jul 18, 2007

Dear all,
I am using C# , asp.net and sql server 2005.
Let me explain the situation.
I have written procedure to insert data into the table and return last inserted value by @@identity variable. Now my question is how do I execute this process so that I can
Get last inserted variable values      
Please help 
thanks 
 

View 3 Replies View Related

How Do I Start A Transaction :-Dataflow Task + Excute SQL Task

Mar 7, 2007

1 :Control Flow Excute SQL task: Truncate Table

2: Dataflow Task: Datareader--Script componant--OLE DB Destination (SQL Server 2005--a single table --always around 600,000 rows)

How do I set up a transaction where if there is a failure the Truncate Table command will roll back---and the OLE Destination (A single SQL Server table) will be left the same as before the load started.

Another question with that volume of data --600,000 rows will a truncate table be pratical in a transaction

Any ides welcome

thanks in advance

David

View 3 Replies View Related

Sequence No.

Feb 6, 2004

Hi,
How can I generate a sequence No. using a simple SELECT statement.

like

declare @key
set @key = 1

SELECT @key, e.name from Employee

Now I want to display name of the employee and Key value which should get incremented automatically for each employee..
Is there any way?
Please help me..

View 1 Replies View Related

Sql Sequence

Dec 18, 2007

hi

i've been asked to write a sql sequence for a database i'm building but i haven't been using SQL very long and i have no idea how to write a sequence. Does anyone know anything about sql sequences?

thanks

jessica

View 14 Replies View Related

Sequence

Jul 20, 2005

Hi,I need little help with Ms SQL Server 2000. I would like to know how tocreate sequence or something like that. I want to have an automatic counterfor each row in one entity, so then I can do something like this:INSERT INTO table VALUES (use sequence(something), value, value, .... )Can you please help me?thxTomas

View 1 Replies View Related

How To Add A Newline Sequence

Apr 9, 2007

I have a SQL 2005 stored procedure to generate an email when passed parameters such as receipient, subject etc
 One of the paramteres passed to it is @body which is the body text of the message.  I want to be able to add a couple of blank lines and then some footer information.  This is working right now except I can't find the right way to add newlines into the string within the store procedure, so my footer information just tags right on after the bodytext.
I have tried but that literally adds the two characters  and n
Can anyone advise how to generate newlien sequences in T-SQL.
Regards
Clive

View 1 Replies View Related

Sequence Order

Apr 27, 2008

Hi all.
In one table fields vales are 9, 5, 7, 2, 5, 6, 44, 67, 789.
 I want to get 5 high values so please can you write sql query for this question.
 
Thanks.
 
Zahyea.

View 1 Replies View Related

Log Sequence Number

Apr 16, 2002

Hi, I've a question, if I've the LSN (Log Sequence Number) of a transaction, keep with the program "Log Explorer", can I know which is the IP of the user that have do the transaction (perhaps serching in a log file of the Win 2000 Server) ?
10x,
Clara

View 1 Replies View Related

Sequence Number

Dec 29, 1998

In SQL 6.5 object dependencies window, what does the sequence number means?

Thanks,

Sam

View 1 Replies View Related

How Can I Create A Sequence ?

Jul 16, 2001

Hi,

I would like to know how it is possible to create a sequence with sql server 2000
With Postgres SQL i create the sequence essai : create sequence essai START 1;
but i don't know what is the sql command.

Thanks in advance.

Marie

View 1 Replies View Related

Escape Sequence

Sep 1, 2004

Hi,
I have a question with this query -
SELECT * FROM table1 WHERE column1 = 'T_C_%';

This query returns rows where column1 = "T_Care", "T_CRP" etc etc, whereas I was expecting only rows where column1 = "T_C_Tail", "T_C_Head"

However, when I use an escape character(/), the results are more in the lines of the expected results.

Can somebody explain this?
cheers/- Pradeep

View 2 Replies View Related

Sequence Number Help

Nov 17, 2005

I have the following stored procedure:

CREATE PROCEDURE dbo.ABR_HDR_INSERT

@id int output,
@status int,
@mode int,
@sessid varchar(100)

AS

declare @ay char(4)
declare @ddo char(4)
declare @abrid varchar(50)
declare @seq_no int

SELECT @ddo = a.DDO_DSCR_SHORT
FROM dbo.DIM_DDO a
JOIN dbo.Temp_ABR_HDR b
ON a.DDO_ID = b.DDO
WHERE b.SESSIONID = @sessid

SELECT @ay = AY
FROM dbo.Temp_ABR_HDR
WHERE SESSIONID = @sessid


-- set the default seq_no
SELECT @seq_no = 1
-- get the max abrid. if no record return the seq_no will be 1
SELECT @seq_no = convert(integer, max(right(abrid, 4)))
FROM dbo.ABR_HDR
WHERE left(abrid, 7) = @ay + @ddo

-- convert @seq_no to string prefix by 0
SELECT @abrid = @ay + @ddo + right('0000' + rtrim(convert(char(4), @seq_no)), 4)


Insert into dbo.ABR_HDR (ABRID, HDR_MODE, HDR_DDO, HDR_AY, HDR_REQUESTOR, HDR_DT, HDR_SUBJECT, HDR_DESCRIPTION, HDR_STATUS)

SELECT

@abrid,
@mode,
DDO,
AY,
REQUESTOR,
DT,
SUBJECT,
DESCRIPTION,
@status

FROM dbo.Temp_ABR_HDR


SELECT @id = @@identity

return @id
GO

ABRID gets inserted as a <NULL> value. I can't figure out why? If I comment out the following then ABRID will insert without the sequence number:

CREATE PROCEDURE dbo.ABR_HDR_INSERT

@id int output,
@status int,
@mode int,
@sessid varchar(100)

AS

declare @ay char(4)
declare @ddo char(4)
declare @abrid varchar(50)
declare @seq_no int

SELECT @ddo = a.DDO_DSCR_SHORT
FROM dbo.DIM_DDO a
JOIN dbo.Temp_ABR_HDR b
ON a.DDO_ID = b.DDO
WHERE b.SESSIONID = @sessid

SELECT @ay = AY
FROM dbo.Temp_ABR_HDR
WHERE SESSIONID = @sessid


-- set the default seq_no
--SELECT @seq_no = 1
-- get the max abrid. if no record return the seq_no will be 1
--SELECT @seq_no = convert(integer, max(right(abrid, 4)))
--FROM dbo.ABR_HDR
--WHERE left(abrid, 7) = @ay + @ddo

-- convert @seq_no to string prefix by 0
--SELECT @abrid = @ay + @ddo + right('0000' + rtrim(convert(char(4),@seq_no)), 4)

SELECT @abrid = @ay + UPPER(@ddo)

Insert into dbo.ABR_HDR (ABRID, HDR_MODE, HDR_DDO, HDR_AY, HDR_REQUESTOR, HDR_DT, HDR_SUBJECT, HDR_DESCRIPTION, HDR_STATUS)

SELECT

@abrid,
@mode,
DDO,
AY,
REQUESTOR,
DT,
SUBJECT,
DESCRIPTION,
@status

FROM dbo.Temp_ABR_HDR


SELECT @id = @@identity

return @id
GO

So, the code that sets the sequence number is what is causing the <NULL> value.

Any help is appreciated.
Thanks,
-D-

View 4 Replies View Related

Sequence Tables

Feb 1, 2007

Hi,
I am migrating a project from Oracle to SQLServer and must use the same DDL.
The entities have compound primary keys. In Oracle I ensure the compound key is unique by using a sequence table to generate one of the values for the compound key.
Does SQL Server have sequence tabels or does anybody know a way to get it do something similar?
Thanks

View 1 Replies View Related

Max Value For Sequence Table

Apr 27, 2007

Hi,
How do I determine the max value for Sequence table in SQL Server?
Regards

View 7 Replies View Related

Sequence Number

Oct 3, 2007

suppose I have the following table grouped by memid

memiddx
3455
3322
3232
433
43434

I want to attach sequence number for each unique value of dx per memid as
below

memiddxSEQ
34551
33222
32323
4331
434342

I am using a cursor right now and it takes a lot of time if my table is large.
Is there a more efficient way of doing this.

Thanks much.

View 3 Replies View Related

Number Sequence

Jan 11, 2008

is it possible to generate a number sequence in a query (without using loop). I want the output to look as
-------
ID
-------
1
2
3
4
5
6
7
8
9
....
upto the last number I give in the query

View 13 Replies View Related

Sequence In Rollback

Oct 16, 2014

I am not sure about the ANSI/ISO rules on this? We have a SEQUENCE and insert it into a table.

CREATE SEQUENCE Cheque_Seq
AS INTEGER
START WITH 1
INCREMENT BY 1;
CREATE TABLE Cheque_Book
(cheque_seq INTEGER*NOT NULL PRIMARY KEY,
cheque_amt DECIMAL (15,2) DEFAULT 0.00 NOT NULL);

If I do an insertion with the SEQUENCE in a transaction and then ROLLBACK the transaction, what happens to the sequence value? My thought is that the value should reset to the state it was in before the transaction (basic definition of a ROLLBACK). But it does not in the products I have looked at.

View 1 Replies View Related

Sequence And Triggers

Apr 4, 2008

Hi SqlGurus,

I have created table T1 as
created table t1 (no int not null primary key,name varchar(30))

i have created a sequence for this table

when i give the following insert statement

insert into t1 (name) values ('xyz')

the next sequence val should be inserted in column no

this is done generally in oracle with before trigger

how about here .Can we do this ?

View 7 Replies View Related

Sequence From A Function

Mar 10, 2006

Hi

I need to create a function that will return a sequence number. The reason I need this to be a function is that I will use the function to create a view. In Oracle I would do something like this:

create sequence seq;

create or replace function f return number
as
l_seq number;
begin
select seq.nextval into l_seq from dual;
return l_seq;
end; /

create or replace view v as select f from dual;

Since Sql Server does not have a sequence object I have created a sequence table with a identity column and a procedure that inserts a dummy variable and returns the identity id. This works ok but to get my sequence number I must declare a variable, execute the procedure and select the return value.
I need the procedure to be a function so that I can use it to create my view. Since I cannot use DML in a function and I cannot call a procedure from a function I am stuck. Do I have to create an extended procedure ? Any help is appreciated

View 8 Replies View Related

Sort Sequence

Mar 28, 2007

hey all,
im having some problem to do this. i have this one table, that has sequence for other table.
table : tblpicksequence (this sequence is dynamic eg : Non=1, cons=2, RET=3)
picktypepicksequenceitemref
RET1x1
Non2x1
Cons3x1
i need to select record from other table depend on tblpicksequence sequence
table : tbldetail
idRETNonCons
1001
2110
3100
4 001
so base on tblpicksequence, RET=1, NOn=2, Cons=3, i need to list the record from tbldetail :-
i.list all RET=1
ii.if (i) not exists list all Non=1
iii.if (ii) not exists list all Cons=3
i expect :-
idRETNonConspicksequencepicktype
21101RET
31001RET



~~~Focus on problem, not solution~~~

View 8 Replies View Related

Sequence Counter

Nov 5, 2007

I'm looking for a query that will look at an Id field and if it occurs more than once then returns the count of the times it occurs. For Example,

ID Code GetSequence
4 239 1
4 241 2
4 3243 3

View 5 Replies View Related

Sequence Of Execution

Dec 26, 2007

Hello to every body
I need to know about sequence of execution in a select command.
I have a sql command that use a function.some thing like:
select id, function(item)
from tbl
where conditions...
I want to know that if my function on item execute before where section or vise versa.
I try to explain it more. I want to know that sql engine fetch rows accordin to where clause and then execute my function or execute my funtion and then fetch the rows according to where clause.

If you have a document or some thing that explain about sql engine and sequence of execution please let me know.

Your help is really appriciated.

View 4 Replies View Related

ORDER IN Particular Sequence

Jan 23, 2008

Hi,

I have a table in which there is 5 column ...one with numbers like...1,2,3,4,..20...and one column is with description....and other column with other details...

Now I want to disply my results in sequence followed by 1,2,3,4,5,17,18,15,16,10,11,20 with all other columns...so can anybody suggest me what to do..?

View 3 Replies View Related

Restore Log-sequence

Feb 5, 2008

hi all,

how to restore Transactional log files in Sequence,

Restore log Db_name
from disk='d:ackup_name.trn'
...

pls required syntax for it

thanx for any help

View 6 Replies View Related







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