Different Results When Executing From .NET Component Compare To Executing From SQL Management Studio

Oct 10, 2006

Hi all,
I am facing an unusual issue here. I have a stored procedure, that return different set of result when I execute it from .NET component compare to when I execute it from SQL Management Studio. But as soon as I recompile the stored procedure, both will return the same results.
This started to really annoying me, any thoughts or solution?
Thanks very much guys

View 2 Replies


ADVERTISEMENT

Stored Procedure Executing Durations Are Different Between Executing From Application(web) And SQl Server Management Studio - Qu

Jan 24, 2008



Hi,

I have a web application using Stored Procedure (SP). I see that there's a SP taking long time to execute. I try to capture it by Profiler Tool, and find out that with the same SP on the same db with the same parameter. The duration of executing by my web app is far bigger than the duration of executing on SQl server management studio - query window

Please see the image through this url http://kyxao.net/127/ExecutionProblem.png


Any ideas for this issue?

Thanks a lot

View 1 Replies View Related

Stored Procedure Executing Durations Are Different Between Executing From Application(web) And SQl Server Management Studio - Query Window

Jan 23, 2008

Hi,I have a web application using Stored Procedure (SP). I see that there's a SP taking long time to execute. I try to capture it by Profiler Tool, and find out that with the same SP on the same db with the same parameter. The duration of executing by my web app is far bigger than the duration of executing on SQl server management studio - query windowPlease see the image attached http://kyxao.net/127/ExecutionProblem.png Any ideas for this issue?Thanks a lot Jalijack 

View 2 Replies View Related

What User Is Used When Executing An SSIS Package From Management Studio?

May 23, 2008



All:

I am working with a package that executes a stored procedure. This stored procedure makes use of a Linked Server. When I execute it in debug mode in VS 2005, it works flawlessly. However when I deploy it to the production server and execute it by going to Management Studio, connecting to Integration Services, navigating to MSDB, right clicking and choosing "run package" I get the infamous:

Login failed for user '(null)'. Not associated with a trusted SQL Server Connection. OLE DB Provider SQLNCLI for linked server [name] returned message "Communication Link Failer"

error. If I execute the stored procedure by itself on the production server, it works flawlessly. It is only when this stored procedure gets executed via the above mentioned way inside of an SSIS pack that I get this error. To me this suggest it is being executed as a different user, but I don't know which one.

Any help would be wonderful.

Thank you in advance...

AccDev

View 2 Replies View Related

Management Studio Express && SQLcmd: Syntax Errors In Executing A MS-DOS Batch File && A Microsoft SQL Server Query File?

Nov 2, 2007

Hi all,
I have the "Northwind" database in my Sql Server Management Studio Express.

In my C:ProSSEAppsSamplesForChapter02Chapter02 folder, I have the following 2 files:
(1) ListColumnValues (MS-DOS Batch File)
sqlcmd -S .sqlexpress -v DBName = "Northwind" CName = "CompanyName" TName =
"Shippers" -i c:prosseappschapter02ListListColumnVales.sql -o
c:prosseappschapter02ColumnValuesOut.rpt
(2) ListColumnValues (Microsoft SQL Server Query File)
USE $(Northwind)
GO
SELECT $(CompanyName) FROM $(Shippers)
GO
When I ran the following SQLcmd:
C:ProSSEAppsSamplesForChapter02Chapter02>ListColumnValues.bat
I got the following "ColumnValuesOut.rpt" with error messages:

'Northwind' scripting variable not defined.
Msg 102, Level 15, State 1, Server L1P2P3SQLEXPRESS, Line 1
Incorrect syntax near '$'.
'CompanyName' scripting variable not defined.
'Shippers' scripting variable not defined.
Msg 102, Level 15, State 1, Server L1P2P3SQLEXPRESS, Line 1
Incorrect syntax near 'CompanyName'.

I copied these T-SQL statements from a book and I do not know how to correct them.
Please help and tell me how to correct these errors.

Thanks in advance,
Scott Chang




View 3 Replies View Related

Executing A Command From Within SSIS Script COmponent

Jan 3, 2008

I'm trying to use an SSIS script component that will go do a DNS lookup on the contents of an input column. I've already got a vbs function that performs the wshshell.exec and parses the answer for address and/or errors. I'm having trouble with syntax for the call. When I attempt to run it, I get a lot of errors like "Name 'wshell' is not declared", "StdErr" is not a member of 'String'"

Does anyone have an example of a script that calls a command?

I'm fairly new to SSIS, but think I've properly set up the inputs and outputs.

View 9 Replies View Related

The Product Level Is Insufficient For Component When Executing Package Using C# Code.

Jan 30, 2007

Hi,

I have created a Integration Services package that takes a table in a database, and transfers it to a flat file. This package has successfully run through visual studio 2005 as a .dtsx package, and given the output that I expected.

However, now, I am trying to excecute the package (as xml) using C#, and I am receving this error:

Error in Microsoft.SqlServer.Dts.Runtime.TaskHost/DTS.Pipeline : The product level is insufficient for component "Flat File Destination" (31).

I do not understand how a working package would have this kind of error.

Considering that it runs when I do not use C# code to execute the package means that I have SSIS properly installed, and I have the proper versions (or it should not execute ever). I have SP1 for both SQL Server 2005, and Visual Studio 2005 installed.



Other packages that I have created using C# code also have the same problem.



Any assistance would be greatly appreciated.

View 5 Replies View Related

Executing A Script And Returning The Results..

Mar 1, 2004

You know how osql can return the results of executing a .sql script to a window? Is there any way to achieve that same behavior in .NET? I am in the process of working on an application that needs to execute a .SQL script (which is easy to do) and then return the actual SQL output from the execution to a window. How do I get that output? None of the sql data objects seem to support this.

View 1 Replies View Related

Returning Results While The Query Is Executing

Jul 20, 2005

Hi,I wanted to know if this is possible and if so, how do Ido it. Say, I have a query "SELECT * FROM Table WHEREColumn="some_value". This executes on a very large dataset and I would like to return the results as they queryexecutes rather than wait for the whole query to execute.Basically, I want to get the results as they are preparedby the database. Any way to do this?Regards,San

View 8 Replies View Related

Error: The Product Level Is Insufficient For Component, While Executing SSIS Package

Jul 28, 2006

While executing SSIS package from command prompt as follows:

dtexec.exe /DTS "MSDBetl-hyundai-package" /SERVER tvmwindev02 /CONNECTION "TVMWINDEV02.HISNA_POC";"Data Source=TVMWINDEV02;In
itial Catalog=HISNA_POC;Provider=SQLOLEDB.1;Integrated Security=SSPI;Auto Translate=False;" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING E /CONSOLELOGO

while executing the package following error message is received as :

Error: 2006-07-28 15:12:36.60
Code: 0xC00470FE
Source: Data Flow Task DTS.Pipeline
Description: The product level is insufficient for component "Data Conversion" (202).
End Error

and at the end as :

DTExec: The package execution returned DTSER_FAILURE (1).

Same error appers while executed from Integration Services - ->stored packages - - >name of the package -> mouse right button, run package.

But the same executes perfectly from visual studio, where it is developed.



what could be the reason?

View 6 Replies View Related

How To Get The Results When Executing Extended Stored Procedures.

May 28, 2007

Hi. Does anyone know how to display the results if i execute "xp_fixeddrives, xp_availablemedia and xp_subdirs" commands with VC++ 6.0? I can't obtained the results using Recordset class. Can someone help me? Thank you.



|_N_T_|

View 3 Replies View Related

Visual Studio Hangs When Executing A Package (also DTEXEC)

Oct 31, 2007

Hi,

We have a problem with visual studio. It hangs when i use the "execute package" option. New packages are running correctly but the packages which i've already built are not executing anymore...Any ideas to get things on track again?

Gr,
Hennie

View 2 Replies View Related

SQL Server 2008 :: Using Dynamic Management Views To Capture Executing Statement

Mar 19, 2015

I have created a trigger on a table that get's too many updates so to analyze what records and what columns get updates I have coded a trigger that inserts into a table the record key and a flag on each column to let me know what is updates. Now that I am presenting the data to the developers I have been asked to provide the update / insert or delete statement

So on my trigger I have tried using dynamic management views but its returning the actual trigger code not the parent SQL Script that triggered it.

This is what I am using.

select@dDate as dDate, dest.[dbid], dest.[objectid], dest.[number], dest.[encrypted],
case when sder.[statement_start_offset] > 0 --the start of the active command is not at the beginning of the full command text
thencasesder.[statement_end_offset]

[Code] .....

View 2 Replies View Related

Executing A Sp Via ADO Which Makes A Reference To Linked Server Table Results In Error

Oct 17, 1999

Greetings,

Facing a strange problem, but obviously not expected earlier on, I am trying to execute a stored procedure via ADO which refrences a linked server table and I get an error specifying
"
OLEDB provider SQLOLEDB does not contain table "<DatabaseName>"."<owner>"."<tableName>"
"

Has any one else encountered this problem before ?
regards
Govind

View 1 Replies View Related

Interactively Showing Reports Detailing Results/stats Of Executing A Package?

Jun 3, 2006

Hi,

I'm just starting out with SSIS and I'm currently looking to migrate some non-SSIS ETL processes to SSIS. Some of these processes are run manually depending on the results from a previous step. In these processes a user remotely executes an individual ETL program and is shown reports detailing the result of the program and various statistics about the data involved.

Is it possible to replicate this behaviour with SSIS / SSRS, or would the user have to execute a package and then manually find and bring up each of the relevant reports?

I'm new to SSIS and I'm still struggling to find out SSIS's capabilities, so I'd be really grateful if anyone could shed some light on this...

Thanks in advance,
Lawrie.

View 1 Replies View Related

Executing Packages On SQL Server MSDB From Visual Studio Project

Jan 5, 2007

I created several packages (MyProjectPart1 - MyProjectPart9) which I execute on the server directly(right-click package in integration services and execute). These packages alI deployed the server with logging and configuration files. Before deploying I edited the configuration file (changed all dependent file names and sql server name from default on my workstation to those unique to the server I'm deploying it to) and then ran the manifest file which pushed it onto the server. I then ran the packages from the server an it ran beautifully. I then tried to build a package which executes all the packages in the correct order (by adding 9 execute package tasks). The dependen files are on the E: emp folder on the server.


I have included the error messg...but it looks like it's looking for dependent drives on the C drive on my workstation. I don't get this? How do I supply configuration files? Why is it executing differently when I call it from package execute task and when I execute it on SQL Server



SSIS package "RUN_MY_PACKAGES_ONSERVER.dtsx" starting.
Information: 0x40016041 at ProjectInfo_NET_SSISA: The package is attempting to configure from the XML file "C:TempMyProjectPart1-03-2007-MyProjectPart1.dtsConfig ".
Error: 0xC001404B at MyProjectPart1, Log provider "SSIS log provider for Text files": The SSIS logging provider has failed to open the log. Error code: 0x80070015.
The device is not ready.
Error: 0xC001404B at MyProjectPart1, Log provider "SSIS log provider for Text files": The SSIS logging provider has failed to open the log. Error code: 0x80070015.
The device is not ready.
Error: 0xC001404B at MyProjectPart1, Log provider "SSIS log provider for Text files": The SSIS logging provider has failed to open the log. Error code: 0x80070015.
The device is not ready.
Error: 0xC002F304 at Drop Unecessary Tables, Execute SQL Task: An error occurred with the following error message: "The device is not ready.


".
Task failed: Drop Unecessary Tables
Warning: 0x80019002 at MyProjectPart1: The Execution method succeeded, but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
Task failed: Execute Package Task MyProjectPart1
Warning: 0x80019002 at RUN_MY_PACKAGES_ONSERVER: The Execution method succeeded, but the number of errors raised (4) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
SSIS package "RUN_MY_PACKAGES_ONSERVER.dtsx" finished: Failure.

View 3 Replies View Related

Executing SSIS Packages From Business Intelligence Studio When Not The Package Owner

Feb 5, 2008

I created a package but someone else will be running it every day. When this person opens the project in Business Intelligence Studio they get build errors such as the following:

Error loading PackageName: Failed to decrypt protected XML node "PackagePassword" with error 0x8009000B "Key not valid for use in specified state."
You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available.


this problem is described in the article below however the only advice they offer is to "change the value of the ProtectionLevel property " however they don't specify what to change the value to. I have tried every option but it still does not work. And having them enter in a password every time is out of the question.
http://support.microsoft.com/default.aspx?scid=kb;en-us;904800


It seems there is no way for someone other than the package owner to run the package! Running them from the sql server is not an option since we don't have permission to do so. As far as I know BIS is the only way.

View 7 Replies View Related

Integration Services :: Oracle Procedure Is Not Returning Results When Executing From Script Task On SSIS

Jul 13, 2015

I'm executing Oracle procedure, which has three OUTPUT parameters and returns results in table type variable. i should not use ODBC, MSDAORA providers to call the procedure. So I'm planning to using Oracle OLEDB provider. I'm able to execute the procedure successfully, but when i do check (while dr.Read()) its not returning any records. But I know as per stored procedure results, it should return 66 records.

Dim conn As New OleDbConnection
Dim cmd As New OleDbCommand
Dim dr As OleDbDataReader
Dim QSQL As String

[code]...

View 10 Replies View Related

SQL 2012 :: How To Capture Data Flow Component Name Dynamically While Package SSIS Package Is Executing

Jun 3, 2014

I would like to fetch the data flow component name while package is executing. Since system variable named [System::SourceName] only fetches name of the control flow tasks? Is there a way to capture them?

View 5 Replies View Related

2005 Management Studio Results Pane

Feb 8, 2007

Is there any way to have the results pane auto hide ? Im lazy and dont want to manually (ctl-R) hide each time i run something, then starting writing code again

View 1 Replies View Related

SQL Server Management Studio - Query Results Problem

Nov 23, 2007



Hi there

I have a problem with SQL Server Management Studio after insdtall regarding querys result showing!

Problem:
I have a query i run and getting results in a grid view. But the ruslt is somehow corrupted. I guess youŽd think its a sql problem but it is not. Because when i take the same query and run it in the old Query Analyzer the result is correct. For better explanation written the results below to show my problem.


In old Query Analyzer (correct)



1,00 60,00
1,00 34,80
1,00 79,20
-1,00 -79,20



In SQL Server Management Studio (corrupt)



1.000 60.00000000
1.000 34.80000000
-1.000 79.20000000
1.000 -79.20000000

What can cause this problem? Do I have to change some settings to make SQL Server Management Studio show the result correctly?

Best Regards
Michael

View 3 Replies View Related

Different Results When Running Procedure From Management Studio Vs Application Code

Apr 28, 2008

I'm updating a process that recreates a large table every night. The table is the result of a bunch of nightly batch processes and holds a couple million records. In the past, each night at the end of the batch jobs the table would be dropped and re-created with the new data. This process was embodied in dynamic sql statements from an MFC C++ program, and my task is to move it to a SQL Server 2000 stored procedure that will be called from a .Net app. Here's the relevant code from my procedure:
sql Code:






Original
- sql Code




-- recreate new empty BatchTable table
print 'Dropping old BatchTable table...'
exec DropBatchTable --stored procedure called from old code that does a little extra work when dropping the table

-- validate drop
If exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[BatchTable]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
Begin
RAISERROR( 'Unable to drop old BatchTable!',0,1) WITH NOWAIT
End Else Begin
print 'Old BatchTable dropped.'
End

print 'Creating new BatchTable...'
SELECT TOP 0 *, cast('' as char(3)) as Client, cast('' as char(12)) as ClientDB
INTO dbo.BatchTable
FROM differentDB.dbo.BatchArchives

--validate create
If Not exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[BatchTable]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
Begin
RAISERROR( 'Unable to create new BatchTable!',0,1) WITH NOWAIT
End Else Begin
print 'New BatchTable Created.'
End






    -- recreate new empty BatchTable table    print 'Dropping old BatchTable table...'    exec DropBatchTable --stored procedure called from old code that does a little extra work when dropping the table     -- validate drop    IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[BatchTable]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)    BEGIN        RAISERROR( 'Unable to drop old BatchTable!',0,1) WITH NOWAIT    END ELSE BEGIN        print 'Old BatchTable dropped.'    END     print 'Creating new BatchTable...'    SELECT TOP 0 *, CAST('' AS CHAR(3)) AS Client, CAST('' AS CHAR(12)) AS ClientDB    INTO dbo.BatchTable    FROM differentDB.dbo.BatchArchives     --validate create    IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[BatchTable]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)    BEGIN        RAISERROR( 'Unable to create new BatchTable!',0,1) WITH NOWAIT    END ELSE BEGIN        print 'New BatchTable Created.'    END

The print statements are there because the .net app will read them in and then write them to a log file. Some of the other mechanics are there to mimic the old process. The idea is to duplicate the old process first and then work on other improvements.

This works in Management studio. The .Net App reports that the old table was dropped, but when it tries to create the new table it complains that "There is already an object named 'BatchTable' in the database." I have verified that the old table is removed.

Any ideas on how to fix this?

View 4 Replies View Related

ADO.NET Returns Different Colum Value When Compared To View Results In SQL 2005 Management Studio

Feb 7, 2007

I have a complex view in my sql 2005 database.
The view returns a column that could be null (as the result of a left outer join).
The coulmn that is returned is an integer.
Everything works fine if I run the view from SQL 2005 Management Studio.
My column value is always null if I use ADO.NET's SqlAdapter to return a DataTable.
Has anybody seen this behaviour before?
Any help appreciated.
Regards,
Paul.

View 2 Replies View Related

Management Studio Grid Results, How Do I Get NULL Fields Auto-colored?

Jan 23, 2008

Perhaps I was seeing things earlier, and it's really a minor thing, but when I display query results in Management Studio, isn't there a setting that turns the background of cells containing NULL to a pale yellow color? I could've sworn it used to do this, and I've searched high and low for a preference setting, but no joy.

Does this setting exist?

Thanks,

Dave

View 3 Replies View Related

Pb Executing An SP

Sep 25, 2006

I have an SP that has this part of code located in the line:30
select convert(datetime,CONFIGURATION1) from dbdw..configuration
where CLECONFIG = 'DATE-AJOUT-VENTES'

I get teh error:
Server: Msg 242, Level 16, State 3, Line 1
The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.

Do u know what the problem is pls

View 3 Replies View Related

Executing A Job Using VB

Sep 17, 2007

I want to execute a backend SQL job using VB on an MSACCESS frontend.
I know how to run a DTS using VB script. Can anyone give me the syntax for a SQL job? Thanks in advance.

View 1 Replies View Related

Executing A DTS From Another DTS...

Jul 20, 2005

Hi there,I am trying to execute a DTS package from another DTSpackage and change some variables in the original DTS. Ihave used the info on the following page but it doesn'twork: http://www.sqldts.com/default.aspx?215. Would youhave any input?Thanks,Andreas*** Sent via Developersdex http://www.developersdex.com ***Don't just participate in USENET...get rewarded for it!

View 2 Replies View Related

Executing More Than One Query

Jun 16, 2007

Hi,
How to execute more than one query consecutively in SqlDataSource like the picture shown below.
 

View 3 Replies View Related

Executing DTS (on Sql Server) From ASP.NET??

Feb 5, 2004

Does Any one know how to execute DTS (on sql server) from ASP.NET??

View 2 Replies View Related

Executing DTS Package From VB.NET

Nov 16, 2004

Hello,

I have a web application that I kick off a DTS package. I tested the package and it works fine. However, when running the package through ASP.NET, I get the following error:

Type mismatch. (mscorlib (80004005): Missing parameter does not have a default value. Parameter name: parameters)

I've traced it to a dynamic task step. I have this as the first step in the workflow, but for some reason, it is executing last. Which is definitely not the place where I want it. Is there anyway I can force it, or why is it doing that?

Any ideas?

Brian

View 2 Replies View Related

Executing DDL In A Trigger

Nov 15, 2000

Dear All,
I would like to execute a DDL statement(create table) in a trigger. The DDL statement is stored as a field in another table. I have read that sql statement into a variable of type varchar. How do I execute that sql statement.
Thanks in advance

View 3 Replies View Related

Job Sticks On &#34;executing&#34;

Jan 18, 2001

Hi, I have a DTS package that runs correctly when executed it manually, but when I schedule a job via the package, the job begins executing, but does not stop. I have to cancel it. The Package runs in less that 1 minute, but the job reports that it's being executed but does not stop until I cancel it.

The job was created by using the DTS package schedule command, so how can I check what's wrong?

Thanks in advance.

View 1 Replies View Related

Executing SP In Loop

Sep 21, 2000

What is way for executing SP in loop? I have to delete some records in table X depends on records from table Y. Simple way is:

DELETE FROM X
WHERE X.ID IN
(
SELECT ID FROM Y WHERE ...
)

But if deleting from X is not so simply (after deleting from X I have to delte it from 5 others tables) ? I've created SP 'SP_DELETE_X' which has input parameter 'ID'. My question is how execute this SP in above loop???

Fly

View 6 Replies View Related







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