Sp To Send A Message To A User ?
Sep 23, 2006Do you know a stored procedure ( or a query) to send a message to a SQLServer user ?
Something like NET SEND but with a spid user
Thanks
Do you know a stored procedure ( or a query) to send a message to a SQLServer user ?
Something like NET SEND but with a spid user
Thanks
I am having a problem getting informational type messages to display for my end users.
I have a SQL2000 db with a Delfi front end. When I issue either the raiserror or print nothing is displayed inside the app. With raiserror I can get it to display if I make the severity higher than 10. The problem with this is that it stops the app from processing the transaction. This is ok in one case but not with just informational type stuff. Any suggestions? Thanks.
Jim
Hi,
I know that is possible to programmatically send an e-mail with the command xp_sendmail, but i want to know if it's possible to programmatically send a Net Send message.
Martin
I'm trying to figure out how the SQL Agent sends email through jobs using the notification option for operators. I have had little success using SQL mail so I want to use an alternate such as blat. I have not been able to find where the SQL jobs are actually sending the mail. Can someone help please. OI have checked the system stored procedures without suscess. I'm using SQL2000.
Thanks,
Steve
Say i want to send a blob in a message from queue A to queue B. These locations can be geographically different. How can i implement this ?
Also anything which i want to send as a message should be stored in the database. and then I should store it in a variable. this can be used as the message body. am I right ?
Can i send a file as the body of @message
in the extended sp xp_sendmail?
Pls help! thanks for any help.
I understand that SQL Service Broker will RECEIVE messages in the same order of SEND, so long as the messages are on the same conversation.
I would like to accomplish queue-level ordering instead of (or in addition to) conversation-level ordering.
There is a significant business case for this level of ordering. Consider an order processing system which is specified to fulfill orders in the sequence they are received. The reason for the ordering is as follows. Suppose the process(es) that RECEIVEs from the queue is down for several hours and the messages back up in the queue. Various customers place orders throughout this period of time. If more orders are placed than there are quantity for an item, the customers who placed their orders earliest in the day ought to be the ones that receive the merchandise and the later orders should be placed on backorder.
Limited experimentation showed that SQL Server totally disregards the order in which the messages were sent (on different conversations to the same queue).
The potential solution to use the same conversation has some drawbacks:
1. Difficult to do error handling because of the way error handling works in conversations.
2. It is not possible to RECEIVE using multiple threads. (Yes, RECEIVEing on multiple threads also would reorder the messages, but the reorderings would be localized in time so this would be tolerable by a lot of applications. In other words, orders from 1:00 AM would not be mixed with orders from 9:00 AM.)
Can anyone see a good solution to this in the current version?
If there are no good solutions, it would be great if Microsoft considers adding a feature where you can declare an ordering requirement when you CREATE QUEUE. Even support for an "approximate" ordering (messages can rearrange +/- several seconds) would be helpful, but the current way which seems to totally randomize the message order is not good for certain kinds of significant applications.
Hi All
I am stuck in this strange issue since the last two days. I have followed the tutorial to configure the 2 databases to send and receive messages which works. I added my own objects in the DB's also but when I try to send a message to the service I added I get a message:
"Dialog security is unavailable for this conversation because there is no security certificate bound to the database principal (Id: 1). Either create a certificate for the principal, or specify ENCRYPTION = OFF when beginning the conversation."
Security is setup in the same way for my objects as the security specified in the tutorial. The service binding on the initiator and target use the same account as specified in the tutorial. Please help.
Thanks.
I used onError event to send email in case ssis pckage fails
but it send multiple email with errordescription. for ex below are the errordescription of four diferent emails i received.
Thread "WorkThread0" has exited with error code 0xC0047039.
An error occurred with the following error message: "The connection "{01AF859A-CF97-4F6C-9C78-1AA4B1C9C27B}" is not found. This error is thrown by Connections collection when the specific connection element is not found.".
Thread "SourceThread0" has exited with error code 0xC0047038.
The PrimeOutput method on component "Flat File Source - Read from source file" (1) returned error code 0xC0202092. 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.
Can anyone suggest if we can combine all this error description and send this as one email.
Hi All,
I want to send notification to SSRS on change in database for that I am using SSB to send message to SQL Server Reporting Services.
Can I use SSB and if yes, how? Please guide me I am new to this.
Thanks,
Omkar.
Hi Guys,
I have already spent so many days in trying to find a solution to this problem but ..all in vain....
so please help me.
I have to send message to my running .Net [Asp.Net with C#] application from sql server. How can i do it?
We should not use notification services.
Please give me some examples / links.
Thanks in advance!
i have developed a pakage which populates a two different tables with reference to the xml files added to a folder which is watched by a security WMI task.it is governed by a sequence container which contains three for each loop container for working on the different files.i have different event handlers set up inside for each loop container tasks which contains , data flow task, execute sql task, and moving the processed file to the desired destination.i want to set up a send mail task on the package level using event handler on error, where i have set up a task for looging the error to the error table , i have tried to collect all the error messages in a array list variable . and trying to use that variable a s a message source. i could not under stand if i set the propogation variable in the sequence container as false than will the onpost execute event will fire the onpostexecute event handler in the package level.if show how can i send only one email for all the errors of package with error looging.
View 6 Replies View RelatedHello,
Is it possible to send message from SQL Server Express to Applications using it on different machines ?
For example When an important record is inserted or updated, a message appears on Application user's screen.
If yes then how ?
Thanks
hi
I am trying something very simple but cannot see why it is failing.
I am trying to add a filename to the message source of a mail task from a variable.
I have Variable 1 User::CurrentFilePath, Scope = ForEachLoop, Data Type = String
and Variable 2 User::mailSource, Scope = ForEachLoop, Data Type = String
Variable 2 EvaluateAsExpression is set to True and the Expression for now is simply "Processing of File " + [User::CurrentFilePath] + "has Begun"
However when i enter this i get
The expression for variable "Test2" failed evaluation. There was an error in the expression.
In the Value and Value type boxes of the variable property.
Any advice greatly received
Regards
Scott
Hi all, i searched everywhere but couldn't find any info on the following error that i'm currently receiving:
"The conversation endpoint is not in a valid state for SEND. The current endpoint state is 'DI'."
I understand that this is due to some problem in my send/receive protocol but how do i fix this problem so that i can continue with my testing? Right now i'm forced to drop my entire test database and reinstall everytime this message shows up because i can't send/receive any messages at that point. Is there anyway to get rid of it?
Thanks in advance. This is driving me nuts.
Hi when I am performing a merge replication between my PDA (SQL CE) and SQL I get the above message. There is no information about it anywhere.
Any ideas?
Thanks in advance.
Hi,
I have an c# windows service, which is running on the same machine where my mssql server is installed. This service must be informed for each insert/update/delete event on one specific table.
My idea was to create an CLR Trigger for this table which can communicate with this service via .NET remoting. But the problem is, that the system.runtime.remoting assembly is not integrated within the mssql clr enviroment => i can't use remoting.
Are there any other idea's how can i solve this?
Best regards,
Thomas
Can anyone give a quick description of the meaning of this message andwhat needs to be done to get a connection.I'm running DBArtisan with SQLServer 2000 client SP4 installed.I also get the same message with MS Enterprise Manager so this iscoming out of the actual ODBC connection attempt.Thanks in advance!
View 1 Replies View RelatedI've been tasked to create a database diagram, save it and send that db diagram to the user. Now, I am confused as I don't know where sql server stores the db diagram...what is the path where it stores the diagram. How do I export it in case if I need to provide it to the user. How, am I supposed to grant user permission so he himself can create a database diagram.
View 9 Replies View Related/* -------------------------------------------------
The Following Procedure Helps You To
Send a Messge to all Users
those Who Access a Specified Database in a Server
*/
Create Proc Sp_SendMsg
@Msg Varchar(100),
@DbName VarChar(100)
as
if db_id(@DbName) = Null
begin
Print 'DataBase dose not Exist'
end
else
Begin
Declare @spId Varchar(1000)
DECLARE TmpCursor CURSOR FOR
Select 'master..xp_CmdShell ''Net Send ' + rtrim(convert(Varchar(50), HostName))+' "Dear ' + upper(max(rtrim(loginame)))+ space(1) + @Msg + '"''' as spId
from master..SysProcesses
where db_Name(dbID) = @DbName and
spId <> @@SpId
and rtrim(ltrim(HostName)) <> ''
and HostName <> host_Name()
and dbID <> 0
and spId > 50
group by HostName
OPEN TmpCursor
FETCH NEXT FROM TmpCursor
INTO @spId
WHILE @@FETCH_STATUS = 0
BEGIN
Exec (@spId)
FETCH NEXT FROM TmpCursor
INTO @spId
END
CLOSE TmpCursor
DEALLOCATE TmpCursor
end
I have two domains. forest domain abc which has the exchange infrastructure. forest domain xyz which does not have exchange. There is a two way trust set up.
I have set up database mail which sends internally but not externally on the xyz domain its uses mailrelay address to comunicate with exchange. The receive connector is set up correctly on exchange on domain abc as I have managed to send email from a sql server to external contact in the abc domain.
The IP addresses are correct on the receive connector.
The problem is I am unable to send to an external contact from the sql server in the xyz domain. Not sure if this an exchange issue or database mail.
i am aware that only sysadmin can send attachments using sp_send_dbmail. but the problem is, i don wan my application login to have sysadmin role and wan it to be able to send email with attachments using sp_send_dbmail. i'm using a stored procedure to call sp_send_dbmail, anyway can i impersonate sysadmin inside the stored procedure to execute sp_send_dbmail?
any suggestion will be appreciated. thanks.
Hello everybody,I was configuring a SqlDataSource control using SQL Authentication mode.I first added a database file (testdb.mdf) through Solution Explorer-Add New Items. Then through Database Explorer I created a table named "info"Then while configuring the SqlDataSource control I used the SQL Authentication mode and attached the "testdb.mdf" database file.Test Connection showed success. But when I hit the Ok button of the wizard it displayed the following error message:Failed to generate a user instance of SQL Server. Only an integrated connection can generate a user instance.While configuring the SqlDataSource control I clicked "New Connection". Under Data Source section I tried both Microsoft SQL Server and Microsoft SQL Server Database File. And in both the cases I attached a databese file(testdb.mdf). Plz enlighten me on this.Thanks and Regards,Sankar.
View 1 Replies View RelatedHi,
I have added interactive sort to report. When i perform the sort in the preview of the report, i see a message 'Report is being generated'. But when i do the sorting from Report viewer control, the screen goes blank before the sorted data comes up.
Is there any way I can display a message telling sorting is in progress?
Any help in this regard is appreciated.
Thanks.
how can i make a customized error message for a wrong input of parameters?
let's say i have a parameter which requires user input of companyID and it should compose of all numbers only. if not followed an error message will be prompted to the user... "please enter numbers only..." or something like that...
please... just wondering if its possible...
Ok so I'm using the Management Studio Express and was able to log in and get into the database server, but I had to click the "options>>" button and change database I wanted to connect to from <<default>> to my database on the server or else I get the "cannot open user database, login failed" error message.Then I right click my database and it gives me the "Cannot open user database. Login failed" error message, even though I already connected to the database to login during the connect screen. Also I'm able to interact with the database using SQL QUERIES in the Management Studio, like adding new tables with it, but if I right click the database and click "add table" I get that error.What gives? I know I have permission since I was able to log on, and modify the database using SQL queries but if use the GUI I can't use it. I can't even right-click select "properties" without getting that error. The reason I want to use the GUI is because I want to right click and use the backup feature of the database.My guess is that Management Studio continues to point to the default database(which gives me that message) after I already logged in, so I have no idea how to change the default database that management studio points to, to the one I do have permission to use. Thanks in advance.
View 1 Replies View RelatedHi,I am using sql server 2005 and i am having table with a column which has unique key constraint.So if the user tries to enter the duplicate value for that particular column and try to save it ,it errors out in runtime..how do i raise the user friendly error message in this DB error, when user tries to save it.Thanks
View 9 Replies View Related
Hi all,
I have a SSIS package that copies data from one database, into another, makes a backup, and then FTP's up the backup to a web server. In Sql Server I've made a job to run the package and a Stored procedure to activate the job from an Access database front-end.
Can anyone tell me how I might return a success/failure message to my access user?
Thanks
Melt
I would like to password protect my MS Access Database which is being exported to from SQL 2000 using DTS, but when I password protect it, I get an error message stating "The workgroup information file is missing or opened exclusively by another user". The ACCESS file has to be opened exclusively to add password protection. Any suggestions?
View 1 Replies View RelatedHi Im getting the following error when trying to connect to a php page...any ideas
message: Login failed for user 'NT AUTHORITYNETWORK SERVICE'. (severity 14)
I notice when I copy an SSIS package 'A' to a new package 'B', the new package 'B' will generate a "login failed for user" message in the data flow components. To copy I "save copy of Package 'A' as."
Some config info:
Package ProtectionLevel = EncryptSensitiveWithPassword
Connections are Data Sources
Connection strings with password are stored using PackageConfigurations to an SQLServer table. I've verified Package 'A' is in fact using the config table (e.g. it is not using a password or user stored in the package)
Data connectios are all SQLServer Native OLE DB Client
The account is an SQLServer account (not integrated security)
The original Package 'A' works flawlessly and I get success when I test the connections in Package 'B'.
But executing package 'B' I get: The error message I get is: [Connection manager "MyConnection"] Error: An OLE DB error has occurred. Error code: 0x80040E4D. An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80040E4D Description: "Login failed for user 'dwuser'.".
Does anyone know why this would occur and/or how to work around it? I saw another thread where a potential workaround is to create a new data flow task and copy all the data flow components to that task. That won't work well for us because the data flow is moderately complex and when you copy and paste it, SSIS completely re-orders the layout.
This is a typical data warehouse ETL setup where there is a master package that executes child packages (e.g. 'A', and 'B' mentioned above) that each perform the ETL for a specific dimension or fact table.
Thanks for any help,
Lee Cascio
Issue #1 I have a report that takes 8 character parameter, A error message needs to popped out if user enters parameter less than 8 character.
Issue #2 I have a report with Tablix. A message needs to display if Tablix returns no Rows.
What I am trying to do, Extract the data from SQL table and Insert in Email Body and email to user. I got good article on Internet, I follow all steps as it is, but still I am getting error.
Here is the link : [URL] ....
But I am getting Error:
Error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
at System.Text.StringBuilder.AppendFormat(IFormatProvider provider, String format, Object[] args)
at System.String.Format(IFormatProvider provider, String format, Object[] args)
at ST_7f59d09774914001b60a99a90809d5c5.csproj.ScriptMain.Main()
[Code] ....