Wait For Recieve Fails To Recieve Message When Called From .Net SqlClient
Oct 14, 2005I have been building out an application and Service Broker has been working great but I have this one nagging problem.
View 15 RepliesI have been building out an application and Service Broker has been working great but I have this one nagging problem.
View 15 Replies
Hi All,
A client of mine has an update to the software they use which requires SQL ports to be pinholed on the
router to allow direct connctions from point of sale terminals. I'm not happy with the idea but thats not my call.
Is there a way to restrict IP addresses that can connect to SQL Express ? (without havng to get them to buy
a new router)
Cheers.
Irish
I have web server with .aspx page from wich I call stored procedure on MSSQL server. In this procedure are lots of "select" statements and I need to show results of this statements in web page. Can I call this procedure in that manner that procedure output is writen in some file and this file then ir recieved by web server and included in web page.
View 2 Replies View RelatedHi there,
I am looking for a way to have SQL server accept incomming e-mails and store the contents of the e-mail into the database. I was doing some research on the subject of recieving emails from a SMTP server with the server having an account, but it looks like there are no information on the subject.
Is this possible? Or do I have to use some sort of work around hack?
Thanks in Advance,
Liv
If a sqldatasource is programed to send textbox1.text to a stored procedure, and the .text property is left empty, and there is no default value set for the parameter, what exactly is the stored procedure receiving?I would like to run a IF BEGIN statement on the value of the parameter in the stored procedure but the following does not work:IF @Parameter IS NULL BEGINor IF @Parameter = '' BEGINThe only way I've gotten it to work is if I set the default value of the parameter being sent to a specific alphanumeric value. Then do something like:IF @Parameter = '99' BEGIN<Code Here>END
View 4 Replies View RelatedHi,
I need to execute a DTS that have a couple of steps and one of them is a process task that simply call an exe file i made that will send an email to warn the user.
What happens here is that the process task executes my exe file but it doesn't wait for it to compete and fires the next task after and finally closes.
There is anyway to make a "while statament" to wait until my exe application finishes?
Any idea?
Thanks in advance,
Tiago Teixeira
Hi All,
I have a Stored Procedure, which has a RAISERROR statement with LOG. I am calling this SP from a Job. Whenever the RAISERROR is executed, it also fails the job.. How should this be handled? The article:
http://support.microsoft.com/kb/309802 says that this has been fixed in SP4, but I am working on SQL Server 2000 SP4, but still it persists here. Can anyone please help me resolve issue? Can this be handled in Code? Or, Is it confirmed that even SP4 has not fixed this? Or is this a known issue and we need to live with it?
Thanks a lot,
Manoj Deshpande.
This is a very weird problem. SQL 2000. A bcp calls an SP:
bcp "exec MyDB.dbo.usp_DF_NA_Analytics_OOW" queryout SomeFile.dat -T -c -t "|" -S "MySvrMyInst"
SP code:
----------------------------
CREATE PROCEDURE dbo.usp_DF_NA_Analytics_OOW AS
BEGIN
SET NOCOUNT ON
--Declare Variables
DECLARE @CURRENTDATE DATETIME
DECLARE @BEGINTIME DATETIME
declare @feedname varchar(50)
set @feedname = 'DF_NA_Analytics_OOW'
SET @CURRENTDATE = CURRENT_TIMESTAMP
-- ensure there is a row for us - create 1 if it doesn't exist
exec usp_datafeed_timestamp_init @feedname
SET @BEGINTIME = (
SELECT LastRunTime
FROM NewAccounts.dbo.DataFeed_Timestamp
WHERE TaskName = @feedname
)
select oowReason.OOWTransaction_id,
oowReason.Position,
oowReason.ReasonCode,
oowTx.UpdateDateTime
from OOWTransaction oowTx (nolock)
join OOWReason oowReason (nolock)
on oowReason.OOWTransaction_id = oowTx.OOWTransaction_id
WHERE oowTx.UpdateDateTime >= @BEGINTIME and oowTx.UpdateDateTime < @CURRENTDATE
ORDER BY oowReason.OOWTransaction_id, Position
-- update the timestamp
exec usp_UPD @feedname, @currentdate
end
------------------------------
ALTER procedure dbo.usp_UPD (@feedname varchar(50), @lastruntime datetime)
as
begin
set nocount on
if not exists (select * from dbo.datafeed_timestamp where lower(taskname) = lower(@feedname))
INSERT INTO Datafeed_Timestamp(TaskName, LastRunTime) VALUES(@feedname, @lastruntime )
else
update Datafeed_Timestamp
set LastRunTime = @lastruntime
where TaskName = @feedname
end
----------------------------------------
The above bcp fails consistently unless the "exec usp_UPD" is completely removed.
Even if I substitute it with the update stmt instead of the SP call, it still fails.
I move the usp_UPD call and move it above the select making the select as the last command in the SP -- still fails.
Removed Order by -- still fails.
The weird thing is -- several other SPs that follow the same exact format (only select query is different) - they all succeed everytime.
This above bcp fails everytime unless the usp_UPD is fully removed.
I have tried putting the result dataset into a table variable and select it in the end -- still fails. several other attempt to workaround - fails -- by fails I mean "0 rows returned" from bcp -- when the UPD is removed, it returns the correct dataset. Otherwise always returns 0 rows.
Outside bcp, if I simply execute the SP from QA, it returns the correct dataset everytime. From bcp, it just doesn't like it. It returns 0 rows everytime, but does the UPD task -- the value does get updated adter execution.
Any thoughts/ideas? This thing is driving me NUTS
Thanks,
Rajesh
So I have a parent package that calls another package using the Execute Package Task. When I run the child it runs fine but when I run it from the parent i get this msg...Any ideas?
Error: 0xC00220E4 at Execute VR Account Load: Error 0xC0012050 while preparing to load the package. Package failed validation from the ExecutePackage task. The package cannot run.
i was deleting a row from my gridview.this fail ("System.Data.SqlClient.SqlException: Invalid object name 'MESSAGE'.") consists what must i do ?My SQL query is "UPDATE MESSAGESET DELETIONSTATUSTO = 1,_LASTMODIFYDATE =getdate() WHERE (_ID = @ID)"
View 5 Replies View RelatedI've put together a SSIS package that, once a user uploads an Excel spreadsheet from a webpage, grabs it, does a mess of calculations and spits it out into a datareader (this last part is tricky, but I haven't even gotten to this point yet). In BIDS, the package works fine. Run using the 32-bit version of dtexec, it runs fine. But when I try to call it from the page, I keep getting an error. The errors look familiar enough that I'm thinking it's due to the package trying to run 64-bit, and that not playing nicely with Excel. If that's true, is there an easy way to force the 32-but version to be used? I've already set the project properties to Run64BitRuntime = false, which I'd hoped would help. but no luck.
Here's the code I'm using:
Code Snippet
string pkg = @"pathpackage.dtsx";
Application app = new Application();
Package p = app.LoadPackage(p, null);
Variable varFileName = p.Variables["strExcelFileName"];
varFileName.Vaue = strFileName;
Variable varFilePath = p.Variables["strExcelFilePath"];
varFilePath.Value = strFilePath;
DTSExecResult dte = p.Execute();
Error handling
p.Dispose();
And it kicks out the following:
-1071636471
TestReports_UploadTestReport
Connection manager "Excel Connection Manager"
Microsoft.SqlServer.Dts.Runtime.DtsError0{8BDFE898-E9D8-4D23-9739-DA807BCDC2AC}
SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040154. An OLE DB record is available. Source: "Microsoft OLE DB Service Components" Hresult: 0x80040154 Description: "Class not registered".
-1071611876
DFT - Upload spreadsheet to dataset
Excel Source [1]
Microsoft.SqlServer.Dts.Runtime.DtsError0dtsmsg.rll{8BDFE893-E9D8-4D23-9739-DA807BCDC2AC}
SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.
-1073450985
DFT - Upload spreadsheet to dataset
DTS.Pipeline
Microsoft.SqlServer.Dts.Runtime.DtsError0dtsmsg.rll{8BDFE893-E9D8-4D23-9739-DA807BCDC2AC}
component "Excel Source" (1) failed validation and returned error code 0xC020801C.
-1073450996
DFT - Upload spreadsheet to dataset
DTS.Pipeline
Microsoft.SqlServer.Dts.Runtime.DtsError0dtsmsg.rll{8BDFE893-E9D8-4D23-9739-DA807BCDC2AC}
One or more component failed validation.
-1073594105
DFT - Upload spreadsheet to dataset
I have looked all over my code and can not find anywhere that I am referencing the xp_sendmail procedure! Here is all the code<code>With sqlCmdUpdateParticipants
.Parameters("@ClassID").Value = ddlClass.SelectedItem.Value
.Parameters("@Person").Value = tbName.Text()
End With
cnCapMaster.Open()
sqlCmdUpdateParticipants.ExecuteNonQuery()
cnCapMaster.Close()</code>I am just getting a couple values and and inserting them into the database. the insert works then I get darn error message. This code worked at one time but it has been about 2 years sense I worked on it so who knows what might have happened sense then.Thanks,Bryan
Hi Guys,
I've got a merge replication set up between boxes. They're on separate sites both behind an ADSL Nat modem router. The publisher connects to the subscriber via a port forward / Nat translation at the router. This replication set up has been running for some months now. This morning I got this failure message from the merge agent on the publisher.
"the specified remote server name may not be the network name of the remote server or the remote server is unreachable due to network problems. The step failed"
Currently the Enterprise Mgr at the publisher can see the subscriber as can query analyzer running on the publisher.
The host name of the subscriber is the same name used in the server registration at the publisher. The registration uses a Client Network Utility alias to resolve the name.
If I run a ping command at the publisher using the subscribers name I get replies (the resolution of that name is done via a hosts file entry)
Both machines are Win2k Server boxes running SQL Server 2000 Standard.
Any ideas why the agent can't see the subscriber despite the fact its usual communications channel is working just fine?
Hi There
I am trying to install SQL express with the /qb switch. It fails with
To install Microsoft SQL Server 2005, COM+ should work.
However running the install just by double clicking sqlexpr.exe the install is successfull
This is still an issue for me as I will be distributing Express and I need an install that works in /qb mode
Has this issue come up before? Any ideas?
Many thanks
Chris Lennon
I have a SQL server scheduled to replication. This works fine if it has to do that one the sever on the same mechine. If it has to be done to another server, the replication fails with the following error message.
08001[Microsoft][ODBC SQL Server Driver][dbnmpntw]Connectionopen(Createfile())
Does any one know how to fix this.
Any help will be appreciated.
Thank you.
The following error occurred but did not provide any additional info.
[DTS.Pipeline] Error: The PrimeOutput method on component "Pgrs - tr_hist" (14596) returned error code 0xC02090F5. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.
For this package I am trying to use DataDirect's ODBC driver for a Progress OpenEdge Database version 9.1E to move data to SQL Server 2005 in order to make use of SQL's BI suite. I have consulted the DataDirect and have that the driver is functioning properly. The driver works perfectly from another application. They suggest that the problem is in the the datareader's or the connection manager's implementation of the driver.
Please tell me what is the cause of this or at least how to troubleshoot this problem.
Hi All,
I am trying to restore a DB from my production to Standby server..it gives me a mesage "Msg 3105, Level 16, State 1
Data on dump will not fit into current database. Need 6500 Mbyte database."
The production server DB size is 5000MB and I have increased the size of standby DB to 6500MB but still the same message...
HELP!!!!!
Thanks in Advance
We have changed the Network Domain name of a SQL server and restarted before changing any of the settings in SQL server. When we now try to start the SQL server service manager we get the following error
Your SQL server is either corrupt or has been tampered with. Unknown package id please rerun setup
Any suggestions on how to get the SQL server back on line without having to take the server down and changing the Netowrk Domain Name back ??
Cheers
SR
Hi,
This is my first posting and actually I have big problem which I need to resolve immediately:
I have a 38 GB Database on my SQL Server which I want to full-backup. Until now backup was created on the same volume where the database resides. But now the volume is out of disk space. So what we did is that we connected an external USB disk drive with 500 GB to the SQL Server and try to backup there.
But our first and all consecutive backup attemps failed with error SQL-DMO (ODBC SQLState: 42000). It's working fine the first few minutes as we can see that the backup file is continously growing. But then it abruptly aborts with above error message.
Can anyone figure out why ? Any help is appreciated.
Thx
Overlord1970
Hi,
I'm converting a replication script from SQL 2000 to SQL 2005.
I am getting an error with push merge with no way to figure out what is wrong.
I've configured replication on a single XP server in SQL 2005 RTM version.
I have a push merge set up between A and B and between B and C. All 3 databases are 9.0 compatibility.
The snapshot and merge jobs for the A to B run fine with no errors, and merge replicates ok.
The snapshot for B to C fails with this message:
Message
2006-03-09 17:30:35.94 ---------------------------------------------
2006-03-09 17:30:35.94 -BcpBatchSize 100000
2006-03-09 17:30:35.94 -HistoryVerboseLevel 2
2006-03-09 17:30:35.94 -LoginTimeout 15
2006-03-09 17:30:35.94 -QueryTimeout 1800
2006-03-09 17:30:35.94 ---------------------------------------------
2006-03-09 17:30:35.95 Connecting to Publisher 'MyInstance'
2006-03-09 17:30:35.97 Publisher database compatibility level is set to 90.
2006-03-09 17:30:35.97 Retrieving publication and article information from the publisher database 'MyInstance.MyDB'
2006-03-09 17:30:36.22 [0%] The replication agent had encountered an exception.
2006-03-09 17:30:36.22 Source: Replication
2006-03-09 17:30:36.22 Exception Type: Microsoft.SqlServer.Replication.ReplicationAgentSqlException
2006-03-09 17:30:36.22 Exception Message: Data is Null. This method or property cannot be called on Null values.
2006-03-09 17:30:36.22 Message Code: 52006
2006-03-09 17:30:36.22
Love that exception message: "Data is Null" - very helpful to someone who is clairvoyant perhaps.
I checked the snapshot bcp files. The tables being merged all have data.
A sample add article command is:
exec sp_addmergearticle @publication = N'MyMerge', @article = N'Phone', @processing_order = 4, @source_owner = N'dbo', @source_object = N'Phone', @type = N'table', @description = null, @column_tracking = N'true', @pre_creation_cmd = N'drop', @creation_script = null, @schema_option = 0x000000004C42CDDF, @article_resolver = null, @subset_filterclause = null, @vertical_partition = N'false', @destination_owner = N'dbo', @verify_resolver_signature = 0, @allow_interactive_resolver = N'false', @fast_multicol_updateproc = N'true', @check_permissions = 0, @identityrangemanagementoption = N'none' ,@force_invalidate_snapshot = 1,@force_reinit_subscription = 1
If you have any ideas on how to fix this, I'd be most grateful. As it is after 6pm I probably won't read this again until morning. Thanks for any suggestions.
I am running into problems while running a large procedure, and i think it may have something to do with a PAGEIOLATCH_SH wait problem.
My server, whose sole purpose is to run this one procedure, is doing plenty of disk i/o, and the CPU’s bouncing around, so I assume it’s working. But when I look at its process info, it seems to be sleeping a lot of the time on PAGEIOLATCH_SH. No other users are in the DB, so I'm quite confused. I don't find much info on this anywhere, so any insight would be very appreciated.
I'm new to SQL Sever 2005 and I'm trying to do what Informatica (Power Center - ETL) is trying does.
I have created a work flow and it is scheduled to run at every night 1:00 AM .The process is to load a flat file (CRV.data) into the database from a shared location.The flat file is transfered from a 3rd party and once the file transfer is complete it will create a indicator file (0 byte eg: CRV.DONE file) which indicates the CRV.data transfer is complete.
In my workflow I will be waiting for the CRV.DONE indicator file and once it is avaiable I will start loading the CRV.data and once the load is completed I will delete CRV.DONE file and be ready for the next day load.
Please let me know if there is any way in SQL Server 2005 to achieve it.Thanks
Hi. We are migrating a mainframe datacom database to SQL Server. One of our client-server applications already uses SQL Server. This application uses a middleware product to query and update the datacom database being migrated. We are considering using Service Broker to replace the middleware.
In many cases the client does not need a response provided the message is queued and will eventually get delivered. However, in some cases the client would like to wait for the message to be processed before proceeding. Is there an easy way to both submit and optionally wait for a response - with data - in a single stored procedure? If client does not want to continue to wait, is there a way to use a procedure to check for the returned message later?
We have not used Service Broker before and are doing for a "sanity" check before proceeding. We do not want to tightly couple the two databases at this time.
I have installed performance dashboard on 2 different servers. The first server have User Session CPU Time 71% and Wait Time =28%, The other server have Cpu Time of 20% and Wait Time of 79%. Have I understand that stands in SQL Server Waits And Queues that I have some typ of wait problem in my second server?
Then I tries to run this
Select
'%signal waits' = cast(100.0 * sum(signal_wait_time_ms) / sum (wait_time_ms) as numeric(20,2)),
'%resource waits'= cast(100.0 * sum(wait_time_ms - signal_wait_time_ms) / sum (wait_time_ms) as numeric(20,2))
From sys.dm_os_wait_stats
First Server
%signal waits %resource waits
--------------------------------------- ----------------------------
0.07 99.93
Second Server
%signal waits %resource waits
--------------------------------------- ----------------------------
0.12 99.88
Messy in my head€¦ Help please
My second server have
CLR with 50% in the historial wait. Rest in Sleep
My first server have
99% in sleep wait category.
I'm doing an update on a table with about 113m rows, the update-statement is fairly simple: update tab set col = null where col is not null.
The col column is mostly null.
Sysprocesses shows three rows for this statement: 1 CXPACKET (its a dual processor, 2000 box with sp3 installed), 2 PAGEIOLATCH_SH (waitresource is filled). My guess would be that the where-clause is executed in a seperate process blocking the update.
I changed the statement into update [...] set col = null; sysprocesses shows one row with PAGEIOLATCH_SH. Executing forever.
I checked other processes including those outside sqlserver but none are using the db, let alone accessing the table involved. Even restarted sqlserver to be sure there's no dead process blocking the update. Didn't help.
So I added a search condition to the where-clause, involving a clustered index in order to reduce the rowcount. The execution plan shows a 97% hit on the clustered index, but sysprocesses shows the three rows again...
So far the profiler didn't help me out either: there's a SP: CacheInsert on the update-statement... then nothing.
What should I do?
I have an ASP.NET web application that hangs on a single database UPDATE command for 5+ minutes. I can see this occur in SQL Profiler. This is a one row UPDATE statement on a small table (~600 rows). There are no JOINs or sub queries. There are no other users using the system. During this 5+ minutes, I can see the job in Enterprise Manager with a wait type of NETWORKIO. Since both IIS And SQL Server are running on the same system, the network shouldn't be an issue. Any ideas?
View 5 Replies View RelatedHello, my first post??
View 4 Replies View RelatedI'm writing a small vbscript to backup a db and some related files, so I used a WSShell calling OSQL to run a Sql BACKUP command, then after it's finished I XCOPY the resulting file plus some other related files. But the problem is that OSQL ends it's execution as soon as the BACKUP command is sent to SqlServer, not when the backup itself ends.
Anyone knows how to synchronize the two? How to wait, inside OSLQ, for the end of the BACKUP execution?
TIA
Luigi
I setup a SQL Agent to send me an email when the Average Latch Wait Time is greater than 300ms. Now I receive an email every 15 seconds stating that the current ALWT is 3916ms. That value never changes with the emails. However, the perfmon shows nothing at all (shows zero).
I also have a Buffer cache hit ratio of 2848.00.
These numbers are when there is NOBODY on the DB at all It is just sitting there. When I reboot the server, as soon as SQL starts it starts to send the emails again.
Server: Intel Xeon Quad Core 2.66
RAM: 4GB (with /3GB in the boot.ini)
RAID 1: OS
RAID 1: Data (DB and logs)
CPU Utilization: 0-1%
RAM Utilization: 527MB
OS: Server 2003 R2 With SP2
SQL: 2005 Standard with SP2
How can I determine if the ALWT is really 3916?
I executed 'Select * from sysprocesses where SPID>50 and waittime>0'
Which showed;
BROKER_RECEIVE_WAITFOR
waittime=110640ms
waittype=0x0075
status=suspended
program_name=DatabaseMail90 - Id<3780>
Any assistance is greatly appreciated.
Thank You
Magnum
Oracle has a 'wait interface' for monitoring bottlenecks, etc... does SQLServer have utilities like this?
View 3 Replies View RelatedHi,
I have a data-flow-task that imports data to sqlserver.
Now I want to check, if a special column of an imported record is null.
If yes, I have to wait 10 minutes and jump to the data-flow-task again. (Cjeck and wait).
How can I do this with the integration services?
Thanks
Gerd
We have a few SSIS jobs that we are currently manually kicking off after we are sure that certain AS400 jobs have run. We want to completely automate this process, so that we don't have to babysit. What is the most efficient way to do this? In the past (on SQL Server 7 no less) I've seen the 400 job setting a flag to 'Y' in a 400 file, FTPing it down to a flat file, and then the SQL job running every five minutes checking the flag. When it was 'Y', the SQL job would run. We do not have the option of using FTP here. Any suggestions would be appreciated! After the job runs, we'd like it to kick off a report as well
So, I'm fairly new to SQL, and I'm working with a SQL2k5 Database with pre-made packages and what-not. This database was setup before I started this job, and now I'm trying to improve part of the processing in SQL, and so far so good, but I can't figure a couple things out.
The main problem is when I start a SQL command to launch a DTS package from a .sql file, how can I make it wait for the package to complete or fail before moving onto the next part of the .sql script? Hope it's a simple question, I've just taught myself enough SQL to get by in a couple of weeks.
Thanks!