Showing posts with label message. Show all posts
Showing posts with label message. Show all posts

Wednesday, March 28, 2012

How do I know where my message come from

I have a service broker service and there are multiple clients that can put messages in the queue of that service. How do I check which message comes from which client? There is no field in the queue like message_senderId or something like that.

If all you need is to send back replies, then is not necesary too know the sender of the message. Simply send back replies on the conversation_handle received and they'll reach the sender.

If you need to know for other reasons, look up sys.conversation_endpoints by the conversation_handle of the received message. It contains the far_fervice and far_broker_instance fields, that are the name of the service that sent the message and the service_broker_guid of the database that hosts that service.

HTH,
~ Remus

sql

Monday, March 26, 2012

How do I know If someone has posted new post (message)

Can anyone tell me , For instance : if someone has posted new post and If I want to answer to that post, how can I answer that. Or How do I know that there is some new post which people can response to it, please give me your feed back on this

thank you

How do I know If someone has posted new post (message). Please help me out on this I am new to this forum.|||

You can subscribe to the RSS Feed for the forum with something like NewsGator (which is free).

NewsGator Online

http://www.newsgator.com/ngs/subscriber/beta.aspx

RSS Feed

http://forums.microsoft.com/MSDN/rss.aspx?ForumID=93&Mode=0&SiteID=1

|||All the new posts sort to the top by default. You can also do filtered searches.|||To post a response (or answer), just click on the [Reply] button. You will be asked to 'register' if you have not previously registered to use the forum.

How do I keep a report from automatically running?

This is a multi-part message in MIME format.
--=_NextPart_000_000A_01C75C1E.0326B0B0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Perhaps this is just behavior in the dev environment, but if I provide = default values for all of my paramters, the report runs automatically = when I switch to preview.
Is there a way to provide defaults, but still require the user to click = view before the report runs?
Thanks.
--=_NextPart_000_000A_01C75C1E.0326B0B0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&
Perhaps this is just behavior in the = dev environment, but if I provide default values for all of my paramters, = the report runs automatically when I switch to preview.

Is there a way to provide defaults, but = still require the user to click view before the report runs?

Thanks.
--=_NextPart_000_000A_01C75C1E.0326B0B0--On Mar 1, 5:23 pm, <rlrc...@.newsgroups.nospam> wrote:
> Perhaps this is just behavior in the dev environment, but if I provide default values for all of my paramters, the report runs automatically when I switch to preview.
> Is there a way to provide defaults, but still require the user to click view before the report runs?
> Thanks.
As far as I know, there is not a way to keep the report from
automatically running without removing at least one of the parameter's
default values.
Regards,
Enrique Martinez
Sr. SQL Server Developer|||You can probably create a parameter and hide it...and then not provide it
default value.
-
HelpSeeker
"rlrcstr@.newsgroups.nospam" wrote:
> Perhaps this is just behavior in the dev environment, but if I provide default values for all of my paramters, the report runs automatically when I switch to preview.
> Is there a way to provide defaults, but still require the user to click view before the report runs?
> Thanks|||Hi rlrcstr,
How is everything going? Please feel free to let me know if you need any
assistance.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.

Friday, March 23, 2012

How do I insert CR/LF - CHAR(13) does not work

I need to send some long emails, problem is when I send a long body text CDO breaks up the message with spaces in the middle of words. I read on this forum the solution would be to insert CR/LF into the message so that CDO would not have to break it up at every 1k of text. I have tried using CHAR(13) as BOL suggests, but this is not doing as intended, it inserts a space and not the CR/LF I need.

Any suggestions how to insert CR/LF or why my installation is not responding to CHAR(13) is there some other escape code I could use?Char(10) ?|||An ASCII cr/lf is hexidecimal 0D0A. You could declare a char(2) variable and set it to 0x0D0A, then concatinate it to the string at your desired break points.

<code>
declare @.crlf char(2)
select @.crlf = 0x0D0A

</code>

HTH

Tom|||Hmmm, seems to work, my bad - I guess the results in QA are not accurate, but in the email the CR/LF exists.

Wednesday, March 21, 2012

How do I go to line number referenced in SQL error message

I get a SQL error message like:
Server: Msg 7391, Level 16, State 1, Procedure sp_MyProc, Line 205
So I open up the stored proc with sp_helptext and select Edit | GoTo Line
205 in the results pane. Given the error, I would expect to see a linked
server reference on this line. However, I am on BEGIN of an IF statement
block.
How can I relate the actual stored proc line number with the line number
referenced in the error message?It is normally off by one or two lines, but begin counting at the create
proc command, NOT at the beginning of your script which might have (If
exists, drop, etc.)
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
(Please respond only to the newsgroup.)
I support the Professional Association for SQL Server ( PASS) and it's
community of SQL Professionals.
"Dave" <dave@.nospam.ru> wrote in message
news:ePOQEdTQFHA.2348@.tk2msftngp13.phx.gbl...
> I get a SQL error message like:
> Server: Msg 7391, Level 16, State 1, Procedure sp_MyProc, Line 205
> So I open up the stored proc with sp_helptext and select Edit | GoTo Line
> 205 in the results pane. Given the error, I would expect to see a linked
> server reference on this line. However, I am on BEGIN of an IF statement
> block.
> How can I relate the actual stored proc line number with the line number
> referenced in the error message?
>|||You can use the Debugger in Query Analyzer. Right-click on the SP in
the Object Browser and click Debug.
--
David Portas
SQL Server MVP
--

Friday, March 9, 2012

How do I find out what caused a deadlock?

I got an error message from my customer saying that once, during the night,
when executing a report it got an error message that stopped the application
the extended error was
Transaction (Process ID 57) was deadlocked on lock resources with another
process and has been chosen as the deadlock victim. Rerun the transaction.
Thats fine but It was an untrapped error that required a stop and start of
the application and its the first time it occured in seven years of running
this app. The app is a report, so everyting is read-only, there are no
record editing or creations involved, so how can it create a deadlock?
To answer these questions I think I need to know what the conditions were
that created the deadlock, I think that may be possible looking through the
transaction log of sql server, but how do I do that? When I looked under
administration logs in the sql server explorer all I saw was basically the
logs of the backups , but no place where I could find what transact sql
statement executed at what time with what results. Is there a way to find
this out or is that info lost after commandes execute?
Thanks for your help,
Bob
Here is a start
http://support.microsoft.com/default...b;en-us;832524
Denis the SQL Menace
http://sqlservercode.blogspot.com/
|||Thanks Denis
"SQL" <denis.gobo@.gmail.com> wrote in message
news:1144345622.731620.232190@.v46g2000cwv.googlegr oups.com...
> Here is a start
> http://support.microsoft.com/default...b;en-us;832524
> Denis the SQL Menace
> http://sqlservercode.blogspot.com/
>

How do I find out what caused a deadlock?

I got an error message from my customer saying that once, during the night,
when executing a report it got an error message that stopped the application
the extended error was
Transaction (Process ID 57) was deadlocked on lock resources with another
process and has been chosen as the deadlock victim. Rerun the transaction.
Thats fine but It was an untrapped error that required a stop and start of
the application and its the first time it occured in seven years of running
this app. The app is a report, so everyting is read-only, there are no
record editing or creations involved, so how can it create a deadlock?
To answer these questions I think I need to know what the conditions were
that created the deadlock, I think that may be possible looking through the
transaction log of sql server, but how do I do that? When I looked under
administration logs in the sql server explorer all I saw was basically the
logs of the backups , but no place where I could find what transact sql
statement executed at what time with what results. Is there a way to find
this out or is that info lost after commandes execute?
Thanks for your help,
BobHere is a start
http://support.microsoft.com/default.aspx?scid=kb;en-us;832524
Denis the SQL Menace
http://sqlservercode.blogspot.com/|||Thanks Denis
"SQL" <denis.gobo@.gmail.com> wrote in message
news:1144345622.731620.232190@.v46g2000cwv.googlegroups.com...
> Here is a start
> http://support.microsoft.com/default.aspx?scid=kb;en-us;832524
> Denis the SQL Menace
> http://sqlservercode.blogspot.com/
>

How do I find out what caused a deadlock?

I got an error message from my customer saying that once, during the night,
when executing a report it got an error message that stopped the application
the extended error was
Transaction (Process ID 57) was deadlocked on lock resources with another
process and has been chosen as the deadlock victim. Rerun the transaction.
Thats fine but It was an untrapped error that required a stop and start of
the application and its the first time it occured in seven years of running
this app. The app is a report, so everyting is read-only, there are no
record editing or creations involved, so how can it create a deadlock?
To answer these questions I think I need to know what the conditions were
that created the deadlock, I think that may be possible looking through the
transaction log of sql server, but how do I do that? When I looked under
administration logs in the sql server explorer all I saw was basically the
logs of the backups , but no place where I could find what transact sql
statement executed at what time with what results. Is there a way to find
this out or is that info lost after commandes execute?
Thanks for your help,
BobHere is a start
http://support.microsoft.com/defaul...kb;en-us;832524
Denis the SQL Menace
http://sqlservercode.blogspot.com/|||Thanks Denis
"SQL" <denis.gobo@.gmail.com> wrote in message
news:1144345622.731620.232190@.v46g2000cwv.googlegroups.com...
> Here is a start
> http://support.microsoft.com/defaul...kb;en-us;832524
> Denis the SQL Menace
> http://sqlservercode.blogspot.com/
>