Package Fast In VS But Slow When Deployed To Server
Sep 20, 2007
I have a package which completes in 3 minutes when ran from Visual Studio but when deployed to SSIS (same machine) it rans for more than 2 hours. What could be the reason for this?
I'm trying to figure out how to determine why the same database is fast on my desktop but slow on a robust multiprocessor win2003 server.
I have a complex proc that takes about 27 seconds on my desktop sql server but takes almost 5 minutes on the server. The server processors are running at about 1% utilization while the proc is running.
Any ideas on how to troubleshoot this extremely poor performance?
I have a very unusual situation - we converted a client from DB2 7.2 to MS SQL Server 2000, SP3. There is one report that runs very quickly when ran on the Database Server, but it takes a long time to complete when it is ran from a client system. This query is ran from within the application and not from within Query Analyzer.
Has anyone else here ever encountered this issue? What did it turn out to be? I am leaning away from it being a network issue.
In an ASP, I have a dynamically created SQL statement that amounts to "SELECT * FROM Server1.myDB.dbo.myTable WHERE Col1 = 1" (Col1 is the table's primary key). It returns the data immediately when executed.
However, when the same record is updated with "UPDATE Server1.myDB.dbo.myTable SET Comments = 'blah blah blah' WHERE Col1 = 1", the page times out before the query can complete.
I watched the program in Profiler, and I saw on the update that sp_cursorfetch was being executed as an RPC once per each row in the table. In a table of 78000 records, the timeout occurs well before the last record is fetched, and the update bombs.
I can run the same statements in Query Analyzer from a linked server and have the same results. The execution plan shows that a Remote Query is occurring on the select that returns 1 row, and a Remote Scan is taking place on the update scanning 78000 rows (I guess this is where all the sp_cursorfetch calls are happening...?).
How can I prevent the Remote Scan? How can I prevent the execution of the RPC sp_cursorfetch for each row in the remote table?
I have an SSIS package that executes in about 1:20min from Visual Studio on my local machine. While executing, my machine is somewhat unresponsive.
When I deploy the package to the database server -- the very same database server that I am accessing from my local machine -- the package executes but eventually hangs. It appears to be running out of memory, and I usually have to kill the process to get the machine to respond. While it's hanging, the machine is unresponsive to all users. The hardware (including memory) is identical between my local development box and the server.
How should I troubleshoot this? I've tried deploying the package to MSDB, file system, running from dtexec, and running from dtexecui. This is very frustrating!
I have a very puzzling situation with a database. It's an Access 2000 mdbwith a SQL 7 back end, with forms bound using ODBC linked tables. At ourremote location (accessed via a T1 line) the time it took to go to a recordwas very slow. The go to mechanism was a box that the user typed the indexvalue into a combo box, with very simple code attached:with me.RecordsetClone.FindFirst "[Index] = " & me.cboGoToIf Not .NoMatch ThenMe.Bookmark = .BookmarkEnd Ifend withNow, one would say that going to a record is slow because I'm using..FindFirst over a T1 line. And that's what I thought. However, as I wasworking with the form, commenting out various sections not related to the GoTo, I found that the Go To functionality changed, though I didn't modify thecode.Previously, going to a record near the end of the 50,000 record recordsettook about 1-2 seconds, but going to a record near the beginning, took about20 seconds. After the form changed, going to any record in the recordsettook about 1-2 seconds.So the question remains: why did it take so long to go to a record near thebeginning of the recordset, but not near the end (and the ones in the middletook an amount of time about halfway between the two), and what changed sothat now the form is working fine for all records?I've compared the changed form with the previous copy, and I don't see anydifferences. I've compared all code in the form module, and I've comparedall form properties. The forms are identical as far as I could tell. Butsomething happened as I was commenting/uncommenting code in the form thatgot rid of the problem with it taking a long time to go to some of therecords.My first thought was that something got recompiled, and now the form isfast. So I went back to the original version and changed some code andrecompiled, also did a compact and repair. But it was still slow. I alsotried doing an explicit decompile and then recompiled it. But it was stillslow.So this is very frustrating that the form is now working fine, but I can'tsee anything that's changed. If I don't see why the form is now fast, thenthere's no reason to believe that it might not at some point go back tobeing slow again. And then I'd just have to hope that something changes. Itwould be good to figure this out.Any ideas as to what might have changed here to cause the form's Go To to befast would be appreciated.Thanks,Neil
I have created an integration services package with a script-source reading data from Active directory. Pretty much data is read and written into a sql2005 database.
I have notised that when I run the package via right-clicking the package (Under stored packagesMSDB) and selecting "Run Package" it takes about 45 minutes for it to complete successfully. The same goes if I run the package from inside Visual Studio. However, when I create a job and put this package as one of it's tasks the task takes about 1h 40min. This is more then double the time! In neither case the server is occupied with soething else. And I have tried it several times so it wasn't just an "accident".
I have a package that contains an Execute Package Task... it works fine when on my local machine and on our test-server. After deploying the SSIS solution to our customers server, I open the project in Visual Studio and run the mainPackage in debug mode and the Task fails when trying to execute the package.. if I remove everything in the childpackage it still fails... the path to the package is correct and I know that I have rigths to execut it. I do not use any package security/encryption.. If i create a new package in the project and create a new fileconnection to it the Execute Package Task executes correctly, with the exact same content as the original package...
So my guess is that something in the FileConnetion object is set wrong, but i cannot understand what it is. The errormessage i get is something like this. "Execute Package Failed. Could not execute package".
Anyone had the same problem as I? I´m grateful for any help!
Hi! we've got a curious problem. we've two identicall databases, same tables, same date, same indexes, same server, both replicated. One of them is our life database and the other is our development database. If I execute the following query at the development database the query takes less then one second. If I execute the same query at the live database the query takes about 4 seconds to complete. This is very unsatisfactory!! What I've noticed is, if I try to analyze the query in the tuning advisor on the developement database it completes without tuning tips. If I do the same on the live database I get the following error: TITLE: DTAEngine
Hi, I have a query that takes 15minutes to run the first time after sql server start but then for subsequent querys is superfast (less than 10 secs). Why? What could I do to speed up the first run? Here is the source:
Code Block SELECT Articoli.Articolo, Articoli.BarCodeVen, Articoli.Descri, Articoli.Merce, Articoli.CodIVA, Articoli.UMBase, Articoli.PrzBase, Articoli.Sconto1, Articoli.Sconto2, Articoli.ScontoFormula, Articoli.Ricarico, Articoli.TipoArt, Articoli.CatMerc, Articoli.CatOmo, Articoli.CatProvv, Articoli.CntrprtVen, Articoli.CntrprtAcq, Articoli.Dispniblta, Articoli.Vendita, Articoli.SiCli, Articoli.SiFor, Articoli.NotaPriv, Articoli.NotaPubb, Articoli.Immagine, Articoli.Produttore, Articoli.SiMatr, Articoli.OldCodArt, Articoli.Disattivo, Articoli.CatProd, Articoli.SotCatProd, Articoli.EsplKit, Articoli.ScaricoCom, Articoli.ImmagLun, Articoli.DataModCS, Articoli.ValorizPr, Articoli.Natura, Articoli.UMSecScelta, Articoli.SecScelta, Articoli.Acquisto, Articoli.CntConsumi, Articoli.NonMovimentabile, Articoli.ProvAgente, Articoli.Taglia, Articoli.Colore, Articoli.CodArtNeutro, Articoli.Collezione, Articoli.Assortimento, Articoli.Centro, Articoli.InibisciRicercaUnMis, Articoli.Commessa, Articoli.DescriTesto, Articoli.Disattivabile, Articoli.KwTipoArt, Articoli.KwTipoArtNeutro, Articoli.KwNeutro, Articoli.KwCollezione, Articoli.KwLinea, Articoli.KwModello, Articoli.KwMateriale, Articoli.KwComposizione, Articoli.KwPosRiga, Articoli.KwVarRiga, Articoli.KwPosColonna, Articoli.KwVarColonna, Articoli.KwPos3D, Articoli.KwVar3D, Articoli.KwGrpVarRiga, Articoli.KwGrpVarColonna, Articoli.KwGrpVar3D, Articoli.KwEtiMan, Articoli.KwAssortimento, Articoli.KwGrpFormule, Articoli.KwSpecimen, KwVarArticolo.TipoVariante, KwVarArticolo.Variante, KwVarArticolo.Posizione, KwVarArticolo.Categoria, KwVarArticolo.DescriVariante, KwVarArticolo.P07009Descrizione1 AS Descrizione1, KwVarArticolo.P07009Descrizione2 AS Descrizione2, CatOmo.Descri AS CatOmoDescri, KwModelli.Descri AS DescriModello, KwMateriali.Descri AS DescriMateriale, MFDBCompon_Tomaia2.DatoTecnico, MFDBCompon_Tomaia2.DBPosColonna, MFDBCompon_Tomaia2.DBPos3D, MFDBCompon_Tomaia2.CompNeutro, MFDBCompon_Tomaia2.CompVarRiga, Articoli_1.Descri AS DescriCompNeutro, MFKwVariantiRiga.DescriVariante AS DescriRigaCompo, CatProvv.Descri AS CatProvvDescri, MFDBCompon_Tomaia3.CompNeutro AS CompNeutroT3, MFDBCompon_Tomaia3.CompVarRiga AS CompVarrigaT3, Articoli_2.Descri AS DescriCompNeutroT3, MFKwVariantiRiga_1.DescriVariante AS DescriRigaCompoT3, MFDBCompon_Acc1.CompNeutro AS CompNeutroAcc1, MFDBCompon_Acc1.CompVarRiga AS CompVarRigaAcc1, Articoli_3.Descri AS DescriCompNeutroAcc1, MFKwVariantiRiga_2.DescriVariante AS DescriRigaCompoAcc1, MFDBCompon_Acc2.CompNeutro AS CompNeutroAcc2, MFDBCompon_Acc2.CompVarRiga AS CompVarRigaAcc2, Articoli_4.Descri AS DescriCompNeutroAcc2, MFKwVariantiRiga_3.DescriVariante AS DescriRigaCompoAcc2, MFDBCompon_SottoP_Tallonet.CompNeutro AS CompNeutroSottop, MFDBCompon_SottoP_Tallonet.CompVarRiga AS CompVarRigaSottop, MFDBCompon_SottoP_Tallonet.DescriCompNeutroSottop, MFDBCompon_SottoP_Tallonet.DescriRigaCompoSottop, MFDBCompon_SottoP_Tallonet.DatoTecnico AS DatoTecnicoSottop, MFDBCompon_RicSol.CompNeutro AS CompNeutroRicSol, MFDBCompon_RicSol.CompVarRiga AS CompVarRigaRicSol, MFDBCompon_RicSol.DescriCompNeutroRicSol, MFDBCompon_RicSol.DescriRigaCompoRicSol, MFDBCompon_Fodera.CompNeutro AS CompNeutroFodera, MFDBCompon_Fodera.CompVarRiga AS CompVarRigaFodera, MFDBCompon_Fodera.DescriCompNeutroFodera, MFDBCompon_Fodera.DescriRigaCompoFodera, MFDBCompon_Forma.Descri AS DescriForma, MFDBCompon_Tacco.Descri AS DescriTacco, MFVar3D_Pos1.DescriVariante AS Descri_Pos1, MFVar3D_Pos2.DescriVariante AS Descri_Pos2, MFVar3D_Pos3.DescriVariante AS Descri_Pos3, MFVar3D_Pos4.DescriVariante AS Descri_Pos4, MFListinoP00New.Prz AS P00, MFListinoP00New.InVigoreDa AS DataP00, MFListinoP05New.Prz AS P05, MFListinoP05New.InVigoreDa AS DataP05, MFListinoPUSANew.Prz AS PUSA, MFListinoPUSANew.InVigoreDa AS DataPUSA, CASE WHEN KwVarArticolo.P07009Descrizione2 <> '' THEN KwVarArticolo.P07009Descrizione2 ELSE CASE WHEN Articoli.CatProvv = '30SPORT' THEN Articoli.KwNeutro + KwVarArticolo.Variante + '.jpg' ELSE Articoli.KwNeutro + '.jpg' END END AS MFFoto, MFListinoRUSANew.Prz AS RUSA, MFListinoRUSANew.InVigoreDa AS DataRUSA, MFListinoRITANew.Prz AS RITA, MFListinoRITANew.InVigoreDa AS DataRITA, ArtMerce.Fornitore FROM Articoli INNER JOIN KwVarArticolo ON Articoli.Articolo = KwVarArticolo.Articolo INNER JOIN CatOmo ON Articoli.CatOmo = CatOmo.Categoria INNER JOIN KwMateriali ON Articoli.KwModello = KwMateriali.KwModello AND Articoli.KwMateriale = KwMateriali.KwMateriale INNER JOIN KwModelli ON Articoli.KwModello = KwModelli.KwModello AND Articoli.KwMateriale = KwModelli.KwMateriale LEFT OUTER JOIN ArtMerce ON Articoli.Articolo = ArtMerce.Articolo LEFT OUTER JOIN MFListinoRUSANew ON KwVarArticolo.Variante = MFListinoRUSANew.VarRiga AND Articoli.KwNeutro = MFListinoRUSANew.Neutro LEFT OUTER JOIN MFListinoRITANew ON KwVarArticolo.Variante = MFListinoRITANew.VarRiga AND Articoli.KwNeutro = MFListinoRITANew.Neutro LEFT OUTER JOIN MFListinoPUSANew ON KwVarArticolo.Variante = MFListinoPUSANew.VarRiga AND Articoli.KwNeutro = MFListinoPUSANew.Neutro LEFT OUTER JOIN MFListinoP05New ON KwVarArticolo.Variante = MFListinoP05New.VarRiga AND Articoli.KwNeutro = MFListinoP05New.Neutro LEFT OUTER JOIN MFListinoP00New ON Articoli.KwNeutro = MFListinoP00New.Neutro AND KwVarArticolo.Variante = MFListinoP00New.VarRiga LEFT OUTER JOIN MFVar3D_Pos4 ON Articoli.KwNeutro = MFVar3D_Pos4.Articolo LEFT OUTER JOIN MFVar3D_Pos3 ON Articoli.KwNeutro = MFVar3D_Pos3.Articolo LEFT OUTER JOIN MFVar3D_Pos2 ON Articoli.KwNeutro = MFVar3D_Pos2.Articolo LEFT OUTER JOIN MFVar3D_Pos1 ON Articoli.KwNeutro = MFVar3D_Pos1.Articolo LEFT OUTER JOIN MFDBCompon_Forma ON KwVarArticolo.Variante = MFDBCompon_Forma.DBVarRiga AND Articoli.Articolo = MFDBCompon_Forma.DBNeutro LEFT OUTER JOIN MFDBCompon_Tacco ON KwVarArticolo.Variante = MFDBCompon_Tacco.DBVarRiga AND Articoli.Articolo = MFDBCompon_Tacco.DBNeutro LEFT OUTER JOIN MFDBCompon_Fodera ON KwVarArticolo.Variante = MFDBCompon_Fodera.DBVarRiga AND Articoli.KwNeutro = MFDBCompon_Fodera.DBNeutro LEFT OUTER JOIN MFDBCompon_RicSol ON KwVarArticolo.Variante = MFDBCompon_RicSol.DBVarRiga AND Articoli.KwNeutro = MFDBCompon_RicSol.DBNeutro LEFT OUTER JOIN MFDBCompon_SottoP_Tallonet ON KwVarArticolo.Variante = MFDBCompon_SottoP_Tallonet.DBVarRiga AND Articoli.KwNeutro = MFDBCompon_SottoP_Tallonet.DBNeutro LEFT OUTER JOIN MFDBCompon_Acc2 INNER JOIN Articoli AS Articoli_4 ON MFDBCompon_Acc2.CompNeutro = Articoli_4.Articolo INNER JOIN MFKwVariantiRiga AS MFKwVariantiRiga_3 ON MFDBCompon_Acc2.CompVarRiga = MFKwVariantiRiga_3.Variante ON KwVarArticolo.Variante = MFDBCompon_Acc2.DBVarRiga AND Articoli.KwNeutro = MFDBCompon_Acc2.DBNeutro LEFT OUTER JOIN MFDBCompon_Acc1 INNER JOIN Articoli AS Articoli_3 ON MFDBCompon_Acc1.CompNeutro = Articoli_3.Articolo INNER JOIN MFKwVariantiRiga AS MFKwVariantiRiga_2 ON MFDBCompon_Acc1.CompVarRiga = MFKwVariantiRiga_2.Variante ON KwVarArticolo.Variante = MFDBCompon_Acc1.DBVarRiga AND Articoli.KwNeutro = MFDBCompon_Acc1.DBNeutro LEFT OUTER JOIN MFDBCompon_Tomaia3 INNER JOIN Articoli AS Articoli_2 ON MFDBCompon_Tomaia3.CompNeutro = Articoli_2.Articolo INNER JOIN MFKwVariantiRiga AS MFKwVariantiRiga_1 ON MFDBCompon_Tomaia3.CompVarRiga = MFKwVariantiRiga_1.Variante ON KwVarArticolo.Variante = MFDBCompon_Tomaia3.DBVarRiga AND Articoli.KwNeutro = MFDBCompon_Tomaia3.DBNeutro LEFT OUTER JOIN CatProvv ON Articoli.CatProvv = CatProvv.Categoria LEFT OUTER JOIN Articoli AS Articoli_1 INNER JOIN MFDBCompon_Tomaia2 ON Articoli_1.Articolo = MFDBCompon_Tomaia2.CompNeutro INNER JOIN MFKwVariantiRiga ON MFDBCompon_Tomaia2.CompVarRiga = MFKwVariantiRiga.Variante ON KwVarArticolo.Variante = MFDBCompon_Tomaia2.DBVarRiga AND Articoli.KwNeutro = MFDBCompon_Tomaia2.DBNeutro WHERE (Articoli.KwCollezione = @KwCollezione) AND (Articoli.KwLinea = @KwLinea) AND (KwVarArticolo.TipoVariante = 52559872) AND (Articoli.CatProvv IN (@CatProvv)) AND (Articoli.Disattivo = '0') AND (KwVarArticolo.Disattivo = '0') AND (ArtMerce.Fornitore IN (@Fornitore)) OR (Articoli.KwCollezione = @KwCollezione) AND (Articoli.KwLinea = @KwLinea) AND (KwVarArticolo.TipoVariante = 52559872) AND (Articoli.CatProvv IN (@CatProvv)) AND (Articoli.Disattivo = '0') AND (KwVarArticolo.Disattivo = '0') AND ('ALL' IN (@Fornitore)) OR (Articoli.KwCollezione = @KwCollezione) AND (Articoli.KwLinea = @KwLinea) AND (KwVarArticolo.TipoVariante = 52559872) AND (Articoli.Disattivo = '0') AND (KwVarArticolo.Disattivo = '0') AND (ArtMerce.Fornitore IN (@Fornitore)) AND ('ALL' IN (@CatProvv)) OR (Articoli.KwCollezione = @KwCollezione) AND (Articoli.KwLinea = @KwLinea) AND (KwVarArticolo.TipoVariante = 52559872) AND (Articoli.Disattivo = '0') AND (KwVarArticolo.Disattivo = '0') AND ('ALL' IN (@CatProvv)) AND ('ALL' IN (@Fornitore)) ORDER BY Articoli.CatProvv, Articoli.CatOmo, Articoli.Articolo, KwVarArticolo.Posizione
We have a static class that makes an HTTPWebRequest to get XML data from one of our vendors. We use this as input to a stored proc in SQLServer2005. When I compile this class and call it from a console application in visual studio it executes in milliseconds, everytime. When I compile it, create the assembly and clr function and execute it in SQLServer, it takes around 14 seconds to execute the first time, then on subsequent requests it is again really fast, until I wait for 10 seconds and re-execute, once again it is slow the first time and then fast on subsequent requests. We do not see this behavior when executing outside SQLServer. Makes me think that some sort of authentication is perhaps taking place the first time the function is run in SQLServer? I have no idea how to debug this further. Anyone seen this before or have any ideas?
Here is the class:
Code Snippet
using System; using System.Collections.Generic; using System.Text; using System.Net; using System.IO;
namespace Predict.Services { public static class Foo { public static string GetIntradayQuote(string symbol) { string returnQuote = "";
HttpWebRequest request = (HttpWebRequest)(WebRequest.Create("http://data.predict.com/predictws/detailed_quote.html?syms=" + symbol + "&fields=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,28,30"));
StreamReader streamReader = new StreamReader(response.GetResponseStream());
returnQuote = streamReader.ReadToEnd();
streamReader.Close(); response.Close();
return returnQuote; } } }
When I run call it from a console app it is fine.
I compile it into a dll and then create the assembly and function as follows:
Code Snippet
drop function fnTestGetIntradayQuoteXML_SJS
go
drop assembly TestGetIntradayQuoteXML_SJS
go
create ASSEMBLY TestGetIntradayQuoteXML_SJS from 'c:DataBackupsCLRLibrariesTestGetIntradayQuote_SJS.dll' WITH PERMISSION_SET = EXTERNAL_ACCESS
go
CREATE FUNCTION fnTestGetIntradayQuoteXML_SJS(@SymbolList nvarchar(max)) RETURNS nvarchar(max) AS EXTERNAL NAME TestGetIntradayQuoteXML_SJS.[Predict.Services.Foo].GetIntraDayQuote
go
declare @testing nvarchar(max)
set @testing = dbo.fnTestGetIntradayQuoteXML_SJS('goog')
print @testing
When I execute the function as above, again, really slow the first time, then fast on subsequent calls. Could there be something wrong with the code, or some headers that need to be set differently to operate from the CLR in SQLServer?
I have been handed a datawarehouse environment to look at however I cannot find the ssis packages (.dtsx).
I see that the packages have been deployed to SSISDB but I can't find the files to load into Datatools.
Once the files have been deployed is it possible to remove the package files? Is there a way of retro'ing the deployed packages out of SQL so I can view them in Datatools?
This has only started happening in the last two days
When we invoke our SSIS package from a web service it used to work fine but now gives the following error. the DLL name changes all the time. Any help would be appreciated
Code SnippetSystem.IO.FileNotFoundException: Could not find file 'C:WINDOWSTEMPvrjeaanf.dll'. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch(CompilerParameters options, String[] fileNames) at Microsoft.CSharp.CSharpCodeGenerator.FromSourceBatch(CompilerParameters options, String[] sources) at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSourceBatch(CompilerParameters options, String[] sources) at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromSource(CompilerParameters options, String[] sources) at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence) at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies) at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence) at System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings, Evidence evidence) at System.Web.Services.Protocols.XmlReturn.GetInitializers(LogicalMethodInfo[] methodInfos) at System.Web.Services.Protocols.XmlReturnWriter.GetInitializers(LogicalMethodInfo[] methodInfos) at System.Web.Services.Protocols.MimeFormatter.GetInitializers(Type type, LogicalMethodInfo[] methodInfos) at System.Web.Services.Protocols.HttpServerType..ctor(Type type) at System.Web.Services.Protocols.HttpServerProtocol.Initialize() at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)
I need your help to call an SSIS package using ASP.NET. I have deployed the package using SQL server deployment with an windows authentication. I need to call that package from a remote machine. Also i need to assign a value for a variable in that package while calling it from ASP.NET. Plz let me know the steps to call that package from ASP.NET
I have a very complex Stored Procedure called by a Job that is Scheduled to run every night. It's execution takes sometimes 1 or 2 hours and sometimes 7 hours or more.
So, if it is running for more than 4 hours I stop the Job and I run the procedure from a Query Window and it never takes more than 2 hours.
Can anyone help me identify the problem ? I want to run from the Job and not to worry about it.
Some more information: - It is SQL 2000 Enterprise with SP4 in a Cluster (It happens the same way in any node). - The SQL Server and SQL Agent services run using a Domain Account that have full Administrative access. - When I connect to a Query Window I also use a Windows Account.
- There is no locks or process bloking or being blocked while the job is running. - Using the Task Manager the processor activity is ok, no more than 30 % in any processor.
I am able to run a query which runs FAst in QA but slow in theapplication.It takes about 16 m in QA but 1000 ms on theApplication.What I wanted to know is why would the query take a longtime in the application when it runs fast on SQL server?How should we try debugging it?Ajay
We have noticed in our environment slowness when starting SSIS packages from SQL Server jobs. I did a quite detailed study on when the slowness actually occurs and what are the consequences. Here are the results.
The SSIS package execution is slow if all the following is true:
The package is started from a job. If started directly as a SSIS package, the execution is fast. The job is running on a 64 bit Windows Server (SQL Server 2005 SP2). The SSIS package and the job are either on the same server or on different servers (the second server is SQL Server 2005 SP1). If the job is run on a 32-bit workstation (Windows XP SP2) the execution is fast (the SSIS package still being on the server). The package contains tasks. § If there are no tasks, just an empty sequence container, the execution is fast. § If a package that has no tasks has logging into the database configured, the execution is fast. § Slowness has been verified with A) a package having a single Execute SQL statement and B) a package having a Send Mail task.
It doesn't seem to matter which user account is used on when running the job.
The slowness happens in several locations, e.g. (there are also others, at least the following have been verified)
There is exactly 30 seconds lag between starting the job (as seen from job history) and when PreValidate (as seen in the sysdtslog90 table) of the package appears in the log. The validation of the package takes 15 seconds (the time difference in the log betwen PreValidate and PackageStart) The problem is really affecting our production environment. Currently the only solution we have come up is to put all the jobs on a workstation and use the workstation as a production server for the jobs.
I haven't heard anyone else having the same problem.
I am using SSIS packages for data transfer, When i run the package on virtual server it takes more time as when run on a PC. After analysing i found that Package when run on Virtual server takes time in startup around (50 sec) or so.Could anyone help me with a little bit of detail description as to why it runs slow.
I have a package with a custom log provider, which runs in BIDS. However when I deploy the package onto SQL Server and run it on the deployed machine, if fails:
"failed to decrypt protected XML node DTS:Password...key not valid for use in specified state..."
Now this is definately to do with the custom log, as if I take it out & redeploy, I can run it on the deplyed server + also run it within a job. I have entered the custom log provider library (+ other required DLLs) in the GAC on the deployed machine, but I'm clearly missing something.
(Using win2k, sqlserver2k, framework 1.1) I have an fairly data-heavy application that uses Windows authentication (Trusted connection/aspnet account) to connect to Sql Server. The site uses IIS basic authentication.
On the dev server everything works fine but when I move to the live server things get strange and it starts to crawl along. (Pages load OK but then it just crawls as it loads the datagrids etc. Sometimes it brings back incomplete/incorrect data )
BUT When I use Sql Authentication to connect to Sql Server and there is no problem at all!
Ok, there is something obviously wrong with the live server (which is identical setup to dev)but I dont know where to start.
I am trying to create and later read a data file from a package deployed in SSISDB, but it is not reading it while it is successfully creating the file. The same package when run from the file system package, runs successfully. Generating ispac and deploying in SSISDB is running for infinite time. Is it a permission issue?
SSIS packages running slow on startup in 64 bit prod env. looks like it is taking lot of time (around 2mins) to validate the package. Delayvalidation is false (default); changing it to true didn't help. Any fix for it?
Executing packages using dtexec commad.
We have job packages which loads 10s of child packages in sequence using package execution task... taking hours to complete. Same are working fine 64 bit dev env.
We have been working with SSIS for a while and we have not found a solution or a reason for this. We have a master package that calls 10 packages in sequential order. (as shown below). If we execute each one of the package separately the run in less than 2 minutes, but when we call them through the master package the execution time start increasing as follows: Child 1 (2 min), Child 2 (3 min),, Child 3 (4 min), Child 4 (6 min), Child 1 (7 min), and so on. The execute package task has the ExecutionOutOfProcess = false (when we set it equal to True even takes longer to execute, it was creating a dtsHost.exe process for each child and always remain in memory after the package finished executing). Can someone please provide a solution or a workaround for this? Any help would be appreciated. Any help will be appreciated.
I have a package that reads the contents of 11 Excel files into various tables. Opening this package in the designer, or with DTExecUI is extremely slow. In both cases when I open the package is takes over 10 minutes to do anything. Visual Studio gives the "Visual Studio is Busy" message for 10 minutes and DTExecUI just hangs. DTExecUI actually hangs twice, once when opening the package and a second time when clicking "Execute" (totalling over 20 minutes). It seems like no matter how I try to run the package it will always hang for 10 minutes before running with no status message or anything. Once it runs it completes quickly with no errors.
The various tasks in the package are fairly simple, most being Source > Data Conversion > Destination.
I have a parent package which executes 14 child packages in parallel, which on average take ~10 seconds each to complete when I execute the parent packege using BIDS or DTEXEC.
However, if I run the parent package using SQL Management Studio (Integration Services > Stored Packages > MSDB > Right Click > Run Package) each package takes in excess of 10 minutes to run, getting progressively slower as each package starts.
Surely the package is executing in exactly the same way as BIDS/DTEXEC, just a differenct UI?
2 SQL Execute Task, One Loop container, 2 Data Flow tasks, 1 Foreach loop container, 1 ftp task. The data flow tasks has 1 oledb source, 1 flat file source, 1 row count transformation, 1 recordset destination and 1 oledb destination.
When I load the package into BIDS it takes 125 MB of memory and then everything is slow, the properties panel slides in slowly and exists slowly. The object is the packages are not painted properly. to make changes and run takes lot of time.
Am I doing anything wrong here? Why is it consuming so much of memory?
How can we control the accesses to a SQL Server that has been deployed on customer site? Basically, we do not want user to log in the database server, even as sa, except through our application.
I have a report deployed on reporting serice. I am using reporting web service. How can we call the report, assign parameters and execute it on a webpage
I am migrating from local to Dev,QA and Prod. I created a .dtsconfig file containing database connection strings to Dev database. What is the "location" on the Dev server where this .dtsconfig file nees to be deployed to??
I have written some SQL 05 CLR code that produces a single DLL file. I have specified that the code is 'Safe' e.g. it will not be carrying out any external assembly access or other file accesss.
The code simply contains some stored procedures that will update/instert etc data from the database.
The question is, how do I actually deploy the code to a a remote server? Do i simply take the DLL and use CREATE ASSEMBLY code to set it up?
Furthermore, are there any security issues i need to consider when i deploy the assembly given that I have already set up the security to be 'Safe' ? e.g. is there anyway that a database can be locked down so that CLR code would not run irrespective of the safe setting.
As far as I understand it, SQL CLR code is ran under the SQL Server service account, so does this mean that if this user is locked down the code would not run?
Any clarifications or extra info would be greatly appreciated.
Thanks for sharing your experiences here. In some cases, I've saved quite a bit of time. Unfortunately, I haven't found a solution for my current issue.
I'm using VS.NET 2005 and SQL Server 2005. My development computer is running Windows XP SP2. SQL Server 2005 database and reporting services are running on Windows 2003 Server.
My business requirement is to develop and deploy a report which takes rich text (RTF) stored in the database (datatype = TEXT) and converts it to an image at runtime using a custom assembly (source can be found here http://blogs.digineer.com/blogs/jasons/archive/2006/10/03/520.aspx). I am able to generate and view the dynamic image containing the RTF on my local (i.e., developer) computer both using the ReportManager web interface and using the Render method. When I deploy this to our test server, I end up with a broken link image.
To recap, I have taken the following steps.
Created custom assembly using VS.NET 2005 which converts RTF to bitmap image. Custom assembly has a strong name.
On local developer machine
Copied custom assembly to C:Program FilesMicrosoft Visual Studio 8Common7IDEPrivateAssemblies.
Modified C:Program FilesMicrosoft Visual Studio 8Common7IDEPrivateAssembliesRSReportDesigner.config to include a CodeGroup which grants FullTrust to custom assembly based on StrongNameMembership (NOTE: ReadMe.txt doesn't mention adding an entry to this file).
Modified C:Program FilesMicrosoft Visual Studio 8Common7IDEPrivateAssembliesRSPreviewPolicy.config to include a CodeGroup which grants FullTrust to custom assembly based on StrongNameMembership (NOTE: ReadMe.txt doesn't mention adding an entry to this file).
Modified report using VS.NET 2005 as follows
Added reference to custom assembly and System.Drawing.
Added image control with type=Database, MimeType=image/bmp, Value = call to custom assembly method; method is passed value of database field which contains RTF.
Deployed report.
Viewed report successfully both via HTML and via Render method of WebService using EXCEL as output format. HTML for image <IMG SRC="/Reports/Reserved.ReportViewerWebControl.axd?ReportSession=ohj0pjaplbl5h255phlplz45&ControlID=883e299f22ca4413b398a024cec134b2&Culture=2055&UICulture=7&ReportStack=1&OpType=ReportImage&StreamID=ed4b4d3b-d54d-4043-9fea-1c06f153f9a1"/>
On local developer machine and server
Copied custom assembly to C:Program FilesMicrosoft SQL ServerMSSQL.3Reporting ServicesReportServerin
Modified C:Program FilesMicrosoft SQL ServerMSSQL.3Reporting ServicesReportServer ssrvpolicy.config to include a CodeGroup which grants FullTrust to custom assembly based on StrongNameMembership (NOTE: source code indicates permissions should be granted based on UrlMembership).
Deployed report.
Viewed report unsuccessfully both via HTML and via Render method of WebService using EXCEL as output format. HTML for image <IMG SRC="" /> Initially, I got error messages when exporting to Excel along the lines of ,"data is missing" but these appear to have been resolved by granting permissions in .config files which we not mentioned in ReadMe.txt. I've have run out of things to try and am at my wits end. I am convinced the solution has something to do with permissions since this works on my computer but not on the server.
Thanks in advance for any thoughts or suggestions.