Hi,
I have created SSIS Package using DTS vizard in SQL 2005 Express. Help me out to execute the Package.
Thanks
Even I am also trying for the Same. Update me if you get a solution.sqlHi,
I have created SSIS Package using DTS vizard in SQL 2005 Express. Help me out to execute the Package.
Thanks
Even I am also trying for the Same. Update me if you get a solution.sqlI have created a DTS package in SQL 2005 which will pull the data from oracle and pushes into SQLServer. I am able to execute the package from business intelligence wizard.
Is there anyway to trigger this package manually apart from the wizard?.
looking for responses.
Thanks
GaneshIt can also be executed from query analyzer.
You call it from any forntend tool also.|||Hi
Thanks for your response.
When I create package from Business intelligence wizard, It was created as Package1.dtsx. Now , How can I invoke package1.dtsx from query analyzer?.
As far as I know, In oracle, a package will contain main and a body procedures. We can invoke the main procedure from any command prompt. But I am new to SQL packages. Can you suggest me in this regard.
Thanks,
Ganesh
I created a package and stored in SQL server.
I am running it as follows
master.dbo.xp_cmdshell dtexec /sq "ABC DEF GHI" /ser "Prod"
ABC DEF GHI --> is my package name.
When i run this from a job, it runs without error
but when i run the above sql i am getting error as
Msg 102, Level 15, State 1, Line 2
Incorrect syntax near '/'.
Am i missing some thing, please advice. Is that the problem between spaces in the package name?
I missed the single quotes
master.dbo.xp_cmdshell 'dtexec /sq "ABC DEF GHI" /ser "Prod"'
DTSRun: Loading...
DTSRun: Executing...
DTSRun OnStart: DTSStep_DTSActiveScriptTask_1
DTSRun OnError: DTSStep_DTSActiveScriptTask_1, Error = -2147220482 (800403FE)
Error string: Error Code: 0
Error Source= msxml3.dll
Error Description: A connection with the server could not be established
Error on Line 10
Error source: Microsoft Data Transformation Services (DTS) Package
Help file: sqldts80.hlp
Help context: 4500
Error Detail Records:
Error: -2147220482 (800403FE); Provider Error: 0 (0)
Error string: Error Code: 0
Error Source= msxml3.dll
Error Description: A connection with the server could not be established
Error on Line 10
Error source: Microsoft Data Transformation Services (DTS) Package
Help file: sqldts80.hlp
Help context: 4500
Error: -2147467259 (80004005); Provider Error: 0 (0)
Error string: A connection with the server could not be established
Error source: msxml3.dll
Help file:
Help context: 0
DTSRun OnFinish: DTSStep_DTSActiveScriptTask_1
DTSRun: Package execution complete.
NULL
Can anyone help me solve this problem please
I am with the same occurrence, but in a server windows 2003 server. Does anybody can me to help?
Guilherme
guilhermer@.correios.com.br
|||Can you post the code you are running?
This works:
xp_cmdshell'dtsrun /SmyServer /NmyPackage /E'
|||DTSRun /S "smg0062" /N "DBTNT - BAIXA SRO" /W "0" /EsqlDTSRun: Loading...
DTSRun: Executing...
DTSRun OnStart: DTSStep_DTSActiveScriptTask_1
DTSRun OnError: DTSStep_DTSActiveScriptTask_1, Error = -2147220482 (800403FE)
Error string: Error Code: 0
Error Source= msxml3.dll
Error Description: A connection with the server could not be established
Error on Line 10
Error source: Microsoft Data Transformation Services (DTS) Package
Help file: sqldts80.hlp
Help context: 4500
Error Detail Records:
Error: -2147220482 (800403FE); Provider Error: 0 (0)
Error string: Error Code: 0
Error Source= msxml3.dll
Error Description: A connection with the server could not be established
Error on Line 10
Error source: Microsoft Data Transformation Services (DTS) Package
Help file: sqldts80.hlp
Help context: 4500
Error: -2147467259 (80004005); Provider Error: 0 (0)
Error string: A connection with the server could not be established
Error source: msxml3.dll
Help file:
Help context: 0
DTSRun OnFinish: DTSStep_DTSActiveScriptTask_1
DTSRun: Package execution complete.
NULL
Can anyone help me solve this problem please
I am with the same occurrence, but in a server windows 2003 server. Does anybody can me to help?
Guilherme
guilhermer@.correios.com.br
|||
Can you post the code you are running?
This works:
xp_cmdshell 'dtsrun /SmyServer /NmyPackage /E'
|||DTSRun /S "smg0062" /N "DBTNT - BAIXA SRO" /W "0" /EHi, I'm new to this forum, so please bare with me.
I've created a mining model, i've tweaked it etc and i'm now happy with the results its producing. I'm now looking to automate the processing and exporting of the results of the model i've done this simply by creating an SSIS package with two tasks, one task being to process the model the other task is a Data Mining Query task.
This package works fine in visual studio and when i deploy it to the server.
The problem i'm having is when i then try to execute the package from a job, after a bit of investigating i have tracked it down to the Encryption of "sensitive" properties. By default the encryption is based on UserKey which is why the package works for me when i execute it from VS or even the server, but when the job trys to execute the package running under the sql agent account it fails.
Looking at the security options i have for packages, i can either DontSaveSensitive, EncryptSensitiveWithUserKey or EncryptSensitiveWithPassword plus a few others.
DontSaveSenstive is clearly not an option as this just creates an unusable package.
EncrptSensitiveWithUserKey doesn't seem to be an option as the job runs under the SQL Agent account (also i'm thinking that the UserKey that the encryption is based on also incorporates other factors related to my profile that i can't impersonate? i might be wrong though)
EncryptSensitveWithPassword seems to be an option except that i can't get this to work either, there doesn't seem to be anyware in the job step to give it the password information.
Its frustrating me now because i've fallen at the very last hurdle, if anyone else has experienced this problem and knows how to resolve it that would great.
Thanks
Bob.
There is a comprehensive KB article that may cover your question:
http://support.microsoft.com/kb/918760
|||Thanks, that has helped.
for reference i employed the DontSaveSensitive level of security and stored the Query String for the Data Mining Query task in an XML configuration file.
this is the only option on the KB article that worked for me.
Thanks.
Hello All,
I have created a view that will potentially return a huge number of records around 500,000 rows. When i execute this view by clicking Open View from the SQL Management studio i get the following error
SQL Execution error
Error Source: .Net SqlClient Data Provider
Error Message: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding
However the query executes when paste the generated query of the view in the query designer window. It returns the 500,000 rows. I am wondering if there is some option that i will have to configure to return a large size result set in view designer. I also want to know if this is an inherent problem with view designer.
Any help regarding this will be really appreciated.
Satya
Open View creates a fully editable grid of the rows returned by the view so it is not surprising that it is choking on that much data.
First - this is not the view designer, the view designer opens when you select Modify, and that will let you edit the view definition.
If you do want to work with the data in the view through Open View, then after you select Open View, click the stop button down at the bottom of the window, next to the message that says Retrieving Data... It will stop and show whatever data it retrieved before you clicked the button. Now click the Show SQL Pane button on the toolbar (or Query Designer/Pane menu). In the SQL pane, edit the query by adding a WHERE clause to the SELECT statement that is selecting the data from you view. Now click the Execute SQL button (the exclamation mark) and it will run and return only the rows that match. Now you can selectively pull only a portion of the 500,000 rows at a time and work on them, then change the WHERE clause to select other rows. I can't believe you really want all 500,000 rows on screen at the time - and SQL Server doesn't think it's a good idea either :-)
|||Hi,
Thanks for your reply. I didnt intend to see all the 500,000 rows of data at a time but did want to know the maximum volume that i can see when i click Open View. The stop button is also disabled when i click Open view and i get this error directly and so i cannot see a partial set of the data the way you had specified. Also i wrote <select a top 1 * > query enveloping the query generated by the view so that i could get atleast the first tuple of the query result but even this was aborted by the same error. The error comes immediately after a minute and no option is enabled for me to do anything once i click Open View or execute.
I was trying to see if this was a configuration issue in VIEW or if i was missing something else. The same query does give the intended results when i run in the query designer. Is there a capacity constraint for the Results grid pane in the View Designer as compared to normal query window.
Thanks again for your help and would appreciate if you can clarify the above too
satya
|||Do you by any chance have a TOP and an ORDER BY in the view definition, or is the view just a standard SELECT?|||It just seems that the CommandTimeout property is not updated in Management Studio when using View, and that it is always stuck at 30 sec. I have the same problem, but it seems impossible to fix.|||I have a view that returns over 500,000 rows, it takes about 5 minutes and never times out. I can click the Stop button at any time. I haven't changed anything from default so I'm not sure what's different.sql
Could anyone show me how to execute a stored procedure using SMO. I can easily see how to created one and drop one but I cannot see how to execute one.
Thanks very much.
Smo does not have any method to Execute a StoredProcedure. You can however use the Database.ExecuteNonQuery method to run the TSQL to execute the stored procedure.
Thanks,
Kuntal
Dear Sir,
My database have a no. of tables. I have created separate sql files for different tables. Now i want to create all the tables by creating another sql file which will contain the individual sql files.
for example
USE DealSoft
EXEC("c:\SQLAccountTypes.sql")
EXEC("c:\\SQLAccounts.sql")
EXEC("c:\\SQLParties.sql")
EXEC command doesn't work this way. can u suggest the proper syntax.
with regards
wilfi
You could use xp_cmdshell for execute any external program and you could run osql script.sql from command line.
As result you could run:
Code Snippet
xp_cmdshell 'osql C:\yourScript.sql'
or (only in SQL Server 2005)
Code Snippet
xp_cmdshell 'sqlcmd C:\youScript.sql'
May be you need to configure account for executing external apps. You could use sp_xp_cmdshell_proxy_account stored procedure
|||Wilfi,
If using SQL Server 2005, you might want to consider creating an SSIS package to perform such an action. With SQL Server 2000 that solution becomes "using a DTS package."
Another aspect of this matter would be to put your SQL scripts into stored procedures. You can have one stored procedure invoke multiple other stored procedures, similar to the BATCH action you have described. This plan works for any version of SQL Server, as far as I know.
Dan
|||Dear Dan,
I would like to invoke my individual Stored Procedures thru a Master S.P. as suggested by you.
Can u tell me the syntax for the same with a small example(of Master S.P.).
thanking U.
With Regards,
wilfi
|||
Code Snippet
--Create procedures
CREATE PROCEDURE mySp1
as
BEGIN
PRINT 'Call To MySP1'
END
go
CREATE PROCEDURE mySp2
as
BEGIN
PRINT 'Call to MySP2'
END
go
CREATE PROCEDURE myMasterSP
as
BEGIN
EXEC mySP1
EXEC mySP2
END
go
-- Execute Master SP, you could do it any time after creating
myMasterSP
|||Dear Sir,
Hearty Thanx for the immediate response. I could do as suggested by u.
with regards,
wilfi
|||Konstantin,
Thanks! You beat me to it! ;-)
Dan
|||Hey Konstantin, i was lookin for something related to inline store procs and saw your post..
do you know if those 2 last procs : mySP1 and mySP2 run async.
meaning, does the mySP2 proc waits for the mySP1 to be completed?.
It will be very helpful if you know!
anyways thanks in advance
Dave.
|||Dave,
Sorry for butting in. All my experiences are that they run sequentially, in the order listed in the SP.
I would have all kinds of wrong answers in my computations were that not so.
Dan
|||mySp1 and mySp2 run sync. Meaning the mySp2 wait for the mySp1 to be completed.
If you need async call, you could emulate this approach by using SQL Server Broker
Dear Sir,
My database have a no. of tables. I have created separate sql files for different tables. Now i want to create all the tables by creating another sql file which will contain the individual sql files.
for example
USE DealSoft
EXEC("c:\SQLAccountTypes.sql")
EXEC("c:\\SQLAccounts.sql")
EXEC("c:\\SQLParties.sql")
EXEC command doesn't work this way. can u suggest the proper syntax.
with regards
wilfi
You could use xp_cmdshell for execute any external program and you could run osql script.sql from command line.
As result you could run:
Code Snippet
xp_cmdshell 'osql C:\yourScript.sql'
or (only in SQL Server 2005)
Code Snippet
xp_cmdshell 'sqlcmd C:\youScript.sql'
May be you need to configure account for executing external apps. You could use sp_xp_cmdshell_proxy_account stored procedure
|||Wilfi,
If using SQL Server 2005, you might want to consider creating an SSIS package to perform such an action. With SQL Server 2000 that solution becomes "using a DTS package."
Another aspect of this matter would be to put your SQL scripts into stored procedures. You can have one stored procedure invoke multiple other stored procedures, similar to the BATCH action you have described. This plan works for any version of SQL Server, as far as I know.
Dan
|||Dear Dan,
I would like to invoke my individual Stored Procedures thru a Master S.P. as suggested by you.
Can u tell me the syntax for the same with a small example(of Master S.P.).
thanking U.
With Regards,
wilfi
|||
Code Snippet
--Create procedures
CREATE PROCEDURE mySp1
as
BEGIN
PRINT 'Call To MySP1'
END
go
CREATE PROCEDURE mySp2
as
BEGIN
PRINT 'Call to MySP2'
END
go
CREATE PROCEDURE myMasterSP
as
BEGIN
EXEC mySP1
EXEC mySP2
END
go
-- Execute Master SP, you could do it any time after creating
myMasterSP
|||Dear Sir,
Hearty Thanx for the immediate response. I could do as suggested by u.
with regards,
wilfi
|||Konstantin,
Thanks! You beat me to it! ;-)
Dan
|||Hey Konstantin, i was lookin for something related to inline store procs and saw your post..
do you know if those 2 last procs : mySP1 and mySP2 run async.
meaning, does the mySP2 proc waits for the mySP1 to be completed?.
It will be very helpful if you know!
anyways thanks in advance
Dave.
|||Dave,
Sorry for butting in. All my experiences are that they run sequentially, in the order listed in the SP.
I would have all kinds of wrong answers in my computations were that not so.
Dan
|||mySp1 and mySp2 run sync. Meaning the mySp2 wait for the mySp1 to be completed.
If you need async call, you could emulate this approach by using SQL Server Broker
I have a C# assembly I've created that I wish to run inside SQL Server. Since SQL Server doesn't support SMO inside of it, does anyone have any suggestions on how I might execute a SQL Server job in my assembly?
Thanks - Amos.
Using SMO in CLR:
http://sqlblogcasts.com/blogs/simons/archive/2007/03/14/Using-SMO-from-within-SQLCLR.aspx
Alternatively you can start the job using the sp_start_job procedure.
Jens K. Suessmeyer
http://www.sqlserver2005.de
Hi
I hv created a new Job for my SSIS Package... but when i start the job manually it gives me this error below:
"Executed as User:localhost/SYSTEM. THe package could not be loaded.the Step Failed".
i have my package deployed in Storage Packages[MSDB]...
Could you help me on this....
THanks!
Karthik
it's all to do with security:
Your localhost/SYSTEM account probably has no access to the SISS storage [MSDB].
Either you have modify the sql agent job to run as a user with sufficient rights on the SISS store or you grant this account access.
Then there is also the possibility that this user account has not access to the databases that are opened by the package.
Hi,
I am a newbie to SSIS. I am trying to execute a simple package that I created from my ASP.Net application.
I get the error 'DTSER_FAILURE'. Can anyone help?
Thanks
Turn on logging, or supply an implementation of IDtsEvents interface to Execute() method to find out some information about the error.By the way, the most common problem: security, the package is executed under ASP.NET service account, not your domain account.|||
Thanks for the reply.
I turned on the logging. However, no entires are made in the log file.
I thought that there would be some security issues,
> the package is executed under ASP.NET service account, not your domain account.
How do I address this?
|||HoustonRocket wrote:
> the package is executed under ASP.NET service account, not your domain account. How do I address this?
Depends on what you mean by "address". This might be quite OK in some situations, but might be not in others. Just something to be aware of.
If you want the package to be executed in different context, use other ways to execute it, rather than invoke it from object model. A common way is to create SQL Agent job and then execute it using Agent's stored procedures. Another way is to execute package using DtExec under different account (see ProcessStartInfo.UserName and ProcessStartInfo.Password).
|||Hi,
I tried to create a job and add the package as a 'step'. That didnt work either and I got the error
'Microsoft.SqlServer.ConnectionInfo
The specified '@.subsystem' is invalid
Here's what I am trying to do:
I created a package which grabs the data from excel file and populates sql server 2005 DB - simple. This package executes if I run it from the business intelligence studio.
I want to achieve two things
1) Create a job that will schedule the package to run twice a day
2) Execute this package from an asp.net code.
|||ok another question
I ran the dbo.sp_enum_sqlagent_subsystems and the result does not list SSIS package.
How can I include the SSIS package as a subsystem ?
|||Strange. Are you connected to SQL 2005 system? Have you installed SSIS (a checkbox during SQL install).Try connecting to SQL using SQL Server Management Studio, can you create new jobs that use SSIS subsystem?
I've created a SSIS package, in a sql 2005 instance, that uses an Execute SQL Task" to call a stored proc as its last step. When run from BIDS, the last step takes about 2 to 3 minutes, consistently. When I run the exact same query from Management Studio (either via exec <spname> or by copying the sp's t-sql code into a query window) it consistently takes about 1 minute. I've run sevral test and these number are quite reproducible.
Any ideas to account for the "slowness" of the Execute SQL Task?
TIA,
Barkingdog
Hi, are you running your package in debug mode?
Try run the package without Visual Studio.
John Bocachica - Colombia
www.iquos-bi.com
|||The dropdown box at the top of BIDs says "Development"
Here is what I have found. My package runs three control tasks. When I run all three, the Exec SQL tasks takes about 2 minutes to run but when I execute ONLY the Exec SQL task that task runs in about 1 minute!
I saved the package (in BIDS) to a .dtsx file and ran it. The whole process took about 2.5 miniutes which tells me that the Exec SQL task still took about 2 minutes.
barkingdog
|||
What are the other tasks doing? Do they use the same database connection? Are there transactions involved?
|||
The first task truncates a table called Contact. The second task imports a CSV file into a table (uses a SQL Server Destination. Does a straight copy of the data; no transformations. The file imported is on the sql 2005 server and database I'm importing into). The third task (Exec SQL Task) applies various UPDATE statements to the table populated in step 2. Steps 2 and 3 use the same sql connection.
II don't know how to tell if all the tasks belong to the same transaction. I set up three control flows in the same pane but they are not contained in any container object, if that helps at all.)
TIA,
Barkingdog
EXECUTE AS question,sql server