when is seemd that everything works some weird behaviours comes out.
I try to summarize the problem without to post the complete code.
Service Broker is set to have a dialog between two databases on the same SQL Server instance.
The Initiator queue has retention=on and there is an activation SP to handle errors and Target's end dialog message.
The Target queue has retention=off, MAX_READER =1 and there is an activation SP to receive the message (WAIT FOR (RECEIVE (1) ...), TIMEOUT 30000 and do something with this message (sample insert into a DB).
The conversation has a Timeout Dialog to end the dialog after a while.
The problem that the message is constantly processed. The Process doens't stop is I end the dialof after the processing either.
n.b.the Receive is within a Transation that I commit at the end.
some other informations that in the meanwhile I found out :
This was my complete WAIT FOR(RECEIVE :
WAITFOR ( RECEIVE top(1) -- just handle one message at a time
@message_type=message_type_id, --the type of message received
@messagetypename=message_type_name,
@message_body=message_body, -- the message contents
@dialog = conversation_handle -- the identifier of the dialog this message was received on
FROM [TargetQueue]
), timeout 1000;
if (@@ROWCOUNT = 0)
BEGIN
COMMIT;
BREAK;
END
IF I delet TIMEOUT 1000, everything works as expected ...
Inside if (@@ROWCOUNT = 0)BEGIN..END I wrote also an Insert into a table to see wheter the end of the queue was reached but this insert never occurs (neither with not without timeout)
I'm happy that it works what if this is the solution, it make no sense to me!
Hi;I have been writing a lot of quick and diryt tsql scripts to correctdatabase issues.I've been saving the output of the scripts for future records.I have been executing them through query analyzer.I find the messages query analyzer puts out to be obscuring to myoutput: ie" 6 rows processed "Is there anyway to shut this off?Steve
The comapny i work for has a server running the following.
Opteron 246x2
2 Gig memory
320 Gig Sata 2 drives
Windows 2003 Standard Edition
SQL Server 2005 Express Edition. The Free one.
There are approx 10 users that connect to the server.
There are two programs which seem to use sql server. Act 7.0 and service ceo.
When the computer is rebooted its at 0% for sqlserver.exe
Than when all connect it maxes it 50% and its steady there. Seems Service ceo affects it the most.
Told by comapny need to buy full blown sql server to resolve problem. But i dont think this is the problem.
Questions: Is it common for server to be at 50% all the time with sql server running?
And if its not is there a way to reduce the sql cpu usage.
I am new to sql server and have done alot of research and fixes. Ive unsitalled and reinstalled all sql instances and done the tweaks suggested. Any fresh ideas would be great thanks.
I've got a little console app that basically pulls back a recordset from our SQL Server 2005, goes through each row in the dataset and may/may not insert a record into a different table in the database. We use sproc's for every transaction and I close every connection in the application. However, when the application ends, I still show connection pools open in the performance monitor. Same with websites that I know have no traffic or that have been stopped by me in IIS.Last night I showed a total of 6000+ "Current # pooled and nonpooled connections". Should I be worried about what seems to be unending growth in the connection pools? If so, how can I look to manage this better?
Hi, I've been trying to figure out this error message I'm getting. The exact error message is: " Procedure addservicerequest has no parameters and arguments were supplied." and this is applied to a SQL Command, but what confuses me is that I've got parameters already created and added. Is there any advice to help me out with this problem? Here's the code for reference: 1 Dim sqlparadate As New sqlparameter2 Dim sqlparacompany As New SqlParameter3 Dim sqlparalocation As New SqlParameter4 Dim sqlparacontact As New SqlParameter5 Dim sqlparaphone As New SqlParameter6 Dim sqlparadetails As New SqlParameter7 Dim sqlparaso As New SqlParameter8 Dim sqlparadrive As New SqlParameter9 Dim sqlparawork As New SqlParameter10 Dim sqlparaback As New SqlParameter11 Dim sqlparaproblem As New SqlParameter12 13 Dim sqlcon As New SqlConnection14 Dim sqlinsert As New SqlCommand("addservicerequest", sqlcon)15 16 'txttest.Text = caldateofservice.SelectedDate 17 If sqlcon.State = Data.ConnectionState.Closed Then 18 sqlcon.ConnectionString = "***" 19 sqlcon.Open()20 End If 21 22 sqlinsert.CommandType = Data.CommandType.StoredProcedure23 'sqlinsert.CommandText = "addservicerequest"24 'sqlinsert.Connection = sqlcon 25 26 With sqlparadate27 .SqlDbType = Data.SqlDbType.SmallDateTime28 .Direction = Data.ParameterDirection.Input29 .ParameterName = "@dateofservice" 30 .Value = caldateofservice.SelectedDate.ToString31 End With 32 sqlinsert.Parameters.Add(sqlparadate)33 34 With sqlparacompany35 .SqlDbType = Data.SqlDbType.NVarChar36 .Direction = Data.ParameterDirection.Input37 .ParameterName = "@company" 38 .Value = txtcompany.Text39 End With 40 sqlinsert.Parameters.Add(sqlparacompany)41 42 With sqlparalocation43 .SqlDbType = Data.SqlDbType.NVarChar44 .Direction = Data.ParameterDirection.Input45 .ParameterName = "@location" 46 .Value = txtlocation.Text47 End With 48 sqlinsert.Parameters.Add(sqlparalocation)49 50 With sqlparacontact51 .SqlDbType = Data.SqlDbType.NVarChar52 .Direction = Data.ParameterDirection.Input53 .ParameterName = "@contactname" 54 .Value = txtcontactname.Text55 End With 56 sqlinsert.Parameters.Add(sqlparacontact)57 58 With sqlparaphone59 .SqlDbType = Data.SqlDbType.NVarChar60 .Direction = Data.ParameterDirection.Input61 .ParameterName = "@contactphone" 62 .Value = txtcontactphone.Text63 End With 64 sqlinsert.Parameters.Add(sqlparaphone)65 66 With sqlparadetails67 .SqlDbType = Data.SqlDbType.NVarChar68 .Direction = Data.ParameterDirection.Input69 .ParameterName = "@details" 70 If ddldetails.SelectedValue = "Other" Then 71 .Value = txtreason.Text72 Else 73 .Value = ddldetails.SelectedValue74 End If75 End With 76 sqlinsert.Parameters.Add(sqlparadetails)77 78 With sqlparaso79 .SqlDbType = Data.SqlDbType.NVarChar80 .Direction = Data.ParameterDirection.Input81 .ParameterName = "@serviceorder" 82 .Value = txtserviceorder.Text83 End With 84 sqlinsert.Parameters.Add(sqlparaso)85 86 With sqlparadrive87 .SqlDbType = Data.SqlDbType.NVarChar88 .Direction = Data.ParameterDirection.Input89 .ParameterName = "@drivetime" 90 .Value = ddldrivetime.SelectedValue91 End With 92 sqlinsert.Parameters.Add(sqlparadrive)93 94 With sqlparawork95 .SqlDbType = Data.SqlDbType.NVarChar96 .Direction = Data.ParameterDirection.Input97 .ParameterName = "@worktime" 98 .Value = ddlworktime.SelectedValue99 End With 100 sqlinsert.Parameters.Add(sqlparawork)101 102 With sqlparaback103 .SqlDbType = Data.SqlDbType.NVarChar104 .Direction = Data.ParameterDirection.Input105 .ParameterName = "@backhome" 106 .Value = ddlbackhome.SelectedValue107 End With 108 sqlinsert.Parameters.Add(sqlparaback)109 110 With sqlparaproblem111 .SqlDbType = Data.SqlDbType.NVarChar112 .Direction = Data.ParameterDirection.Input113 .ParameterName = "@typeproblem" 114 .Value = ddlproblem.SelectedValue115 End With 116 sqlinsert.Parameters.Add(sqlparaproblem)117 118 sqlinsert.ExecuteNonQuery()119 120 sqlcon.Close() Specifically it occurs on line 118. Thanks
In my production environment, ALL OF THE SUDDEN, my backups via EM schedule tasks, fail, yet when i examine the error, it says that the DUMP/LOAD was successful. I receive the following error: 'Could not insert a backup or restore history/detail record in msdb.dbo.sysbackuphistory or sysrestore history. This may indicate a problem with the msdb.. . . . . . I expanded the MSDB database, and ran sp_purgehistory (no params) and it still FAILS. Is this related to the log? Please HELP asap. Thank you in advance.
I have a database with a table called RAW, this table receives msgs via XML, sms and various other formats. The data is written into this table at a rate of approximately 50-100 rows per minute.
I have a SP which takes the data written into the raw table and performs various actions looks for account information, writes to a log table, writes to incident table’s gets GPS information and so on.
The records written into the raw table need to be processed at almost instantly with a maximum of under a minute from when they arrive into the table.
At present there is a sql agent job which executes the SP, this consist of a step to execute the SP which on completion moves to the next step which is a loop waitfor delay and then back to step 1.
The trouble is it never actually finishes and runs 24/7 there is no break point for error handling and occasionally the records that arrive in the raw table do not get processed and the job has to be restarted for it to pick them up again.
I am looking for best way to handle this process, I thought about a trigger but the performance impact on using a trigger was too heavy to consider.
- Transactional (5 articles - tables only) Users receive data based on their territory #, therefore they receive their customers sets of data. It happens that customer change from one territory to another but not frequently. When it happens, so far so good, the data is redirected to the new salesrep using the model we configured (Territory table with SUSER_NAME() to filter the data).
Ok, here's my problem. Since a while, I can see in the replication monitor that some users seems to log the same conflict again and again (Merge process). I mean, checking the history for many subscribers, there is always the same number in the "Conflict" colums. As an example: - Merge completed after processing 18 data change(s) (4 insert(s), 14 update(s), 0 delete(s), 31 conflict(s)) - Merge completed after processing 27 data change(s) (10 insert(s), 17 update(s), 0 delete(s), 31 conflict(s)) - Merge completed after processing 20 data change(s) (5 insert(s), 15 update(s), 0 delete(s), 31 conflict(s))
and so on...(Those are only 3 historical entries for a single subscriptions but there are many like that, always with the same count of conflict - vary per user). It appears to me that the same conflicts come over and over.
The thing is that if I decide to reinitialize a subscription, conflicts will disappear, therefore I know that it is not a process on the server that keeps changing the data; anyway, even if it was, changes would be applied on the subscription because the server always win in my setup.
Any idea what should I do with this? Any help would be greatly appreciated. Thanks.
We have an issue with the Version Store growing constantly. According to sys.dm_os_performance_counters, "Version Generation rate (KB/s)" is growing, but "Version Cleanup rate (KB/s)" isn't. We use read-committed snapshot isolation
While dbcc opentran and sys.dm_exec_requests don't show any long running transactions, I wrote a query looking at sys.dm_tran_ active_snapshot_ database_transactions. This shows a number of long running transactions but, according to sys.dm_exec_sessions, they are all sleeping. The transactions that are running come and go very quickly, as I would expect.Could these sleeping transactions be responsible for preventing the version store from cleaning up?
I have a client using SQL 2k, SP2 (due application requirements, SP3 is notan option - the application vendor will not specify why). We are receiving:[Microsoft][ODBC SQL Server Driver]Unknown token received from SQL ServerConnection BrokenThere doesn't appear to be any rhyme or reason as to why this is happening.And...it shows it's ugly head at random places during execution. Has anyoneexperienced this also, or have any ideas on what to look for? I have seennumerous suggestions stating to upgrade from MDAC 2.6 to 2.7. At thispoint, I'm not sure if thats an option based on the vendors application(which by the way they no longer support!).Any ideas will be greatly appreciated.Greg
The log for our SQL 2000 database shows constant "starting up database dbname" entires. Is there a option that causes the databases to constantly be starting or is this a new feature of SQL 2000.
Our report server are constantly getting the below error.
What causes this - I know how to fix it, in fact, I've automated it but why does it constantly happen on some servers? I guess I'd like to know what causes it to try and fix it at those points instead of having to fix it here. Proactively.
Reporting Services Error
The report server cannot decrypt the symmetric key used to access sensitive or encrypted data in a report server database. You must either restore a backup key or delete all encrypted content. Check the documentation for more information. (rsReportServerDisabled) (rsRPCError) Get Online Help
The report server cannot decrypt the symmetric key used to access sensitive or encrypted data in a report server database. You must either restore a backup key or delete all encrypted content. Check the documentation for more information. (rsReportServerDisabled)
The report server cannot decrypt the symmetric key used to access sensitive or encrypted data in a report server database. You must either restore a backup key or delete all encrypted content. Check the documentation for more information. (rsReportServerDisabled)
Trying to set up a tranform task between a mysql db using and ADO.NET connection and sql server. My query to pull from the mysql db is something like "select x,y,z from table where last_updated" > @User::LastUpdated. This command is set up as an expression for the Data Flow Task and is the value for the [DataReader Source].[SqlCommand]
I have two questions.
Why does the package attempt a query against the mysql database all the time? And Why is the query attempting to pull the entire table instead of having any regards for my where clause?
I've even added where last_updated > greatest('2006-08-15', '" + @User::LastUpdated to attempt to get it a where clause even when the parameter isn't set yet.
What is the trick? This is not feasible when pulling from multi-million row tables.
I am sending two messages across servers with in the same transaction but they are received in the incorrect sequence.
Message1 from service1 to service2 on contract1 with RELATED_CONVERSATION_GROUP = 'xxxxxxx' Message2 from service1 to service2 on contract2 with RELATED_CONVERSATION_GROUP = 'xxxxxxx'
Message2 is always received first at the target and is causing our process to fail.
When I check the service2 definition contract2 is specified first. Can this be the issue? I tried to change this order by dropping the contracts from the service and adding again but it still keeps the same order.
I've check out that this error code says: A literal value in the command overflowed the range of the type of the associated column.
I received the error message when inserting large block data into a image column in SQL Server 2000. As I know, image support max 2G data to store. I use the C code function below to insert the data:
in which, the NUM_SAMPLES_SETDBMONITOR*sizeof(float64) stands for the data length by byte. and ,&(pMonitorDBData->SampDat) stands for the pointer address of the data block. (pls note: NUM_SAMPLES_SETDBMONITOR*sizeof(float64) = 4096*8=32768 bytes)
In addation, I've tried to use certain numbers instead of "NUM_SAMPLES_SETDBMONITOR*sizeof(float64)", and I found I could only set this value up to 8003 bytes. If 8003 above, this error message would be received.
What should I do with this issue? Any help? Thanks a million!
From SQL Management Studion I go to Management > Database Mail and I am trying to send a test email but I never receive anything. I checked my SMTP Mail Server Logs and I saw no entry of my test email. I also I checked my SQL Database Mail Logs and everything seems fine, no errors are reported. The msdb.dbo.sysmail_allitems shows my email status as "sent". So what am I missing? What steps would you recommend for troubleshooting my problem? Thank you, Ric
I developed a mass mailing tools, but all mails received in junk and spam folder
I use an store procedure 'sp_send_dbmail' which is by default in sql server, when i send an testing mail using object explorer ->Database mail -> right click -> send testing mails, then this mail received in inbox, but when i call 'sp_send_dbmail' this procedure using job with 2 min intervals then mails received in junk or spam folder of recipients..
I configured correctly all information of smtp details ip address...
i got stuck, while sending emails using store procedure sp_send_dbmail, when i m sending simple text format then mail received in inbox but whenever i m trying to send an html format emails with links of images and href tags mails received in spam.. i store procedure is given below..
Every time I try to edit a Control flow or Data flow task I am getting the following error. My toolbox options are all grayed out also.
TITLE: Microsoft Visual Studio ------------------------------
The service System.Windows.Forms.Design.IUIService could not be located.
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%u00ae+Visual+Studio%u00ae+2005&ProdVer=8.0.50727.42&EvtSrc=Microsoft.DataTransformationServices.Design.SR&EvtID=UnableToLocateService&LinkId=20476
Hello, I'm using SQL service Broker 2005 with ASP.NET 2.0 in order to use the sql cache dependency. everything works fine... I have only a doubt regarding a query that is constantly executed on mu db ( i can see it be means of the SQL Profiler)
The query is: exec sp_executesql N'BEGIN CONVERSATION TIMER ("'') TIMEOUT = 120; WAITFOR(RECEIVE TOP (1) message_type_name, conversation_handle, cast(message_body AS XML) as message_body from [SqlQueryNotificationService-GUID]), TIMEOUT @p2;',N'@p2 int',@p2=60000
The web application is not running from a browser ...
It this ok or I forget to clean/reset something from my web application and/or sql server?
I have 2 DropDownList, the first one to display the product category and the other one to display the products based on the selected category. However, when I run code I received the following error message: Input string was not in a correct format. Please find the code below. Thanks, Andy. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"><title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <div> <asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="SqlDataSource1" DataTextField="Name" DataValueField="Name"> </asp:DropDownList>
when i tried to run a DTS which transfer bulk data between 2 SQL servers, i got following error message: ================================================== ============ Error: -2147467259 (80004005); Provider Error: 4815 (12CF) Error string: Received invalid column length from bcp client. Error source: Microsoft OLE DB Provider for SQL Server Help file: Help context: 0 ================================================== ===========
if anybody has encounter the same problem before? after testing, i think it's must related with network traffic problem. but i can not figure out how to solve it.
I have a confusing situation that I CAN resolve with cursors, BUT cursors are far too performance hungry to be run.
Tables: LogFileIn, LogFileOut,
I want to look on LogFileIn FLI for files that has a NULL LogFileOut(response to LFI) AND dont have any other value.
A file can have multiple LFO's depending on how many times that file gets processed.
It is confusing but bear with me.
Code:
select * from LogFileIn where IdentityFileChar = 'BPRTFILE' and responseLogFileOutId is null
This does pull out a list of files that havent been processed, BUT that same file might have been processed again and succeeded. Therefore the results I get arent accurate.
With the cursor I would have taken the filename from the LFI and used that to check if that filename comes up again in the LFO as processed.
Did you get that? And can you help?? Im confusing myself!
This table records everytime a file is run, so there might be 20 identical LFI's all with different LFO's... Im looking for LFI's that have null, and only Null.
Howdy Folks, Our site has been experiencing this issue for a couple of months now.. Hopefully someone else can assist, as I’ve got to a point where I think issue lies within the application or a Microsoft bug. Web searches have reveled a number installations that have also had this error but its has not revealed an actual fix.
I understand this error code basically means data being returned to the client is getting either corrupted or the data is too large to fit into the buffer on the client side. Client in our case is the terminal server, here after called a application server
As the user base has increased form 5 to 20, I have noticed that the issue is occurring more frequently in comparison to when the company first started using the application /database. Its just about daily now...
The db server also has 8 other db's residing on it - but they are all less than 300 meg.
The attached PowerPoint doc has the trace info & the surrounding code for each process that has suffered a buffer error over a period of a week.
DB Server Environment: Win2000 SP4, SQL2000 SP3a, MDAC 2.7 SP1 refresh. Application Environment: Written In house in VB.NET Framework 1.1 – setup as a published app on a terminal server – running windows 2000 SP4
Common features of the issue, that have been omitted from trace output for visibility reasons are: -Involves 1 particular DB (thats accessed by VB app) & its developement db -All connections are coming from 1 application server -Issue does not relate to any particular site connecting to the application server using this application
I have reviewed & fixed several potential server side causes but this error still is occuring with in the environment:
MDAC versions must be common on application & server: - Removed from equation by updating MDAC version on App server to be the same as DB Server: 2.7 SP1 Refresh
Network related - Considered unlikely; we are also not experiencing network card errors on either server; also all db's would be experiencing connectivity errors.
Which leaves us with Application related options to review: - Compilation error of application - App parameter definitions to stored procedures are the correct data type - Ensure values being passed do not exceed 4000 characters as that has also been known to create this error message - I've asked the developer to review MS KB 827366 article, as it may be a valid test - In regard to MSKB 832977 - I am not using pssdiag & have a later version of the MS Analyzer. But what I thought was interesting, is the statement that this problem occurs more frequently when an application submits a large remote procedure call (RPC) input buffer, especially when the RPC input buffer is greater than or equal to 8 KB. However, this problem may occur even if the input buffer is less than 4 KB - A is using datatypes varchar & char - not nvarchar & nhar
Any assistance with this issue would be appreicated as server performance is being effected - these processes hang around for 1 - 5 mins before terminating (refer duration times in the powerpoint traces)
Hi,I've developed an ASP.NET application which uses MS-SQL Server 2000 as abackend. But as the site hits increase SQL server reponse becomes lower.At some stage after that SQL Server gets automativally stopped bringingcomplete web-application down to halt. i checked the Windows 2000 EventLogs and found several error logs indicating folloowing line."SQL Server 2000 Error 17805 Invalid buffer received from client.". Butno errors on UI side. What may be the actual problem.In storedproceduresor at some other place?Awaiting favourble reply.Regards,Amit*** Sent via Developersdex http://www.developersdex.com ***
what is order in which conditions are processed for sql query i.e for select * from table1, table2 where cond1 and cond2 and cond3 which condition will be processed first (i.e. for optimination purpose condition cutting down max no. of row shud be placed first or last?)
I'm working with SQL Server Reporting Services (SQL Server 2005) I tried to configure a Data-Driven Subscription but the run failed with the error: Done: 1 processed of 1 total; 1 errors.
I cannot find anything into the error log ReportServerService__<datetime>.log located at <Program Files>Microsoft SQL ServerMSSQL.#Reporting ServicesLogFiles.
How can I find useful information about the error message?
Hi,I am attempting a bulk copy from a c program into SQL Server 2000 usingDBLib in freeTDS 0.63 RC11 (gcc 3.4.3, RH 9). I am getting an error messagethat I cannot find any documentation on.The server is sending back the following: "Received invalid row length 2from bcp client. Minimum row size is 4."I know the row is longer 2 bytes (see below). Once this happened I created atest table and C program. See below. Anyone with any ideas?ThanksProgram output ---------------->$ ./test_bcpbcp'ing This is a test with a length of 14sentMsg 4807, Level 16, State 1Server 'CENTIVIA_10', Line 1Received invalid row length 2 from bcp client. Minimum row size is 4.done<----------------------Table ddl --------------------->CREATE TABLE [xxx] ([col2] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL) ON [PRIMARY]GO<------------------------------------Compiled using gcc ------------------->gcc -g -I/home/test_user/dev/freetds-0.63RC11/include -Wall -Wno-strict-aliasing-g -O2 -c -o test_bcp.o test_bcp.cgcc -o test_bcp test_bcp.o -L/home/test_user/lib -lsybdb<----------------------------------program source (included the msg and error handlercode) -------------------------->#include <string.h>#include <stdio.h>#include <stdlib.h>#include <sqldb.h>intsyb_msg_handler(DBPROCESS * dbproc, DBINT msgno, int msgstate, int severity,char *msgtext, char *srvname, char *procname, int line){char var_value[31];int i;char *c;if (msgno == 5701 || /* database context change */msgno == 5703 || /* language changed */msgno == 5704) { /* charset changed */if (msgtext != NULL && (c = strchr(msgtext, ''')) != NULL){i = 0;for (++c; i <= 30 && *c != '