SQL 2012 :: Find Profile Name In Stored Mail Profile That Already Exists
Jan 22, 2015
We have a previous SQL 2012 cluster that emails us when a new database is added. I am unable to figure out why we get this error any time we add a new database to it, and also it prevents us from adding a new availability group to this cluster because of this error.
I also am unable to figure out what profile it is talking about as this was setup before me and I am not a DBA.
We had a strange incident with our Database Mail today. We use sp_send_DBMail to send mail from stored procedures in our SQL Server 2012 (11.0.2138). There are 7 profiles available for use by different databases. The actual stored procedures are called by Web apps using a connection string that has a specific SQL user identified.
Last night app 1 was using profile 1 like usual and app 3 was using profile 3 like usual. This this morning (7 hours later) App 3 was sending from profile 1 everytime a call to sp_send_dbmail was made. Not good. App 1 was still correctly sending from profile 1.
We ran a call to sp_send_dbmail from a query window using profile 3 and it sent using the correct profile 3. We used the Database Mail right-click option of "Send Test Email..." to both profiles and they worked as expected.
Our investigation showed that in the Database Mail configuration wizard "Manage Profile Security" section Private Profiles tab... the User name that is used to call the stored procedures from web app 3's sp_send_DBMail did not have access to profile 3 anymore. It did have access to 5 of the other 7 profiles. 1 of the no access profiles was legitimate #7.
The only thing that has been changed lately was, 2 days ago a mail profile was deleted as it was no longer used. We used the Database Mail Configuration Wizard to remove it.
Hi, Is it necesarry that to run SQL Mail, you need MS Exchange Server as the mail server? Our mail server is MDaemon 2.8. Can anyone tell me what would be the mail profile for MDaemon? TIA Wilson
I saw from SWYNK that you were able to set up SQL Mail using Lotus Notes. I tried following the post by Edward Alexander but got into some trouble:
We were using MAPI to get to Notes Mail.
1. We know that MAPI works because we were able to send mail by a. using the exchange client (Windows Messaging client) b. using VB script to send a message with MAPI.Session
The problem is that SQL server cannot see the Exchange Profile that was defined on the SQL box.
I have sql 2000 sp4 running on a cluster, we had to fail over to other cluster, and now the sql agent choice to use a mail profile is grayed out. I can go to sql mail and test the profile and it works, but I can't change it for the sql agent? Anyone seen this before
It's a Windows 2000 Server box with SQL 2000 on it. MSSQLSERVER &SQLSERVERAGENT services are logged in as valid domain user. I set up amail profile for that user, and can send email via Outlook 2003.However, when I go to the SQL Agent Properties in Enterprise Manager,Mail Profile is disabled.I've restarted the services & even tried rebooting the server. Thisworks on my other servers, but they're Windows 2003. Not sure ifthat's the problem though.Anybody have any clues?
Hello there,I'm a new one to asp.net, so I need some help, and hope someone out there wanna take the time to help me, with my problem..I had set up a Custom "Membership", you know click on a file, and it create a database ASPNETDB...There I need to find 5 random users where they are e.g. females..Right now I can find 5 random users, but I dont know how to put in there Where statement, because I need to read something from thier profile?This is my code so far: SELECT TOP 5 [UserName] FROM [aspnet_Users] ORDER BY NEWID() Then I have to put in WHERE (profile.Gender = female)<--- But how do I do that?Hope you wanna, and can help me,Regards Jeppe RichardtPS,Im using the language vb.net
Hi, This is Raj..could anyone pls explain the sql profile and how we will set the row-level locks as a dba.Sorry it is a silly question but sometimes these questions are bugging my mind. Thnak u in advance.
I use the default database called "ASPNETDB.mdf" that is automatically created in Visual Studio Express 2005.... There is an table called "aspnet_Profile" that holds the profile-properties, UserID etc. There is also another table called "aspnet_Users" that holds all usernames, UserID etc... No to my problem: I have a SqlDataSource-control and want to select all users that have the property profile.Color = "Blue".... How can I write the SQL-part for that?
I am using a SqlDatasource and need to set a SelectParamter to the ProviderUserKey (The GUID of the user when Profiles are enabled) Can anyone tell me whether it is possible and How? I am currently using the session state to store it in and then using the session=... to get the value into the parameter. Is there a direct way of passing this value into a SelectParameter when using a SqlDataSource? Thanks in advance.
Is there any way that I can use an ASP.NET profile variable in a T-SQL parameter? I need to base a query on the current ASP.NET profile variable for purposes of creating a report. Thanks Deon
Hello.When I create a user at the ASP.NET database, I need to insert more fields than the defaults, and I do it like this: Dim customProfile As ProfileCommon = ProfileCommon.Create(CreateUserWizard1.UserName, True) customProfile.telephone = (CType(CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("TelephoneText"), TextBox)).Text(telephone example)Those data are inserted at the DB at the aspnet_Profile table, in the fields PropertyNames & PropertyValuesString, but they are saved together (see image above)
I want to separate those properties in the GridView as long as each property appears in a column, is it possible? Thank you very much, i'm expecting your answers.
Hi, I use the Table Profile Provider: http://www.asp.net/downloads/sandbox/table-profile-provider-samples/ When I call for example: Profile.FirstName does this access the DB every time this call appears in my code? Or all the profile is loaded to the cache when the user first loggs on? thanks
I had a profile element named "Country", however, I want it to be named "CountryId". I can change this in the web.config with no problems, but then I need to update the code manually any place Profile.Country is referenced. Also, it seems I would have to write some SQL to update all the values in the profile table from Country to CountryId. Is there an easier way to do this? I'm using Visual Studio 2005 and SQL Server Express 2005.Thanks,Wes
Hi all. Quick question. I'm using VS2005, C#, aspx page.I'm creating a Profile to store login and password. That part is working... I can call the values (and display them) using this code <%= Profile.login %> and <%=Profile.password %>Now I want to create a Grid View that will connect to the SQL db, see if the login and password value stored in the Profile match that of ones in the SQL db. So if the profile is login: bob password: dog, the grid view will output all application ID numbers associated with the bob and dog. Here is the SQL code...trying to use the <%=Profile.login %> as a filter on the login and password doesn't seem to work...Can anyone tell me what I'm doing wrong? How can I reference a value in the Profile within an SQL statement?SELECT ApplicationStatus.Description, Customer.CustomerName, Application.ApplicationDateFROM Application INNER JOIN ApplicationStatus ON Application.ApplicationStatusID = ApplicationStatus.ApplicationStatusID INNER JOIN Customer ON Application.ApplicationID = Customer.ApplicationID INNER JOIN [User] ON Application.DealerId = [User].UserIdWHERE ([User].LoginId = '<%= Profile.login %>') AND ([User].LoginPwd = '<%= Profile.password %>') AND (ApplicationStatus.Description = 'Pending')
I have created a profile object which is a list to store photoId into an array. (kinda like a shopping cart) which will persist in the list untill manually deleted by the user.I want to use the photo Ids stored in this object in my profile as a parameter for an sql select statement to be displayed into a data grid. What is the best way to go about this... and suggestions... I know you can use a profile property as a parametere in a sqldatasource but Im not sure how to do this for an array.HELP
I created a new MAPI profile on the server, and it seems to work fine with Outlook. I also dropped the previous default MAPI profile.
Now, when I go to the EM SQLAgent Properties, the only MAP profile offered in the SQLMail drop-down is the old, deleted profile. Also, only the old profile comes up with xp_get_MAPI_profiles.
How can I get SQLAgent to recognize that I've set up a new mail profile?
We have a delay between the login and the first statment after the login. I see in the profiler trace that this delay is due to an eventClass "SQLTransaction" and the only information I have about it is that the objectName is "UpdateLoginStats". It is very interesting but this event usually takes 0 time, but when run from one specific user, it takes 10-1000 MS.
Hello All, Can someone please help me with this problem. I have created additional profile properties for my users in the aspnet_profile table. One of the properties is named 'Division'. The division property is how I segregate users, for example, my company has multiple divisions and, the information that is displayed is dynamic according to which divison the user belongs to. Amost all of my stored proceedures are filtered by checking the value of Profile.Division of the logged in user. This system works great. The problem is, now I am working on user management and I need to create a Gridview that will display all of the users for a particular division but, I have no idea how to filter a query against the aspnet database to get the results I am looking for. Here is a small example:SELECT aspnet_Users.UserName, aspnet_Profile.PropertyNames, aspnet_Profile.PropertyValuesStringFROM aspnet_Profile INNER JOIN aspnet_Users ON aspnet_Profile.UserId = aspnet_Users.UserId******** Here is the part I need help with *********************WHERE PROFILE.DIVISION = KOr, can it even be done? Can you filter a query on the value of a profile property?Anyone have any ideas?Thanks in adavance for your help
I have looked and tried with no luck on using the Profile.UserName in an SQLDataSource Update select statement. and anyone please help me with this?UpdateCommand="UPDATE tblDocuments SET DocumentTypeID = @DocumentTypeID, DocDescription = @DocDescription, DocLocation = @DocLocation, DocStartDate = @DocStartDate, DocEndDate = @DocEndDate, LastUpdate = GETDATE(), LastUpdateBy = @ProfileUser WHERE (DocumentID = @DocumentID)" <UpdateParameters> <asp:Parameter Name="DocumentID" /> <asp:Parameter Name="DocumentTypeID" /> <asp:Parameter Name="DocDescription" /> <asp:Parameter Name="DocLocation" /> <asp:Parameter Name="DocStartDate" /> <asp:Parameter Name="DocEndDate" /> <asp:Parameter Name="ClientID" /> <asp:Parameter Name="ProfileUser" /> </UpdateParameters>
Do someone know how to save enterprise manager profile to save all the registered servers list -> to install on another computer ? (I have a big server list)
I've didn't find an *.ini file, and i've tried to export Windows Registry keys, but I cannot import them into the second computer. config : SQL2k - sp4 on Windows 2K
does anyone know how i can make it so you can view all the users in the database on a page and there names are clickable with a link and then shows there profile page which is basicly a text box that all users can edit there own.
i have a "users" table and mysite stores there username in a cookie called user for the session.
I am using sql 2000 SP4 and I am really struggling finding some dead locks. I can enable Startup Parameters T1204 and T3606 which gives me a partial picture.
But then I need to run a profile for deadlocks etc. This is where I have a problem what Events and Data columns do I need?
Also I have an extremely heavy loaded server; if I run a full profile I will grind the server to a halt.
I can get away with running a duration trace and setting duration > 3000. But I find that if I add more events and data columns the duration > 3000 no longer stops the flood.
This is because if the field you are filtering by has no value it will include it in the trace. Which is a real problem.
So has anyone got and advice on how I can set up a profile to help me find dead locking but wont cripple my server.
Could somebody please help me out? I'm running Windows 2000 on my laptop. I opened a new user account and gave it administrative privilegies. I copied the administrative profile to the new account and everything seemed to work except when I tried to open any office application a dialogue appeared prompting me to place the Windows 2000 office CD rom in the drive. Why has this happened? How can rectify this problem since I don't have the CD rom.
In customer profile provider, I got the one of store procedures as belowquestion is that : I dont understand the character "N" and "case" used for?? help...1 ALTER PROCEDURE [dbo].[Profiles_Sel]2 (3 @userName nvarchar(50)=null,4 @inactivityDate datetime=null,5 @isAnonymous bit 6 )7 AS8 BEGIN9 10 Declare @select nvarchar(2000)11 Declare @where nvarchar(255)12 Declare @params nvarchar(255)13 14 /*Select profiles that meet the specified criteria.*/ 15 Set @select=N'Select ' 16 17 Set @select=@select+18 N'ProfileID,19 UserName,20 ApplicationName,21 IsAnonymous,22 LastActivity,23 LastUpdated24 From Profiles25 ' 26 27 Set @where=N'';28 If(@userName Is Not Null) 29 Begin30 Set @where=@where+Case When @where='' Then N' Where ' Else N' And ' End + N'(Profiles.UserName Like @_userName+''%'')';31 End32 If(@inactivityDate Is Not Null) 33 Begin34 Set @where=@where+Case When @where='' Then N' Where ' Else N' And ' End + N'(Profiles.LastActivity <= @_inactivityDate)';35 End36 If(@isAnonymous=1) 37 Begin38 Set @where=@where+Case When @where='' Then N' Where ' Else N' And ' End + N'(Profiles.IsAnonymous = @_isAnonymous)';39 End40 41 Set @select=@select+@where;42 43 Set @params=N'@_userName nvarchar(50),@_inactivityDate nvarchar(50),@_isAnonymous bit';44 45 Execute sp_executesql @select,@params,@_userName=@userName,@_inactivityDate=@inactivityDate,@_isAnonymous=@isAnonymous;46 47 END 48