Prevent Email Authentication
Due to the 'interesting' set up of AD, email etc we are unable to send reports as attachments.
It would appear that it is trying to authenticate the user to see if they have permission to view the report, as though they were viewing it in real time.
Is there any way to override this behaviour?
If not then all we can do is email them a link to the report, which sort of defeats the object.
View Complete Forum Thread with Replies
Related Forum Messages:
Prevent Empty Reports From Being Sent To Email
I'm using (SQL RS 2005) data-driven subscription with Delivery by: Email. How do I prevent that an E-mail is sent when the result set is empty? (I don't wan't to do this in the select statment where I select my subscribers and parameters for the report)
View Replies !
Report Server Authentication Errors (custom Security Authentication)
This has been plauging us for a year now and still haven't figured it out. We wrote a custom authentication extension based completely off the example code MS provided with SQL Server 2005. We upgraded to SP2 thinking it might fix the problem. Nope... here is what happens... you go to our server and there is a pause for about 5 seconds then the login page shows up I login with a user and pass then it just sits there with the loading icon spinning in IE. Eventually (this happens every time!) it comes back with Code Block "The report server is not responding. Verify that the report server is running and can be accessed from this computer. " If you refresh that page it loads fine! ok seems odd... went ot the LogFiles folder and there is a minidump and a bunch of logs around the time that happened. Open ReportServerWebApp's log file and I get this Code Block Microsoft SQL Server Reporting Services Version 9.00.3161.00 en-US Eastern Daylight Time C:Program FilesMicrosoft SQL ServerMSSQL.3Reporting ServicesLogFilesReportServerWebApp__10_31_2007_13_49_48.log NODEC Microsoft Windows NT 5.2.3790 Service Pack 2 5.2.3790.131072 w3wp!library!1!10/31/2007-13:49:49:: i INFO: Initializing MaxActiveReqForOneUser to '20' requests(s) as specified in Configuration file. w3wp!library!1!10/31/2007-13:49:49:: i INFO: Initializing MaxScheduleWait to default value of '1' second(s) because it was not specified in Configuration file. w3wp!library!1!10/31/2007-13:49:49:: i INFO: Initializing DatabaseQueryTimeout to default value of '30' second(s) because it was not specified in Configuration file. w3wp!library!1!10/31/2007-13:49:49:: i INFO: Initializing ProcessRecycleOptions to default value of '0' because it was not specified in Configuration file. w3wp!library!1!10/31/2007-13:49:49:: i INFO: Initializing RunningRequestsScavengerCycle to default value of '30' second(s) because it was not specified in Configuration file. w3wp!library!1!10/31/2007-13:49:49:: i INFO: Initializing RunningRequestsDbCycle to default value of '30' second(s) because it was not specified in Configuration file. w3wp!library!1!10/31/2007-13:49:49:: i INFO: Initializing RunningRequestsAge to default value of '30' second(s) because it was not specified in Configuration file. w3wp!library!1!10/31/2007-13:49:49:: i INFO: Initializing CleanupCycleMinutes to default value of '10' minute(s) because it was not specified in Configuration file. w3wp!library!1!10/31/2007-13:49:49:: i INFO: Initializing DailyCleanupMinuteOfDay to default value of '120' minutes since midnight because it was not specified in Configuration file. w3wp!library!1!10/31/2007-13:49:49:: i INFO: Initializing WatsonFlags to default value of '1064' because it was not specified in Configuration file. w3wp!library!1!10/31/2007-13:49:49:: i INFO: Initializing WatsonDumpOnExceptions to default value of 'Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException,Microsoft.ReportingServices.Modeling.InternalModelingException' because it was not specified in Configuration file. w3wp!library!1!10/31/2007-13:49:49:: i INFO: Initializing WatsonDumpExcludeIfContainsExceptions to default value of 'System.Data.SqlClient.SqlException,System.Threading.ThreadAbortException' because it was not specified in Configuration file. w3wp!library!1!10/31/2007-13:49:49:: i INFO: Initializing SecureConnectionLevel to default value of '1' because it was not specified in Configuration file. w3wp!library!1!10/31/2007-13:49:49:: i INFO: Initializing DisplayErrorLink to 'True' as specified in Configuration file. w3wp!library!1!10/31/2007-13:49:49:: i INFO: Initializing WebServiceUseFileShareStorage to default value of 'False' because it was not specified in Configuration file. w3wp!ui!1!10/31/2007-13:49:57:: e ERROR: The report server is not responding. Verify that the report server is running and can be accessed from this computer. w3wp!ui!1!10/31/2007-13:49:57:: e ERROR: HTTP status code --> 500 -------Details-------- Microsoft.ReportingServices.UI.Global+RSWebServiceWrapper+CantCommunicateWithReportServerException: The report server is not responding. Verify that the report server is running and can be accessed from this computer. at Microsoft.ReportingServices.UI.Global.RSWebServiceWrapper.GetSecureMethods() at Microsoft.SqlServer.ReportingServices2005.RSConnection.IsSecureMethod(String methodname) at Microsoft.SqlServer.ReportingServices2005.RSConnection.ValidateConnection() at Microsoft.ReportingServices.UI.Global.SecureAllAPI() at Microsoft.ReportingServices.UI.ReportingPage.EnsureHttpsLevel(HttpsLevel level) at Microsoft.ReportingServices.UI.ReportingPage.ReportingPage_Init(Object sender, EventArgs args) at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Web.UI.Control.OnInit(EventArgs e) at System.Web.UI.Page.OnInit(EventArgs e) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) w3wp!ui!1!10/31/2007-13:49:59:: e ERROR: Exception in ShowErrorPage: System.Threading.ThreadAbortException: Thread was being aborted. at System.Threading.Thread.AbortInternal() at System.Threading.Thread.Abort(Object stateInfo) at System.Web.HttpResponse.End() at Microsoft.ReportingServices.UI.ReportingPage.ShowErrorPage(String errMsg) at at System.Threading.Thread.AbortInternal() at System.Threading.Thread.Abort(Object stateInfo) at System.Web.HttpResponse.End() at Microsoft.ReportingServices.UI.ReportingPage.ShowErrorPage(String errMsg) Clearly showing there is an error that the server isn't responding... ok more log info on this in the SQLDmp log file that says Code Block Microsoft SQL Server Reporting Services Version 9.00.3161.00 en-US Eastern Daylight Time C:Program FilesMicrosoft SQL ServerMSSQL.3Reporting ServicesLogFilesReportServer__10_31_2007_13_53_27.log NODEC Microsoft Windows NT 5.2.3790 Service Pack 2 5.2.3790.131072 w3wp!webserver!6!10/31/2007-13:53:27:: i INFO: Reporting Web Server started w3wp!library!6!10/31/2007-13:53:27:: i INFO: Initializing ConnectionType to '0' as specified in Configuration file. w3wp!library!6!10/31/2007-13:53:27:: i INFO: Initializing IsSchedulingService to 'True' as specified in Configuration file. w3wp!library!6!10/31/2007-13:53:27:: i INFO: Initializing IsNotificationService to 'True' as specified in Configuration file. w3wp!library!6!10/31/2007-13:53:27:: i INFO: Initializing IsEventService to 'True' as specified in Configuration file. w3wp!library!6!10/31/2007-13:53:27:: i INFO: Initializing PollingInterval to '10' second(s) as specified in Configuration file. w3wp!library!6!10/31/2007-13:53:27:: i INFO: Initializing WindowsServiceUseFileShareStorage to 'False' as specified in Configuration file. w3wp!library!6!10/31/2007-13:53:27:: i INFO: Initializing MemoryLimit to '60' percent as specified in Configuration file. w3wp!library!6!10/31/2007-13:53:27:: i INFO: Initializing RecycleTime to '720' minute(s) as specified in Configuration file. w3wp!library!6!10/31/2007-13:53:27:: i INFO: Initializing MaximumMemoryLimit to '80' percent as specified in Configuration file. w3wp!library!6!10/31/2007-13:53:27:: i INFO: Initializing MaxAppDomainUnloadTime to '30' minute(s) as specified in Configuration file. w3wp!library!6!10/31/2007-13:53:27:: i INFO: Initializing MaxQueueThreads to '0' thread(s) as specified in Configuration file. w3wp!library!6!10/31/2007-13:53:27:: i INFO: Initializing IsWebServiceEnabled to 'True' as specified in Configuration file. w3wp!library!6!10/31/2007-13:53:27:: i INFO: Initializing MaxActiveReqForOneUser to '20' requests(s) as specified in Configuration file. w3wp!library!6!10/31/2007-13:53:27:: i INFO: Initializing MaxScheduleWait to '5' second(s) as specified in Configuration file. w3wp!library!6!10/31/2007-13:53:27:: i INFO: Initializing DatabaseQueryTimeout to '120' second(s) as specified in Configuration file. w3wp!library!6!10/31/2007-13:53:27:: i INFO: Initializing ProcessRecycleOptions to '0' as specified in Configuration file. w3wp!library!6!10/31/2007-13:53:27:: i INFO: Initializing RunningRequestsScavengerCycle to '60' second(s) as specified in Configuration file. w3wp!library!6!10/31/2007-13:53:27:: i INFO: Initializing RunningRequestsDbCycle to '60' second(s) as specified in Configuration file. w3wp!library!6!10/31/2007-13:53:27:: i INFO: Initializing RunningRequestsAge to '30' second(s) as specified in Configuration file. w3wp!library!6!10/31/2007-13:53:27:: i INFO: Initializing CleanupCycleMinutes to '10' minute(s) as specified in Configuration file. w3wp!library!6!10/31/2007-13:53:27:: i INFO: Initializing DailyCleanupMinuteOfDay to default value of '120' minutes since midnight because it was not specified in Configuration file. w3wp!library!6!10/31/2007-13:53:27:: i INFO: Initializing WatsonFlags to '1064' as specified in Configuration file. w3wp!library!6!10/31/2007-13:53:27:: i INFO: Initializing WatsonDumpOnExceptions to 'Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException,Microsoft.ReportingServices.Modeling.InternalModelingException' as specified in Configuration file. w3wp!library!6!10/31/2007-13:53:27:: i INFO: Initializing WatsonDumpExcludeIfContainsExceptions to 'System.Data.SqlClient.SqlException,System.Threading.ThreadAbortException' as specified in Configuration file. w3wp!library!6!10/31/2007-13:53:27:: i INFO: Initializing SecureConnectionLevel to '0' as specified in Configuration file. w3wp!library!6!10/31/2007-13:53:27:: i INFO: Initializing DisplayErrorLink to 'True' as specified in Configuration file. w3wp!library!6!10/31/2007-13:53:27:: i INFO: Initializing WebServiceUseFileShareStorage to 'False' as specified in Configuration file. w3wp!resourceutilities!6!10/31/2007-13:53:27:: i INFO: Reporting Services starting SKU: Standard w3wp!resourceutilities!6!10/31/2007-13:53:27:: i INFO: Evaluation copy: 0 days left w3wp!resourceutilities!6!10/31/2007-13:53:27:: i INFO: Running on 2 physical processors, 4 logical processors w3wp!runningjobs!6!10/31/2007-13:53:27:: i INFO: Database Cleanup (Web Service) timer enabled: Next Event: 600 seconds. Cycle: 600 seconds w3wp!runningjobs!6!10/31/2007-13:53:27:: i INFO: Running Requests Scavenger timer enabled: Next Event: 60 seconds. Cycle: 60 seconds w3wp!runningjobs!6!10/31/2007-13:53:27:: i INFO: Running Requests DB timer enabled: Next Event: 60 seconds. Cycle: 60 seconds w3wp!runningjobs!6!10/31/2007-13:53:27:: i INFO: Memory stats update timer enabled: Next Event: 60 seconds. Cycle: 60 seconds w3wp!library!6!10/31/2007-13:53:27:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details., ; Info: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details. ---> System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.ReportingServices.WebServer.WebServiceHelper.ConstructRSServiceObjectFromSecurityExtension() at Microsoft.ReportingServices.WebServer.Global.ConstructRSServiceFromRequest(String item) at Microsoft.ReportingServices.WebServer.Global.get_Service() at Microsoft.ReportingServices.WebServer.Global.DispatchRequest(Boolean& transferedToViewerPage) at Microsoft.ReportingServices.WebServer.Global.Application_AuthenticateRequest(Object sender, EventArgs e) --- End of inner exception stack trace --- says there is a ReportingServices.Diagnostics.Utilities.InternalCatalogException, well when I step through the code in the debugger this happens in a region I can not step through... and in my IIS logs I have this Code Block2007-10-31 17:54:30 W3SVC1 10.10.2.15 GET /reports/Pages/Folder.aspx - 80 - 10.10.9.16 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.1;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.04506.30;+.NET+CLR+1.1.4322;+.NET+CLR+3.0.04506.590;+.NET+CLR+3.5.20706) 302 0 0 2007-10-31 17:54:32 W3SVC1 10.10.2.15 GET /Reports/Pages/UILogon.aspx ReturnUrl=http%3a%2f%2freschsql%2freports%2fPages%2fFolder.aspx 80 - 10.10.9.16 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.1;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.04506.30;+.NET+CLR+1.1.4322;+.NET+CLR+3.0.04506.590;+.NET+CLR+3.5.20706) 200 0 0 2007-10-31 18:01:10 W3SVC1 10.10.2.15 POST /reportserver/ReportService2005.asmx - 80 - 10.10.2.15 - 500 0 0 2007-10-31 18:01:10 W3SVC1 10.10.2.15 POST /Reports/Pages/UILogon.aspx ReturnUrl=http%3a%2f%2freschsql%2freports%2fPages%2fFolder.aspx 80 - 10.10.9.16 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.1;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.04506.30;+.NET+CLR+1.1.4322;+.NET+CLR+3.0.04506.590;+.NET+CLR+3.5.20706) 200 0 0 2007-10-31 18:01:41 W3SVC1 10.10.2.15 POST /reportserver/ReportService2005.asmx - 80 - 10.10.2.15 - 200 0 0 2007-10-31 18:01:41 W3SVC1 10.10.2.15 POST /Reports/Pages/UILogon.aspx ReturnUrl=http%3a%2f%2freschsql%2freports%2fPages%2fFolder.aspx 80 - 10.10.9.16 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.1;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.04506.30;+.NET+CLR+1.1.4322;+.NET+CLR+3.0.04506.590;+.NET+CLR+3.5.20706) 302 0 0 2007-10-31 18:01:47 W3SVC1 10.10.2.15 POST /ReportServer/ReportService2005.asmx - 80 - 10.10.2.15 - 500 0 0 2007-10-31 18:02:23 W3SVC1 10.10.2.15 POST /ReportServer/ReportService2005.asmx - 80 - 10.10.2.15 - 500 0 0 2007-10-31 18:02:24 W3SVC1 10.10.2.15 GET /reports/Pages/Folder.aspx - 80 - 10.10.9.16 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.1;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.04506.30;+.NET+CLR+1.1.4322;+.NET+CLR+3.0.04506.590;+.NET+CLR+3.5.20706) 302 0 0 2007-10-31 18:02:25 W3SVC1 10.10.2.15 GET /Reports/Pages/UILogon.aspx ReturnUrl=http%3a%2f%2freschsql%2freports%2fPages%2fFolder.aspx 80 - 10.10.9.16 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.1;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.04506.30;+.NET+CLR+1.1.4322;+.NET+CLR+3.0.04506.590;+.NET+CLR+3.5.20706) 200 0 0 Anyone have ANY idea of what is going on here? This is really a big problem for production code to lag and throw back timeout errors everytime someone wants to run a report. Thanks!
View Replies !
Mass Email: Text Body Keeps Looping In Each Email
First off, my server uses CDO, the updated version of CDONTS, to send mail. The script works however, it sends the emails out and keeps looping the message body within the text of the email. here's an example: I added fake users to my table called REALTORS. this was the result of the email sent out: <!-- START EMAIL MAIL OUT --> I am an realtor in Florida and I found you from surfing around Poop Title http://www.poop.com I have a real estate site and I am interested in exchanging links with your site. This is benefitial to you and I because each external website that links to your page counts as a "vote" for your website. The more links to your site, the better search engine placement you will recieve in google (it's called Google PageRank)...which ultimately means more exposure. It's a win/win situation. If you are interested, you may add your website to my link directory at the address below (it's all automated). Make sure to pick your correct category and sub-categories: http://www.realestate321.com/resources/resources.asp Once added you will be placed in a "holding bin" waiting to be approved. Your site will be approved when I find a link on your website to my website. My website will send out a "robot" once a month to make sure that my link is still on your site. If it's not understandably, your link will be removed from my page by that robot. Best Regards, Nick McGirr Real Estate Agent http://www.realestate321.com/ "Buying and Selling Homes in the (321) Area Code."I am an realtor in Florida and I found you from surfing around Haha titleage http://www.hahaha.com I have a real estate site and I am interested in exchanging links with your site. This is benefitial to you and I because each external website that links to your page counts as a "vote" for your website. The more links to your site, the better search engine placement you will recieve in google (it's called Google PageRank)...which ultimately means more exposure. It's a win/win situation. If you are interested, you may add your website to my link directory at the address below (it's all automated). Make sure to pick your correct category and sub-categories: http://www.realestate321.com/resources/resources.asp Once added you will be placed in a "holding bin" waiting to be approved. Your site will be approved when I find a link on your website to my website. My website will send out a "robot" once a month to make sure that my link is still on your site. If it's not understandably, your link will be removed from my page by that robot. Best Regards, Nick McGirr Real Estate Agent http://www.realestate321.com/ "Buying and Selling Homes in the (321) Area Code."I am an realtor in Florida and I found you from surfing around niclipse . com http://www.niclipse.com I have a real estate site and I am interested in exchanging links with your site. This is benefitial to you and I because each external website that links to your page counts as a "vote" for your website. The more links to your site, the better search engine placement you will recieve in google (it's called Google PageRank)...which ultimately means more exposure. It's a win/win situation. If you are interested, you may add your website to my link directory at the address below (it's all automated). Make sure to pick your correct category and sub-categories: http://www.realestate321.com/resources/resources.asp Once added you will be placed in a "holding bin" waiting to be approved. Your site will be approved when I find a link on your website to my website. My website will send out a "robot" once a month to make sure that my link is still on your site. If it's not understandably, your link will be removed from my page by that robot. Best Regards, Nick McGirr Real Estate Agent http://www.realestate321.com/ "Buying and Selling Homes in the (321) Area Code."I am an realtor in Florida and I found you from surfing around. I have a real estate site and I am interested in exchanging links with your site. This is benefitial to you and I because each external website that links to your page counts as a "vote" for your website. The more links to your site, the better search engine placement you will recieve in google (it's called Google PageRank)...which ultimately means more exposure. It's a win/win situation. If you are interested, you may add your website to my link directory at the address below (it's all automated). Make sure to pick your correct category and sub-categories: http://www.realestate321.com/resources/resources.asp Once added you will be placed in a "holding bin" waiting to be approved. Your site will be approved when I find a link on your website to my website. My website will send out a "robot" once a month to make sure that my link is still on your site. If it's not understandably, your link will be removed from my page by that robot. Best Regards, Nick McGirr Real Estate Agent http://www.realestate321.com/ "Buying and Selling Homes in the (321) Area Code." <!--[==-- EMAIL MAIL OUT FINISHED -------> ANY IDEAS ON HOW TO SEND EACH EMAIL TO EACH USER INDIVIDUALLY WHILE USING THE INFORMATION LINKED IN THE DATABASE WITHOUT LOOPING OTHER PEOPLE'S DB INFO IN THE SAME EMAIL? Here's the script below.... <title>Email The List</title> <% nickemail = request.form("sender") subject = request.form("subject") If Len(subject) > 0 Then dsn="Provider=SQLOLEDB;Data Source=sql.string.com, etc ect" Set Conn = Server.CreateObject("ADODB.Connection") Conn.Open dsn Set RS = Server.CreateObject("ADODB.Recordset") SQL = "SELECT title, url, email FROM Realtors" RS.open SQL, conn Do While NOT RS.eof strTXT = strTXT & "I am an realtor in Florida and I found you from surfing around" If Len(RS("title")) > 0 Then strTXT = strTXT & vbcrlf & vbcrlf & RS("title") & vbcrlf strTXT = strTXT & RS("url") & vbcrlf & vbcrlf Else strTXT = strTXT & "." & vbcrlf & vbcrlf End If strTXT = strTXT & "I have a real estate site and I am interested in exchanging links with your site. This is benefitial to you and I because each external website that links to your page counts as a ""vote"" for your website. The more links to your site, the better search engine placement you will recieve in google (it's called Google PageRank)...which ultimately means more exposure. It's a win/win situation." &vbcrlf &vbcrlf strTXT = strTXT & "If you are interested, you may add your website to my link directory at the address below (it's all automated). Make sure to pick your correct category and sub-categories:" &vbcrlf strTXT = strTXT & "http://www.realestate321.com/resources/resources.asp" & vbcrlf strTXT = strTXT & "Once added you will be placed in a ""holding bin"" waiting to be approved. Your site will be approved when I find a link on your website to my website. My website will send out a ""robot"" once a month to make sure that my link is still on your site. If it's not understandably, your link will be removed from my page by that robot." & vbcrlf &vbcrlf strTXT = strTXT & "Best Regards," & vbcrlf & vbcrlf strTXT = strTXT & "Nick McGirr" & vbcrlf strTXT = strTXT & "Real Estate Agent" & vbcrlf strTXT = strTXT & "http://www.realestate321.com/" & vbcrlf strTXT = strTXT & """Buying and Selling Homes in the (321) Area Code.""" set objMessage = createobject("cdo.message") set objConfig = createobject("cdo.configuration") ' Setting the SMTP Server Set Flds = objConfig.Fields Flds.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 Flds.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost" Flds.update Set objMessage.Configuration = objConfig objMessage.To = RS("email") objMessage.From = nickemail objMessage.Subject = subject objMessage.TextBody = strTXT 'objMessage.HtmlBody = strHTML objMessage.fields.update objMessage.Send RS.movenext Loop Conn.close set Conn = nothing set objMessage = nothing set objConfig = nothing ShowThanksMsg Else End If ShowForm Sub ShowForm %> <% Session("department")="home" %> <center> <form action=email.asp method=post> <table border=0 cellpadding=4 cellspacing=2> <table> <tr><td><font class=tbody><b>From:</b></font></td><td><input type=text name=sender value="me@me.com"></td></tr> <tr><td><font class=tbody><b>To:</b></font></td><td><font class=tbody>Brevard County Emails</font></td></tr> <tr><td><font class=tbody><b>Subject:</b></font></td><td><input class=inputfield type=text name=subject size=22></td></tr> <tr><td colspan=2><input type=image align=right src=/_images/submit.gif border=0 name=B1></td></tr> </table> </form></center> <!-- <tr><td colspan=2><font class=tbody><b>Comments:</b></font><br><textarea class=inputfield rows=3 maxlength=100 name=message cols=40></textarea></td></tr> --> <% End Sub Sub ShowThanksMsg() response.write "<center><font size=5><b>Message Sent!</b></font><br><br>" response.write "your message has been delivered to all members." End Sub %>
View Replies !
Help Split List Of Email Add Comma For Evry Email
need help split list of email add comma for evry email i have tabe "tblLogin" and in this table i have field emall like this emall ----------------------------------------- aaa@hhhh.mm nnn@hhhh.mm mmm@hhhh.mm need to do ilke this Code Snippet @list_email = (SELECT emall FROM tblLogin) --------------------------i get this -----------------------@list_email=aaa@hhhh.mm ; nnn@hhhh.mm ; mmm@hhhh.mm @recipients = @list_email Code Snippet IF EXISTS( SELECT * FROM [db_all].[dbo].[taliB] ) BEGIN DECLARE @xml NVARCHAR(MAX)DECLARE @body NVARCHAR(MAX) SET @xml =CAST(( SELECT FirstName AS 'td','', LastName AS 'td','' , Date_born AS 'td','' , Age AS 'td','' , BirthdayToday AS 'td','' , BirthdayThisWeek AS 'td' FROM [Bakra_all].[dbo].[taliB] ORDER BY LastName FOR XML PATH('tr'), ELEMENTS ) AS NVARCHAR(MAX)) SET @body ='<html><H1 align=center>aaaaaaaaaaaaaaaaaaaaaa</H1><body ><table border = 1 align=center dir=rtl> <tr> <td>name</td> <td>fname</td> <td>date</td> <td>age</td> <td>aaaaaaaaa</td> <td>bbbbbbbbbbbbbbb</td> </tr>' SET @body = @body + @xml +'</table></body></html>' EXEC msdb.dbo.sp_send_dbmail @recipients =N'rrr@iec.co.il', @copy_recipients='rrrrr@iec.co.il', @body = @body, @body_format ='HTML', @subject ='ggggggggggggggggggggg', @profile_name ='ilan' END ELSE print 'no email today'
View Replies !
Sql Authentication = Fast./ Windows Authentication = V.slow!
Hello, (Using win2k, sqlserver2k, framework 1.1) I have an fairly data-heavy application that uses Windows authentication (Trusted connection/aspnet account) to connect to Sql Server. The site uses IIS basic authentication. On the dev server everything works fine but when I move to the live server things get strange and it starts to crawl along. (Pages load OK but then it just crawls as it loads the datagrids etc. Sometimes it brings back incomplete/incorrect data ) BUT When I use Sql Authentication to connect to Sql Server and there is no problem at all! Ok, there is something obviously wrong with the live server (which is identical setup to dev)but I dont know where to start. Any ideas??
View Replies !
Using SQL Authentication And Windows Integrated Authentication Concurrently
Hi all, I've got two applications which both have a database on my MS SQL 2000 server. The problem is, one application must use Windows Integrated Authentication (which it is currently using and cannot be changed) whilst the other application which I'm trying to configure must use a SQL password. Since the server has already been configured to use Windows Integrated Authentication for the existing database and application, how do I configure the other database to use the SQL password? Thanks.
View Replies !
Authentication An Application Using Windows Integrated Authentication
Hi all, My work is using a shared application which accesses a MSSQL 2000 database. To access the application, the folder on the Windows 2003 Server is shared and users can access the folder through a shared drive. For the application to access the database, it uses an ODBC connection to the MSSQL server which originally used the SA password. We have recently switched to using Windows Integrated Authentication because we believe it offers a higher level of security. However the only way in which we have been able to enable this is to add the windows users to the SQL server. The problem with this is that the application sets permissions for individual users on what records they can see within the database. We have found that by adding the windows users to the SQL Server, they can bypass the permissions the set by the application by simply using any application that can use an ODBC connection, such as Enterprise Manager, and see all the database. One way around this would be to set up domains of users with access privileges to the tables which reflect the permissions set by the application, and configuring a view of the data so they may only see the records that they have permissions to. However to do this would require a high administrative cost to ensure that changes made in the application are reflected in the privileges of the SQL server. Instead, is there a way the SQL server can authenticate that the ODBC connection is coming from the correct application using Windows Integrated Authentication? This would allow the applcation to determine security, and stop users from connecting to the SQL server using other applications. Alternatively, can the SQL server, using Windows Integrated Authentication, also ask the application to supply a username and password? Any help with this matter would be greatly appreciated. Thanks!
View Replies !
Switching From SQL Authentication To Integrated Authentication?
Hi,I'm using SQL Server 2005. My Connection String looks like that at the moment: <add name="LocalSqlServer" connectionString="Data Source=xx;Initial Catalog=xx;Persist Security Info=True;User ID=xx;Password=xx" providerName="System.Data.SqlClient"/> Now I'd like to change this kind of authentication to Integrated Windows AuthenticationI added the WorkerProcess IIS_WPG to the permitted Users but it didn't help.Changed the Connection String to this:connectionString="Server=xx;Database=xx;Trusted_Connection=True;"All I'm getting is that my NetworkService is not permitted to access DB when I try to connect to the DB in ASP.NET.How can I properly configure that? Thanks!
View Replies !
Using Windows Authentication V/s Mixed Authentication
Hi, Say, I have configured my SQL to use Mixed Authentication. Now, I have a applicaiton which uses my SQL Server. The application just creates a database in SQL Server and uses the database to store its information. This application also has a SYSTEM DSN under ODBC through which it accesses the database. For the application to access this database, should I only use SA (as my SQL instance is configured to use Mixed Authentication) or can I use Windows Authentcation too... If I should only use SA, do we have a documentation which talks about this. Thanks Santhosh
View Replies !
Report Manager With Forms Authentication. Report Server With Windows Authentication.
Hi. I wonder if it is possible to set forms authentication for report manager but leave report server "as it is". I need to authenticate users from external LDAP and can't use windows authentication for report manager, but I would also like to leave report server open for anonymous users. In that way authenticated administrators could create reports which anonymous users could read. I tested the Security Extension Sample and got it working when I rewrote the authentication part with my own LDAP authentication. If I have understood correctly, the report manager is just application inside report server so is it possible to use forms authentication with one application but still leave the report server with Windows authentication?
View Replies !
SQL Injection - How To Prevent It?
I am building my first ASP.Net app from scratch and while working on the DAL I came across the problem of SQL Injection. I searched on the web and read different articles but I am still unsure about the answer. My question is should I add db.AddInParameter(dbCommand, "AvatarImageID", DbType.Int32, avatarImageID); Add in Parameters to my C# code to avoid SQL Injection. What is the best practice. I am unclear if the stored procedure already helps me avoid SQl Injection or if I need the add in parameters in the C# methods to make it work. I need some help. Thanks, Newbie My C# update method in the DAL (still working on the code) private static bool Update(AvatarImageInfo avatarImage) { //Invoke a SQL command and return true if the update was successful. db.ExecuteNonQuery("syl_AvatarImageUpdate", avatarImage.AvatarImageID, avatarImage.DateAdded, avatarImage.ImageName, avatarImage.ImagePath, avatarImage.IsApproved); return true; } I am using stored procedures to access the data in the database. My update stored proc set ANSI_NULLS ON set QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[syl_AvatarImageUpdate] @AvatarImageID int, @DateAdded datetime, @ImageName nvarchar(64), @ImagePath nvarchar(64), @IsApproved bit AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; BEGIN TRY UPDATE [syl_AvatarImages] SET [DateAdded] = @DateAdded, [ImageName] = @ImageName, [ImagePath] = @ImagePath, [IsApproved] = @IsApproved WHERE [AvatarImageID] = @AvatarImageID RETURN END TRY BEGIN CATCH --Execute LogError SP EXECUTE [dbo].[syl_LogError]; --Being in a Catch Block indicates failure. --Force RETURN to -1 for consistency (other return values are generated, such as -6). RETURN -1 END CATCH END
View Replies !
Prevent SP Compilation
Hi,I'm using SQL Server 2000 MSDE on a laptop running Windows XP.I have a couple of SP's that that quite some time to compile. So I waswondering: is there any way to have the database *not* recompile them everytime after a reboot?BOL says: "As a database is changed by such actions as adding indexes orchanging data in indexed columns, the original query plans used to accessits tables should be optimized again by recompiling them. This optimizationhappens automatically the first time a stored procedure is run afterMicrosoft® SQL ServerT 2000 is restarted."Now the SQL Server is restarted a lot, because laptops don't have endlessbatteries <g>Cheers,Bas
View Replies !
Prevent Sql Job Failure.
Have a job that calls a DTS package, DTS is an Export & Import wizard to copy tables. Someone deleted a table from source and my job failed last night. Inputs appreaciated.
View Replies !
How To Prevent Db Deletion
Hi I want to try and protect myself from my own stupidity. I have a number of sql databases, but one is LIVE. It is easy to drop tables but I want to set something (e.g. a password) which will help prevent me from dropping tables on the live database. Any help/direction here would be appreciated.
View Replies !
Best Way To Prevent Deadlocks
I'm going thru my application log, and just seeing what errors are popping up. I have a relatively intense search feature, thats causing alot of deadlocks. Exception type: SqlException Exception message: Transaction (Process ID 105) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. In general, what's the best way to resolve this ? Should I see if I can apply "WITH (NOLOCK)" to my data ? Any suggestions are greatly appreciated ! thanks again! mike123
View Replies !
Prevent Duplication On UPDATE
Hello I noticed a spelling mistake in the data in a column of several tables, I used the following syntax to alter the spelling: UPDATE [dbo].[Prod_Cat] SET [ProdName]=N'merseyside' WHERE ProdName = 'mmserseyside' The above code correctly updated the spelling error, but it also inserted a new row with the corrected data. So I found myself with two Identical rows containing the corrected information. I had to manually delete the extra row. Because if I had put in a DELETE statement, I would have then lost both rows. What do I need to do to prevent this happening next time. As I find that I need to update the names of some products, but I don't want to duplicate them. Thanks Lynn
View Replies !
How Do I: Prevent Race Condition?
I want to be able to read and update a value in the database without entering a race condition. For example: User #1 reads a row from the database, changes a value then writes the value back. User #2 reads the same row AFTER user #1 has read it, but BEFORE user #1 writes it back. User #2 then changes the value and writes it back, overwriting the value that user #1 wrote. I thought I could do this with transactions, but it just makes user #2 wait until user #1 is done writing before user #2 can write. It doesn't stop user #2 from reading while user #1 has it out. Does that make sense?
View Replies !
How To Prevent SQL Injection Attacks
Hi, On my site I have a simple textbox which is a keyword search, people type a keyword and then that looks in 3 colums of an SQL database and returns any matches The code is basic i.e. SELECT * FROM Table WHERE Column1 LIKE %searcg% There is no validation of what goes into the text box and I am worried about SQL injection, what can I do to minimize the risk I have just tried the site and put in two single quotes as the search term, this crashed the script so I know I am vunerable. Can anyone help, perhaps point me in the direction of furthur resources on the subject? Thanks Ben
View Replies !
What Are Sql Injection Attacks And How To Prevent?
this is a question I put in the sql community in microsoft, but havent be answered in full ------------ I am using dynamic sql to do a query with differents 'order' sentences and/or 'where' sentences depending on a variable I pass to the sp ex: create proc ex @orden varchar(100) @criterio varchar(100) as declare consulta varchar(4000) set consulta=N'select pais from paises where '+@criterio' order by '+@orden ------------ I'd like to know it it uses 2 sp in the cache, as I read, the main sp and the query inside the variable of the dynamic sql. if so, as I imagine, then I suppose I have to do the main sp without any 'if' sentence to be the same sp, and so taking it from the cache and not recompile the sp now, I have various 'if' sentences in the main sp (the caller of the dynamic sql) but I plan to remove them and do the 'if' by program -it is in asp.net-, so I suppose it is better because in this way the main sp is took from the cache, supposing this uses the cache different that the dynamic sql in the variable what do u think? does the dynamic sql use 2 caches? if so, u think it is better to try to do the main sp same in all uses (no 'if' statements)? ----- They told me this coding is not good (dynamic sql) because it can give control to the user? I ask, how does it give control to use? what ar sql injection attack and how to prevent them? I use dynamis sql because I have 150 queries to do, and thought dynamic sql is good is it true that dynamic sql have to be recompiled in each execution? I suppose so only if the sql variable is different, right? can u help me?
View Replies !
Prevent DELETE And/or UPDATE
Hi all!Are there any other way than using rights or Triggers to prevent aDELETE or an UPDATE on a specific column.The "problem" with rights is that they dont apply to all DB-usersThe "problem" with triggers is that they generate lots of extraSQL-codeI would like a solution something like below. If there are anyprimitives like this or other more neat solutions I would be glad toknowCREATE TABLE some_table NO DELETE/* ^^^^^^^^^*/(some_column SOME_TYPE NO UPDATE/* ^^^^^^^^^*/)For clarity, here is a trigger that currently solves the problemCREATE TRIGGER check_updateable_columns ON some_tableFOR UPDATEASIF UPDATE(some_column)RAISERROR(...)GOorCREATE TRIGGER delete_not_allowed ON some_tableINSTEAD OF DELETEASRAISERROR(...)GO
View Replies !
Prevent One Single Row From Being Updated
I am doing customization for microsoft POS. I manually added a recordto a table. The manage and maintenance of this table are done by POS,and user can update the contents of this table. Is there any way I canlock this single row at database level to prevent it from being deletedor changed by user? I am using SQL 2000 and vb.net.Thanks.Leanne
View Replies !
Trigger To Prevent Duplicates
Hi all, I'm writing a trigger to prevent duplicates. I know that this can be done through primary key or unique constraints but in the real world my uniqueness is defined by 8 columns which is too a big an index to maintain on the primary / unique key. If I create a table with 2 columns CREATE TABLE Table1 (CentreCHAR(10), Month CHAR(3) ) Then create a trigger to prevent duplicates CREATE TRIGGER trigger_Check_Duplicates ON Table1 FOR INSERT, UPDATE AS -- This trigger has been created to check that duplicate rows are not inserted into AudioVisual table. DECLARE @IsDuplicate INTEGER -- Check if row exists SELECT @IsDuplicate = 1 FROM Inserted i, Table1 t WHERE t.Centre = i.Centre AND t.Month = i.Month IF (@IsDuplicate = 1) -- Display Error and then Rollback transaction BEGIN RAISERROR ('This row already exists in the table', 16, 1) ROLLBACK TRANSACTION END Then insert a row into the new table (no other data is in there) INSERT Table1 VALUES('0691040176','AUG') I get the Trigger error message that the row already exists. Why is this the case? I though that Table 1 (target table) would show no entries as it has no data - it should be a before image of the table and the inserted table should be an after image. Please help!!! Thanks Neill
View Replies !
Prevent ODBC By USER/APP
Is there a way to monitor all ODBC connections to a MSSQL server and prevent a username/ODBC combination. My problem is that we have many frontends for viewing reports, but we managed them all and users are not allow to make their own connections. Some users now uses MSAccess over ODBC to draw their own reports - they have all the permissions as neededd by the other apps. thanx
View Replies !
Prevent SQL/CLR Auto Deploy
Hi, I have a solution (VS 2005, C#) that includes a SQL 2005 CLR project. When I run the solution (in debug mode, and with a test harness in a different project in the solution set as the startup project) the IDE often wants to deploy my CRL assembly. How do I tell it NOT to try to do the deployment? (i.e. to only do it when I right-click the project and tell it to). Cheers,
View Replies !
Is That Possible To Prevent Modifying The Name Of An IDTSInputColumn90?
Hi, I'm building a custom SSIS data flow component and I create myself input and output columns from a custom property of my pipeline component. That's why I don't want the user to modify the name of the input and output columns by using the advanced editor. Is there a way either to make input/output column properties - at least the name - readonly or to override any PipelineComponent method to throw an exception like we do when we want to prevent the user from adding/removing input/output colulmns with methods like PipelineComponent.DeleteOutputColumn? Thanks for your help, David
View Replies !
Prevent Data Being Inserted Twice
I have a table with 3 columns: ID, Status, DateTime. I created a stored procedure to insert a staus value for each ID. This will run every hour. The DateTime stores the time, date when the Status was inserted. If the procedure was to be run a second time in hour window I do not want any Status to be inserted. Note: that I cannot rely on the procedure being run at exactly the right time - if it was scheduled to run on the hour (i.e at 1:00, 2:00, 3 :00 etc) but didn't run until 1:20 it sould still be able to run at 2:00. Does anyone know if there is anyway I can gaurd against this?
View Replies !
Prevent MS Access To Connect
Hello I'm facing a dilemma. I have quite a lot of users who need read access to data for analysis purposes. By granting them read access you also give them the option to connect to the database using MS Access which puts locks on the data. First I thought of generating stored procedures for all tables within a database those users need to query but when users execute a stored procedure with the name of the table, they get a resultset of all the data. They cannot filter the data by for example using select top 100* from usp_table where name like '%worf%' I'm sure I'm not the only one here but I don't see any alternative then grant them those rights. Thanks! Best Regards, Worf
View Replies !
Is It Possible To Prevent Databases From Being Copied?
Hi, We have a point of sale application (C# .NET 2.0) and a Sql Server 2005 database back end. Our customers are concerned that employees could create a backup of the SQL Server database (or even of the MDF file) and use it to steel customer data. Very often, the application is running on a single PC in a shop using Sql Server Express Edition 2005 under Windows XP. The users usually log on as local administrator. It's hard for us to force our customers to change their local security policies. Ideally, I would like some form of security mechanism that prevents a backup from being restored on to another PC without either a password or some other form of authentication. Is this possible? Regards, Sigol.
View Replies !
How To Prevent A Distributed Transaction?
I have a stored proc that performs some validations and returns a result set. I catch the result set in a calling procedure as follows: declare @tblErr (ErrType varchar(20), ErrMsg varchar(255)) insert @tblErr (ErrType, ErrMsg) exec dbo.spMyProc ...(args) Within the def of spMyProc there is a cross-server call: create procedure dbo.spMyProc (...params...) as begin declare @tblErr (ErrType varchar(20), ErrMsg varchar(255)) ...(do checking, inserts to @tblErr)... -- check other server exec @n = otherserver.mydb.dbo.spCheck ...(args) if @n != 0 insert @tblErr values ('someerr', 'somemsg') ...etc. select ErrType, ErrMsg from @tblErr end Apparently, the implicit transaction of the outer Insert statement is causing a distributed transaction to be started. There is no 'begin tran', distributed or non, and the foreign sp has no data-modifying statements. The call to spMyProc, if done from a query window, works fine, returning the desired resultset. When called from the outer proc, the call fails because the servers are not configured for distributed transactions. When performed without the cross-server call, using a copy of the remote db attached to the local server, the outer proc works fine. I do not want a distributed transaction. How can I prevent one? The local server is 2005 Standard on Server 2003, and the linked server is SQL2000 on Windows 2000 Server.
View Replies !
How To Prevent Ordering Of Records....
hello, i use VC# and sql server 2005. i create a table using the following command : create table history(name varchar(20) primary key); I insert records in a particular order.After all the records are inserted and when I try to retrieve the records, all of them are sorted in a ascending order.Is there any way to prevent them from being sorted. pls reply asap..... - Sweety
View Replies !
How To Prevent My Co-Workers From Accessing My SQL
Hi all In our office we have simple Network (LAN) and for some reason in each workgroup Computer in this network we have installed SQL-Server 2000. So far everything was ok but recently i noticed that my co-workers can easily access my Sql Server Instance through their Enterprise manager installed on their computers and then they can open my tables,view...and manipulate other objects. for better illustration i have created a Flash Movie from this process , please check the following Link : http://www.Parsisoftco.com/movie/Sql/Sql.htm How can i prevent others from doing so? Any help greatly Appreciated. Kind Regards.
View Replies !
NT Authentication / SQl Server Authentication
Hi, I need to figure out what kind of Authentication , I need to use for following applicaiton Product : - 1 ) It resides on a its Domain and has access to Database on that Domain. 2 ) We have a application level login , n based on application login id display specific pages. The question that bother me is this Q ) If i use NT authentication , then a user will be required to a ) Login to domain (with userid and password) first and then b ) Then i would require to again login to applicaiton with application level login and password.(different levels of login as there) Based on the application level login i will display only specific asp pages. They have different access rights..and roles. Requirment is to login only once..and it should authenticate to application display specific pages and authenticate to SQl server database also.. Is there any way thru which i can map my application level login to SQl server.. and what authentication should i use.. Thanks, Teny
View Replies !
Sql Authentication Vs. Windows Authentication
I am in the process of rolling out a sql server 2005 enterprise install and had a question regarding authentication. We will be providing sql hosting for a number of groups on our campus, many who are not using our campus-wide active directory, though they all have an AD account. Windows authentication via the management studio appears to use your AD authentication tokens and will not allow them to enter a username/password combo. Is there any way to configure this? I would like to use our campus AD for obvious reasons but if there is a requirement for passing tokens this isn't going to work right? It's also going to make database mirroring more of a challenge. Thanks
View Replies !
How Can I Prevent My Co-Workers From Accessing My SQL Instance..
Hi all In our office we have simple Network (LAN) and for some reason in each workgroup Computer in this network we have installed SQL-Server 2000. So far everything was ok but recently i noticed that my co-workers can easily access my Sql Server Instance through their Enterprise manager installed on their computers and then they can open my tables,view...and manipulate other objects. for better illustration i have created a Flash Movie from this process , please check the following Link : http://www.Parsisoftco.com/movie/Sql/Sql.htm How can i prevent others from doing so? Any help greatly Appreciated. Kind Regards.
View Replies !
How To Prevent A Second Entry Being Inserted With Primary Key Value? (C#)
Ok, this is a really stupid question, but I can't seem to find an answer I understand. In my SQL database I have a a table called MasterSkillList, to which the user can write by using a little web form with a text box and a drop down list. The table has 2 fields, Skill and Attribute. Skill is the primary key, as no skill can appear twice. What I want to do is prevent just that, I don't want people to enter the same skill more than once. So how do I tell the user that the entry allready exists in the database? My C# Code is as follows:1 protected void btnSubmit_Click(object sender, EventArgs e) 2 { 3 srcAddSkill.InsertParameters["Skill"].DefaultValue = txtSkillName.Text; 4 srcAddSkill.InsertParameters["Attribute"].DefaultValue = ddlAbility.SelectedValue; 5 try 6 { 7 srcAddSkill.Insert(); 8 lblErrorMessage.Text = "The skill '" + txtSkillName.Text + "' has been added. It is based on a character's " + ddlAbility.SelectedItem + " score."; 9 lblErrorMessage.Visible = true; 10 txtSkillName.Text = ""; 11 } 12 catch (Exception ex) 13 { 14 lblErrorMessage.Text = "An exception has occurred. " + ex.Message; 15 lblErrorMessage.Visible = true; 16 }
View Replies !
|