Consuming From Web Service And Load Data Into SQL
Jun 11, 2007
Hi:
Can someone help me with a SSIS package that would consume from a Web Service (in fact two of them) and then load the data into SQL Server. I currently have Web Service task which connects to ForEachLoop task, and inside the loop task, I have a DFT. I am thinking, I would need to call the webservice utilizing the Web Services Task, and then store the output in a Full ResultSet variable. In my loop, I would like to loop thru the resultset, and store the data into SQL server. Inside the DFT, how would I construct this mechanism? Also, is this a good way to consume from a Web Service and then populate SQL Server? Are there any alternate ideas on this? Any documentation on this yet? Thanks.
View 7 Replies
ADVERTISEMENT
Oct 9, 2007
Hi,
Need a guidance on consuming the WCF service with complex type in the SSIS package.
I have a WCF service with complex type inside the complex type (Nested complex type) in the web method as an argument. When I try to use this WCF service in the SSIS web service task, I get an error "The web method has unsupported arguments".
I am able to consume the WCF service with the web method having Complex type and simple/prmitive type in side that as argument.
For example:
The web method in WCF service which accepts the argument as comlex type say "Employee" whose structure is:
Employee
{
FName String;
LName String;
Age int
}
It is possible to consume this WCF service and pass the arguments.
But when the Employee complex type is changed to have one more complex type in side it it give the above mentioned error. The Employee type is modified as:
Employee
{
FName String;
LName String;
Age String
Type EmployeeType;
}
EmployeeType
{
type string;
}
Now I get the error Web Method has unsupported arguments.
Can this be done in SSIS?
Virendra
View 3 Replies
View Related
Apr 16, 2006
Hi, I have a scenario in which an application generates events upon updates to the database, which need to be reliably transmitted to consuming applications running a) other SQL Server instances and b) as remote web services.
Now,
1) I am planning to use SQL Server Notification Services to generate these events, and allow the consuming applications to subscribe to them.
2) The events will be sent to a ReceiveEvent service, which will then process the event and put it in the respective queues for the Subscriber (consumer) applications.
3) The services representing these consumer applications will then get activated, and sent the message across directly to the service broker on the consumer side in case of situation a - where there is a SQL Server on the other side
4) In case the other side is a web service, I plan to make a SOAP request directly from my queue handler, and depending on the response received, decide whether to commit or roll back that particular transaction.
Does this seem like a good solution? I am very new to the Service Broker, and I am still getting my hands dirty. Any comments/suggestions would be very highly appreciated!
Regards,
Siddhesh
siddhesh@persistent.co.in
View 3 Replies
View Related
Mar 25, 2007
I want to import the contents of a remote database every morning via a Web service to populate a data mart. I am looking for the most efficient way to do this. Step 1 is to use the Web Service Task in SSIS to grab the data and save to an XML file (since the content is far too large to store in the String data type).
For step 2, I can either use the SQLXMLBulkLoad object in VB Script to read in the file and populate the tables. Or I can using the XML Source object in Integration Services. It is clear that SQLXMLBulkLoad is the most efficient way to load data, but is the XML Source object in SSIS just a graphical representation of the SQLXMLBulkLoad object, or is it something else entirely that is inefficient because it requires loading of the XML content entirely into RAM before it can process the XML?
Any other suggestions are welcome.
SQL Server 2005 SP2.
Thank you,
Mike Chabot
View 3 Replies
View Related
Jan 7, 2008
I am very new to Reporting Services. What I would like to know is if there is anyway for me to consume the raw data on a specific report from within excel. That is, can I call a report from reporting services directly from excel.
Maybe someone can outline the supported interaction between excel and reporting services for me. I have been having lots of trouble locating information about the interaction between these two.
--David
View 3 Replies
View Related
Dec 14, 2007
Hi,
Here I will describe my problem.
1. We are loading large amount of data from database on background thread which is starting on Application_start event in global.aspx.cs file.The data is later cached for subsquent request to improve the performance.
2. Now when we put the application on web farm garden, it is not able to load the application.
3. We are sending the request the servers through Router kind of application.
4 This application is working fine on single server enviornment.
Please help us.
Ajay Kumar Dwivedi
View 1 Replies
View Related
May 19, 2006
Hello,
I have a big problem and i'm not able to find any hint on the Network.
I have a window2000 pc, VS2005,II5 and SQLServer 2005(dev edition)
I created an SSIS Package (query to DB and the result is loaded into an Excel file) that works fine.
I imported the dtsx file inside my "Stored Packages".
I would like to load and run the package programmatically on a Remote Scenario using the web services.
I created a solution with web service and web page that invoke the web service.
When my code execute:
Microsoft.SqlServer.Dts.Runtime.Application.LoadFromDtsServer(packagePath, ".", Nothing)
I got the Error:
Microsoft.SqlServer.Dts.Runtime.DtsRuntimeException: The package failed to load due to error 0xC0011008 "Error loading from XML. No further detailed error information can be specified for this problem because no Events object was passed where detailed error information can be stored.". This occurs when CPackage::LoadFromXML fails.
The error message doesn't help so much and there is nothing on the www to give me and advice....
Is it a SSIS problem???
Thank you for any help!!
Marina B.
View 10 Replies
View Related
Apr 27, 2007
I just have done the SSIS example in the tutorial document included when install SQL 2005 ENT. I have a problem that whenever I test to run, the service load all data from source with out noticing about the data (I mean it load all the data to the destination), I do it several time and it continue to load all without checking. That mean the data is dublicated when the schedule run???
I think there should be a paramete or something like that to help the engine just load the new data to the destination. Could you help please?
Thank
View 3 Replies
View Related
Jun 29, 2006
I am trying to achieve load balancing through service broker.
I have a 3 server setup:
server1:
Source Database where the requests are sent. This has two routes created on this to server 2 and 3 with the service broker instance id specified. The service broker matches both these routes to the destination databases on Server 2 & 3 and send the requests in a round robin fashion by itself.
server2 & 3: These servers have the destination databases. The databases are exactly same with same messages, contracts, queues, services, and servicing programs. These don't send the responce back and the source is also not expecting for any response from the target databases.
When I tested this scenario it was behaving in a different manner. If there are 20 requests, in a normal case 10 requests should go to either of the destiantion servers, but I found that sometimes it was 11-9 or 12-8 only once did it do a 10-10.
Also I want to know is it best practice to rely on the inbuilt feature of the service broker in matching the routes and sending the messages rather than doing it ourselves. I which case one has to write the logic for sending the message to appropriate target server based on the status of the destination queue.
I also want to know which would be the best technique to use to bring the two destination databases in a concurrent state.
thanks
ashok
View 1 Replies
View Related
Mar 12, 2008
This has been driving me crazy.
First noticed it when I went from JIT compiling of my .net app to pre-compiled via the command prompt, although I can't see that that's go anything to do with it...
My database is around 2gb and I'm using service broker.
If I drop a new version of my app into production, sqlserver.exe goes nuts and eats up the cpu.
Tonight, I stopped IIS and SQL Server, then dropped a new version in. I hadn't re-started IIS at this point... As soon as I started SQL Server, off it went again - eating up the CPU. I quickly launched a trace via the Profiler - no activity showing.
So, I started IIS after a couple of mins (still with the high cpu) and then just waited. After about 10 mins, SQL Server settled down and everything was normal again.
What is it doing when I start the SQL Server service?
Si
View 2 Replies
View Related
May 28, 2015
how I can load the CSV file data into the sql server table. I know there are ways like bulk insert and other to load the csv file data into the table. But in my case the table doesn't exist and has to be created at the run time. With simple insert in temp table we do like select * into #temp from tablename and that creates the temp table. So. I need something like that which create the temp table and load the data into it. because the CSV file would have different number of columns and names so I can not create the table structure in advance. I have to create the table at run time.
View 3 Replies
View Related
Apr 16, 2014
I have an source file and i have to load it into the data base by changing datatype of the columns in ssis
View 1 Replies
View Related
Nov 15, 2000
I've just faced quite interesting case.
I have two SQL Servers 7.0 running on two W2K(sp1) Server boxes (Compaq ProLiant 1600 and HP NetServer LC3) both with RAID5. One of the task these servers peform is logging MS Proxy.
For more convenient way I created the procedure that show me proxy users, their IP address and URL head where they hit for the last one minute and half. This one as follow:
-----
REATE proc usp_showusers as
select clientip, clientusername, substring(stuff(uri, 1, 7, ''), 1, patindex('%/%', stuff(uri, 1, 7, ''))) short_uri into #whoweb from msplog where logtime > getdate()-0.001
select clientip, clientusername, short_uri from #whoweb
group by clientip, clientusername, short_uri
-----
So, when I run this proc on HP box it executes well and SQL keeps on consuming the same amount of memory (approximately 60MB)
When I run on Compaq, the proc executes well as well, but promptly gets memory consume up to 150MB (before execution it did ~50(60)MB). In half an hour it pulls down 90MB.
In addition to SQL Server the boxes run Lotus Domino R5 and Active Directory.
The installed software on them is absolutely identical.
Any idea? I'd be really appreciated.
Thanks
View 3 Replies
View Related
Jan 11, 2007
Hi there,
I've been following Vineets and David's procedures to consume web
services using SQL CLR to the t. I created my web service in C#.NET
2005, and generated my proxy using this command:
wsdl /par:oldwsdlconfig.xml /o:ExactMobileService.cs /n:Project360.SmsService http://www.exactmobile.co.za/interactive/interactivewebservice.asmx
I added both files to the project, set Generate Serialization Assembly to on and compiled it.I then generated a strong name key for the assembly and signed my assembly with that key.Inside my post-build event I added the following script:
"E:DevelopmentMicrosoft
Visual Studio 8SDKv2.0Binsgen.exe" /force
/compiler:/keyfile:SmsServiceKey.snk /t:StoredProcedures
$(TargetDir)$(TargetName).dll
This compiled into my assembly, the XmlSerializer assembly and then added strong name key to both.
In SQL Server 2005, I enabled CLR, made my DB trustworthy, created my
first assembly with permissions EXTERNAL ACCESS and then the
XmlSerializer assembly with permissions SAFE. I created my stored
procedure and ran it. When I did I got this error which I assumed the
XmlSerializer was supposed to solve for me:
System.InvalidOperationException:
Cannot load dynamically generated serialization assembly. In some
hosting environments assembly load functionality is restricted,
consider using pre-generated serializer. Please see inner exception for
more information. ---> System.IO.FileLoadException: LoadFrom(),
LoadFile(), Load(byte[]) and LoadModule() have been disabled by the
host.
I have seen alot of posts about this error, but none of them has been able to solve my problem.
Please can you help me?
O'Connor
View 4 Replies
View Related
Nov 22, 2007
Hi,
We've been using Sql Server 2005 for some time now and we've found it to be stable and pretty much bug free, well done! (as opposed to Oracle 10g, which is bug-ridden) I'm not sure if this is the right forum to post this in, but it felt like the best place to start. Please move my post if it is not correct.
In the last few weeks we've had a very serious problem; whenever we try to execute our upgrade scripts the CPU usage spikes to 100%. And then every insert takes > 0.5 seconds. Needless to say, but I'll do it anyway, this is a huge problem. Some of our scripts have > 100 000 inserts, so the upgrade process takes "forever".
At this point it might be useful to talk just briefly about how we use our Sql Server; We have an application that is configured via the database (we support Sql Server and Oracle) and so we use the database for a lot more than just a "dumb" datastore. We do massive amounts of insert/update for every version of our application and we add new tables quite often. We have a build system, using TFSBuild, where we do nightly builds. That build will drop the current database (example of name: MONDAY, TUESDAY etc.) and restore it again using an image. Then we upgrade the new database to the most current version of our scripts. On our Sql Server 2005 server we have 4 such databases so the process is repeated 4 times each night. And since we build our database using a baseline image and scripts (both stored in source control) we do not need backups of the databases, so no backup plan is running. I'm only mentioning that because we've had a theory that this might be the cause of our problems...
So, does anybody have an idea how we might go about solving this?
View 15 Replies
View Related
Oct 19, 2006
What are the types of queries that are most time consuming...which may easily lead to expired time out etc...thanks
Regards
Alu
View 5 Replies
View Related
Sep 6, 2007
Hi,
Ive been taking a look at how to consume events from a package when executing programatically.
Ive got some code (copied below) that creates a package programatically, adds a sequence container then within that adds a script task , then executes it using the overloaded method of Package.Execute() that takes an IDtsEvents argument.
My class that implements IDtsEvents simply output a message to the console for each event type.
Weird thing is, when I execute, this is the only output I get:
Starting...
OnPreValidate: Microsoft.SqlServer.Dts.Runtime.Package
OnPreValidate: Microsoft.SqlServer.Dts.Runtime.Sequence
OnPreValidate: Microsoft.SqlServer.Dts.Runtime.TaskHost
OnPostValidate:Microsoft.SqlServer.Dts.Runtime.TaskHost
OnQueryCancel
Package ran successfully
What I find weird is that I dont get information for loads of other event types. I would at least have expected to see some OnPostExecute events.
Anyone know why i dont see all of the events?
Thanks
Jamie
Heres the code:
Code Snippet
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SqlServer.Dts.Runtime;
using Microsoft.SqlServer.Dts.Tasks.ScriptTask;
namespace Package_API
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Starting...");
Package p = new Package();
p.InteractiveMode = true;
p.OfflineMode = true;
// Add a Script Task to the package.
Sequence s = (Sequence)p.Executables.Add("STOCK:Sequence");
TaskHost taskH = (TaskHost)s.Executables.Add("STOCK:ScriptTask");
// Run the package.
DtsEvents events = new DtsEvents();
p.Execute(null,null,events,null,null);
//p.Execute();
if (p.ExecutionResult == DTSExecResult.Failure || p.ExecutionStatus == DTSExecStatus.Abend)
Console.WriteLine("Package failed or abended");
else
Console.WriteLine("Package ran successfully");
Console.ReadLine();
}
}
}
// Class that implements the IDTSEvents interface:
public sealed class DtsEvents : IDTSEvents
{
void IDTSEvents.OnPreExecute(Executable exec, ref bool fireAgain)
{
Console.WriteLine("OnPreExecute: " + exec.ToString());
}
void IDTSEvents.OnBreakpointHit(IDTSBreakpointSite breakpointSite, BreakpointTarget breakpointTarget)
{
Console.WriteLine("OnBreakpointHit");
}
void IDTSEvents.OnCustomEvent(TaskHost taskHost,string eventName,string eventText,ref Object[] arguments,string subComponent,ref bool fireAgain)
{
Console.WriteLine("CustomEvent");
}
void IDTSEvents.OnPreValidate(Executable exec, ref bool fireAgain)
{
Console.WriteLine("OnPreValidate: " + exec.ToString());
}
void IDTSEvents.OnPostValidate(Executable exec, ref bool fireAgain)
{
Console.WriteLine("OnPostValidate:" + exec.ToString());
}
void IDTSEvents.OnWarning(DtsObject source,int warningCode,string subComponent,string description,string helpFile,int helpContext,string idofInterfaceWithError)
{
Console.WriteLine("OnWarning");
}
void IDTSEvents.OnInformation(DtsObject source,int informationCode,string subComponent,string description,string helpFile,int helpContext,string idofInterfaceWithError,ref bool fireAgain)
{
Console.WriteLine("OnInformation");
}
void IDTSEvents.OnPostExecute(Executable exec, ref bool fireAgain)
{
Console.WriteLine("OnPostExecute");
}
bool IDTSEvents.OnError(DtsObject source,int errorCode,string subComponent,string description,string helpFile,int helpContext,string idofInterfaceWithError)
{
Console.WriteLine("OnError");
return true;
}
void IDTSEvents.OnTaskFailed(TaskHost taskHost)
{
Console.WriteLine("OnTaskFailed");
}
void IDTSEvents.OnProgress(TaskHost taskHost,string progressDescription,int percentComplete,int progressCountLow,int progressCountHigh,string subComponent,ref bool fireAgain)
{
Console.WriteLine("OnProgress");
}
bool IDTSEvents.OnQueryCancel()
{
Console.WriteLine("OnQueryCancel");
return true;
}
void IDTSEvents.OnExecutionStatusChanged(Executable exec,DTSExecStatus newStatus,ref bool fireAgain)
{
Console.WriteLine("OnExecutionStatusChanged");
}
void IDTSEvents.OnVariableValueChanged(DtsContainer DtsContainer,Variable variable,ref bool fireAgain)
{
Console.WriteLine("OnVariableValueChanged");
}
}
View 4 Replies
View Related
Aug 24, 2000
I have a sotred procedure using a cursor which sort data and create subsets based on same oid and same decision_date columns, for each subset I am trying to order them and affect values 1, 2,... for each record in a different subset.
The stored procedure seems to work very well and fast against a small tables (during tests). When used against a table with 200,000 records it takes more than 24 hours...
I am looking for a help to make it work faster, thanks guys.
here is the stored procedure:
CREATE PROCEDURE ORDERING_TEST_PROCEDURE AS
DROP TABLE REVIEWS_TEST_TABLE
SELECT OID,DECISION_DATE,DECISION_ID,VOTES_REQUIRED, ORDERING INTO REVIEWS_TEST_TABLE FROM DECISION_FLAGS
WHERE VOTES_REQUIRED IN ('1','2','3') and FINAL_DECISION_CODE NOT IN ('0800','0810','0840') and DECISION_TYPE_CODE < '0100'
ORDER BY OID, DECISION_DATE,VOTES_REQUIRED DESC
CREATE INDEX OID_DECISIONID_DATE_INDEX ON CRIMS.dbo.REVIEWS_TEST_TABLE (DECISION_ID, DECISION_DATE, OID)
CREATE INDEX VOTESREQUIRED_INDEX ON CRIMS.dbo.REVIEWS_TEST_TABLE (VOTES_REQUIRED)
CREATE INDEX DECISIONID_INDEX ON CRIMS.dbo.REVIEWS_TEST_TABLE (DECISION_ID)
declare @oldoid varchar(12)
declare @olddecision_date varchar(75)
declare @oid varchar(12)
declare @decision_date varchar(75)
declare @Decision_id varchar(12)
declare @ordering varchar(1)
declare @ordering_count int
declare @votes_required varchar(12)
set @oldoid = 'space'
set @olddecision_date = 'space'
set @oid = 'space'
set @decision_date = 'space'
set @votes_required='space'
set @Decision_id = 'space'
set @ordering = '0'
set @ordering_count = 0
declare review_test_cursor cursor for
select oid,decision_date,votes_required,ordering,decision _id from CRIMS.dbo.reviews_test_table
order by oid,decision_date,votes_required asc
open review_test_cursor
fetch review_test_cursor into @oid,@decision_date,@votes_required, @ordering,@Decision_id
while (@@fetch_status = 0 )
begin
if @oldoid <> @oid or @olddecision_date <> @decision_date
begin
set @oldoid = @oid
set @olddecision_date = @decision_date
set @ordering_count=0
end
update reviews_test_table
set ordering = CAST ((@ordering_count + 1) as VARCHAR)
where decision_id = @Decision_id
set @ordering_count = @ordering_count + 1
fetch review_test_cursor into @oid,@decision_date,@votes_required, @ordering,@Decision_id
end
close review_test_cursor
deallocate review_test_cursor
/*********************************/
UPDATE DECISION_FLAGS
SET ORDERING = '0'
UPDATE DECISION_FLAGS
SET DECISION_FLAGS.ORDERING = TEM.ORDERING
FROM DECISION_FLAGS DEC, REVIEWS_TEST_TABLE TEM
View 4 Replies
View Related
Dec 19, 2005
Hi,
The sqlsrv.exe process has been consuming a high number of cpu cycles and time and seems not be decreasing at all. Can somebody point me in the right direction as to how to identify the bottleneck and resolve the same at the earliest
Thanks in advance
View 3 Replies
View Related
Nov 3, 2006
I have a situation where I have created a recordset in a previous data flow task where the output was a recordset.
Now I want to write that recordset to a flat file.
There is no direct recordset input data flow source. So I thought I would use a source script transformation to read the recordset. Then I searched on this and found no information on how I might do this.
Anyone have any ideas on how to do this in a script transformation?
There are reasons that I would like to do it this way, but if I have to choose another way, well that's life.
View 3 Replies
View Related
Sep 24, 2007
Hi All,
We have a webservice, which we are able to consume in the SSRS report.
Due to some requirement, we need to conver this webservice in to the secured webservice using the SSL https extension.
We did this and just changed the connection string from http to https.
But when we try to run the report, we get the following error message. Copied from BIDS.
TITLE: Microsoft Report Designer
------------------------------
An error occurred while executing the query.
Failed to prepare web request for the specified URL.
------------------------------
ADDITIONAL INFORMATION:
Failed to prepare web request for the specified URL. (Microsoft.ReportingServices.DataExtensions)
------------------------------
The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. (System)
------------------------------
The remote certificate is invalid according to the validation procedure. (System)
------------------------------
BUTTONS:
OK
------------------------------
Can anybody help in this.
Thanks in advance.
Virendra
View 5 Replies
View Related
Oct 4, 2006
Is it possible to consume the sql 2005 web service from 1.1? When I try and do so I receive the following error:Type 'http://schemas.microsoft.com/sqlserver/2004/sqltypes:varchar' is not declared or not a simple type. An error occurred at , (1, 2452).
Thanks,
Olja
View 1 Replies
View Related
Jun 15, 2007
I try to consume a SSL Endpoint that is locate in localhost, but i get the follow error msg:
The underlying connection was closed: An unexpected error occurred on a receive.
m_safeCertContext is an invalid handle.
I do not know what gone wrong with my VS2005, i tried in IE with https://localhost/test?wsdl, and it was okay and display the wsdl document successfully. Beside i also tried with CLEAR port, everything is ok and i managed to consume the web service too.
any suggestion would be appreciated. Thank q
View 3 Replies
View Related
Nov 25, 2007
Hi,
I believe this question has been covered quite a bit, but none the less I wanted to ask it as I still have no resolution at the moment. I am consuming a table from Oracle which has a data type of NUMBER. When I use a .Net Provider to consume the data, the SCALE defaults to 0 for these select columns and thus we lose any decimal point information for these columns. I have tried using both the .Net Provider and the .Net for OLEDB providers for ORACLE. Both seem to suffer from this. The SSIS server itself is a Win 03' server on x64 hardware architecture. Also, when trying to use the Oracle Provider for OLEDB it throws a design-time error stating "Error in Initializing Provider".
Thanks!
Derek
View 4 Replies
View Related
Sep 14, 2007
This is my SProc:
CREATE PROCEDURE dbo.ap_Select_ModelRequests_RequestDateTime
/* Input or Output Parameters *//* Note that if you declare a parameter for OUTPUT, it can still be used to accept values. *//* as is this procedure will very well expect a value for @numberRows */@selectDate datetime ,@selectCountry int ,@numberRows int OUTPUT
AS
SELECT DISTINCT configname FROM ModelRequests JOIN CC_host.dbo.usr_smc As t2 ON t2.user_id = ModelRequests.username JOIN Countries ON Countries.Country_Short = t2.country WHERE RequestDateTime >= @selectDate and RequestDateTime < dateadd(dd,1, @selectDate) AND configname <> '' AND interfacename LIKE '%DOWNLOAD%' AND result = 0 AND Country_ID = @selectCountry ORDER BY configname
/* @@ROWCOUNT returns the number of rows that are affected by the last statement. *//* Return a scalar value of the number of rows using an output parameter. */SELECT @numberRows = @@RowCount
GO
And This is my code. I know there will be 100's of records that are selected in the SProc, but when trying to use the Output Parameter on my label it still says -1Protected Sub BtnGetModels_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Dim dateEntered As String = TxtDate.TextDim selectCountry As String = CountryList.SelectedValue
Dim con As New SqlClient.SqlConnection
con.ConnectionString = "Data Source=10.10;Initial Catalog=xx;Persist Security Info=True;User ID=xx;Password=xx"Dim myCommand As New SqlClient.SqlCommand
myCommand.CommandText = "ap_Select_ModelRequests_RequestDateTime"
myCommand.CommandType = CommandType.StoredProceduremyCommand.Parameters.AddWithValue("@selectDate", dateEntered)
myCommand.Parameters.AddWithValue("@selectCountry", CInt(selectCountry))Dim myParam As New SqlParameter("@numberRows", SqlDbType.Int)
myParam.Direction = ParameterDirection.Output
myCommand.Parameters.Add(myParam)
myCommand.Connection = con
con.Open()Dim reader As SqlDataReader = myCommand.ExecuteReader()Dim rowCount As Integer = reader.RecordsAffected
numberParts.Text = rowCount.ToString
con.Close()
End Sub
What should I fix?
View 5 Replies
View Related
Jul 23, 2005
Dear All,This is a query surrounding a problem I encounteredyesterday.In SQL Server, it is possible to write a procedure thathas one or more select statements in it.The results from these select statements will all beindividually returned to SQL Query Analyser where theycan be viewed in "grid" views. Also, these individualresults sets can be consumed by eg ADO.NET by steppingthrough each results set in turn and processing therespective results.My question is, can you do the same in a SQL Serverprocedure? ie:Create Procedure Proc1ASbeginselect Col1, COl2from Table1select Col1, Col2, Col3from Table2endCreate Procedure Proc2ASbeginexec Proc1endCan both/either of the results sets from Proc1 beconsumed by the calling procedure Proc2?I can see that you could design the procedures up-front to do almost anything without consuming theresult sets in this way, but if the proceduresreturning the results sets are already built andin use in other places (for instance in client code),can they be re-used on server-side SQL procedures?Thanks in anticipation!Paul.
View 5 Replies
View Related
Aug 22, 2006
Assume I've created a web service named 'SaveActivityData' for some SQL 2005 database on some remote server. Also assume that the stored proc takes two parameters; the first is an integer value and the second an XML value.
1) Is it possible for a stored procedure on a completely different SQL 2005 server to consume this web service?
2) If the above is possible, could someone show me an example of the T-SQL syntax required to consume this web service, passing the two required parameters? In your example, you can make up whatever URL you like for the remote web service location.
Thanks very much - Amos.
View 4 Replies
View Related
Jan 8, 2007
Hi,
I have a problem while rendering a report which returns around 5000 rows. At first the server is busy to process the request, when the server is done the rendering client side takes 100% of CPU and never displays the result ("IE is not responding"). It seems that the ReportViewer has trouble to handle the server response.
Do you have any idea why ?
Sébastien.
View 3 Replies
View Related
Sep 27, 2005
I am trying to pass a parameter into the DtsCommand object, but always get the error "a requested parameter does not exist in the package". I have a variable defined at the top scope named EmailPromotion so I tried the following
View 9 Replies
View Related
Jun 20, 2001
Hi!
We make complete data load once a week. Now we need to make additional steps to append data on daily basis. We have primary key on the table and it doesn't allow appending duplicate rows.
What steps should we create to append data?
Thank you,
Elena.
View 2 Replies
View Related
Oct 23, 1999
Hi everobody!
When I run :
LOAD DATABASE db1
FROM DISK = 'c:mssqldatadb1_backup.dat'
go
I got error message:
Msg 3201, Level 16, State 1
Can't open dump device 'c:mssqldatadb1_backup.dat', device error or device off line. Please consult the SQL Server error log for more details.
How can I fix the problem?
Thank you.
Alona
View 1 Replies
View Related
Apr 16, 2007
Hi,
I have created a program that imports a csv into the sql server. but during that import I need to track all the errors that occured for some malformed rows. I think I need to use the error output collection of the dataflow components to track the errors. I figured out that every dataflow component has a error output collection along with the data output collection. I want to write those error outputs into a separete database. So, I have created a SQL server data destination component and created a path between derived columns error output and it input collection. But it is not working as expected. can any body help on this?
or can anyone give me any example how to use/handle error output collection in SSIS?
I will appreciate all kind of suggestions.
thanks
View 2 Replies
View Related
Nov 13, 2005
I'm needing to load data on the client side to load into a DataGrid. I decided to use excel to load the data, but it doesn't need to be. My problem is that it only loads from the server not the client. I browse to find the file and get the path with a control named ctlFindFile. A button labeled ctlLoadData will when pressed display the pathway in label1 and also place the pathway in the function GetDataFromExcel which returns a dataset from the spreadsheet and displays the data in a dataset. Data is returned fine if I’m on the server, but when I'm on a remote machine I receive an error. That is unless I've place a spreadsheet with the same name and pathway on the server as on the client machine, then I’m able to load the file. Now how do I get it to load from on the client machine?
Code below:
Private Sub ctlLoadData_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ctlLoadData.Click
Label1.Text = ctlFindFile.Value
DataGrid1.DataSource = GetDataFromExcel(ctlFindFile.Value, "SampleNamedRange").Tables(0)
DataGrid1.DataBind()
End Sub
Public Function GetDataFromExcel(ByVal FileName As String, ByVal RangeName As String) As System.Data.DataSet
'Returns a DataSet containing information from a named range in the passed Excel worksheet
Try
Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;" &_ Data Source=" & FileName & ";Extended Properties=Excel 8.0;"
Dim objConn As New System.Data.OleDb.OleDbConnection(strConn)
objConn.Open()
' Create objects ready to grab data
Dim objCmd As New System.Data.OleDb.OleDbCommand("SELECT * FROM " &_ RangeName, objConn)
Dim objDA As New System.Data.OleDb.OleDbDataAdapter
objDA.SelectCommand = objCmd
' Fill DataSet
Dim objDS As New System.Data.DataSet
objDA.Fill(objDS)
' Cleanup and return DataSet
objConn.Close()
Return objDS
Catch ex As Exception
' Possible errors include Excel file already open and locked, et al.
Return Nothing
End Try
End Function
Error on Client:Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.Source Error:
Line 31: Private Sub ctlLoadData_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ctlLoadData.Click
Line 32: Label1.Text = ctlFindFile.Value
Line 33: DataGrid1.DataSource = GetDataFromExcel(ctlFindFile.Value, "SampleNamedRange").Tables(0)
Line 34: DataGrid1.DataBind()
Line 35: End SubSource File: C:InetpubwwwrootSAI_LoadWebForm1.aspx.vb Line: 33 Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
SAI_Load.WebForm1.ctlLoadData_Click(Object sender, EventArgs e) in C:InetpubwwwrootSAI_LoadWebForm1.aspx.vb:33
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1292
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032
View 1 Replies
View Related