Home > profile name > profile name is not valid sqlstate 42000 error 14607

Profile Name Is Not Valid Sqlstate 42000 Error 14607

Contents

here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more procedure sysmail_verify_profile_sp profile name is not valid about Stack Overflow the company Business Learn more about hiring developers or posting

Sql Server Profile Name

ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack principal name is not valid Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up profile name is not valid up vote 18 down vote favorite

System.data.sqlclient.sqlexception: Profile Name Is Not Valid

6 I have a windows account with users group and trying to exec the sp_send_dbmail but getting an error: profile name is not valid. However, when I logged in as administrator and execute the sp_send_dbmail, it managed to send the email so obviously the profile name does exist on the server.. can anyone pleas help? sql-server sql-server-2008 share|improve this question edited Aug 16 '10 at 13:45 marc_s 454k938711033 asked sysmail_add_principalprofile_sp Aug 16 '10 at 6:30 user384080 1,51794280 add a comment| 2 Answers 2 active oldest votes up vote 28 down vote You need to grant the user or group rights to use the profile. They need to be added to the msdb database and then you will see them available in the mail wizard when you are maintaining security for mail. Read up the security here: http://msdn.microsoft.com/en-us/library/ms175887.aspx See a listing of mail procedures here: http://msdn.microsoft.com/en-us/library/ms177580.aspx Example script for 'TestUser' to use the profile named 'General Admin Mail'. USE [msdb] GO CREATE USER [TestUser] FOR LOGIN [testuser] GO USE [msdb] GO EXEC sp_addrolemember N'DatabaseMailUserRole', N'TestUser' GO EXECUTE msdb.dbo.sysmail_add_principalprofile_sp @profile_name = 'General Admin Mail', @principal_name = 'TestUser', @is_default = 1 ; share|improve this answer edited Aug 18 '10 at 23:18 answered Aug 17 '10 at 0:21 Sam 6,00752853 can you please give me the sample scripts how to assign user to the right group? –user384080 Aug 17 '10 at 0:38 5 Since I am such a nice person ;) I have supplied this script for you. –Sam Aug 18 '10 at 23:18 2 This error can also happen if you've specified the WRONG profile name via some types of code... i.e., sp_send_dbmail @p

Communication LEARN: How to become a Microsoft MVP C# Corner Annual Conference 2017 Announced C# Corner Contribute An

Configuration Wizard Of Database Mail

Article A Blog A News A Video A Link An Interview Question Ask

Msg 14607, Level 16, State 1, Procedure Sp_send_dbmail, Line 141 Profile Name Is Not Valid

a Question TECHNOLOGIES .NET Coding Best Practices Internet & Web Outsourcing String in C# .NET Core Cognitive Services sp_send_dbmail profile name Internet of Things Philosophy Swift ADO.NET COM Interop iOS PHP TypeScript AJAX Cryptography Java Power BI Universal Windows Platform Android Crystal Reports JavaScript Products Visual Studio Angular 2 Current Affairs JQuery Project http://stackoverflow.com/questions/3491053/profile-name-is-not-valid Management VR and AR AngularJS Databases & DBA JSON Python WCF Architecture Design Patterns & Practices Knockout R Web Development ASP.NET DevOps LINQ React Web Services ASP.NET Core Dynamics CRM Machine Learning Robotics & Hardware Windows 10 Azure Entity Framework Microsoft Office Security Windows Controls Big Data Error Zone Mobile Development Servers Windows Forms BizTalk Server Games Programming Multithreading SharePoint Windows PowerShell Bot Framework GDI+ http://www.c-sharpcorner.com/UploadFile/c1f7d5/sql-database-mail-profile-name-is-not-valid-in-sql-server-2/ & Graphics Node.js SignalR WPF C# Google Development OOP/OOD Smart Devices Xamarin C, C++, MFC HoloLens Open Source Software Testing XAML Career Advice How do I Operating Systems SQL Language XML Chapters HTML 5 Oracle SQL Server Request a new Category| View All ANSWERS BLOGS VIDEOS INTERVIEWS BOOKS NEWS CHAPTERS CAREER Jobs CODE IDEAS Scroll To Top Reader Level: Article SQL Database Mail Profile Name is Not Valid in SQL Server 2012 By Shivom Agarwal on May 16, 2014 This article explains how to send emails using the msdb.dbo.sp_send_dbmail Stored Procedure as a non-sysadmin user in SQL Server 2012. 43.4k 0 1 facebook twitter linkedIn google Plus Reddit WhatsApp expand This problem occured whenI was trying to send emails using themsdb.dbo.sp_send_dbmailStored Procedure as a non-sysadminuser in SQL Server 2012.For Example: EXECmsdb.dbo.sp_send_dbmail @profile_name='MailProfile' ,@recipients='test@test.com' ,@subject='AutomatedTestResults(Successful)' ,@body='Thestoredprocedurefinishedsuccessfully.' The error was: Msg14607,Level16,State1,Proceduresp_send_dbmail,Line141 Profilenameisnotvalid You can see that the non-sysadminuserhas been added tothe DatabaseMailUserRolerole inthe database. Note:If the database mail profile is not set for public access then the user is not allowed to use the specified profile. Now set the profile to Public.Right-click on the Database Mail in the Management Studio and select the

gave my user (let's call it User1) the permissions to send mail as described here. I then called it from some C# code and got the following message. profile name is not valid Here are the steps http://justgeeks.blogspot.com/2012/10/troubleshooting-profile-name-is-not.html I used to figure out what my problem was. Double check that the name of the profile is correct and is being passed correctly to the stored proc using the @profile_name parameter. The next step is to https://cms4j.wordpress.com/2013/12/17/msg-14607-level-16-state-1-profile-name-is-not-valid/ figure out if it is my code or SQL server side. The easiest way to do that is to open SQL Management Studio and connect to your database server using the exact user/login you were using profile name when you got the error. Then try to send the mail message using the following (tweak as necessary): msdb.dbo.sp_send_dbmail @profile_name = 'Profile1', @recipients = 'someone@somewhere.com', @subject = 'Test subject', @body = '

Test Body

', @body_format = 'HTML' If you still get the error, it is something to do with SQL Server, otherwise, it is somewhere in your code that is called the stored proc. If it is in your code, name is not you are on your own. If it is on the server (still getting the error) then proceed to the next step. In SQL Management Studio, open another connection, but this time connect as a user that has more rights (probably yourself). Now execute the following stored proc. msdb.dbo.sysmail_help_principalprofile_sp @principal_name = 'User1', @profile_name = 'Profile1' If you get no results back then that means you have a permission problem. This likely means that your profile is NOT public or the user (User1) don't have access to it. You an change the permission by going to the Database Mail Configuration Wizard | Manage profile security radio button | Next button. Here you can click the profile to make it public. You can alternatively go to the Private Profiles tab and select the user and then the profile. Either way should work. If you run the stored procedure again, it should show that you now have access to the profile now. You can also re-run the sp_send_dbmail and it should work this time. Posted by Brent V at 6:21 PM Labels: Database, MS SQL Server No comments: Post a Comment Newer Post Older Post Home Subscribe to: Post Comments (Atom) Search This Blog Page Views Follow by Email Subscribe To Posts Atom Posts Comments Atom Comments Labels .Net ADO.NET Entity F

by cms4j Database mail does not work? Profile not valid? Check this out. We use Database Mail very intensive, though faced a problem today with a new server login that we added to our instance. Every time we tried to send an email like this: EXEC msdb.dbo.sp_send_dbmail @profile_name = 'My profile name', @recipients = 'cms4j@wordpress.com', @subject = 'Test', @body  = 'Message', @body_format = 'HTML'; We got the error message: Msg 14607, Level 16, State 1, Procedure sp_send_dbmail, Line 119 profile name is not valid When i added our user with whom we connected to the SQL Server Instance to the Server Role "sysadmin" then the email was sent right away. But that had nothing do do with security if we added our dedicated user to the sysadmin-group. So there had to be another solution. I googled a bit and found the following post on sqlservercentral: http://www.sqlservercentral.com/Forums/Topic698578-146-1.aspx There was mentioned a solution like this: EXECUTE msdb.dbo.sysmail_add_principalprofile_sp @principal_name = 'public', @profile_name = 'My profile name', @is_default = 1 ; I executed it, but it did not work. Might be the different SQL Server version, in the post it was mentioned sql2k5, but we run sql2k8 on our machine. So i opened Database Mail Configuration Wizard from within the SSMS: chose "Manage Profile Security" and found that all my mail profiles were public: But wait, there is another tab "Private Profiles" that shows more options: So i selected our SQL Server Login from the drop down list and granted access to all existing mail profiles. Clicking next and finishing i tried to send an email once again, and it WORKED🙂 Thank you for reading, i hope it solved your problem too. Like this:Like Loading... Related This entry was posted in SQL Server and tagged database mail, mssql. Bookmark the permalink. ← Connection Error 18456 Last "Touch" on each Database perInstance → One Response to Msg 14607, Level 16, State 1 - profile name is notvalid jeff says: December 11, 2015 at 8:03 pm Worked like a champ. Thanks for making this available. Reply Leave a Reply Cancel reply Enter your comment here... Fill in your details below or click an icon to log in: Email (required) (Address never made public) Name (required) Website You are commenting using your WordPress.com account. (LogOut/Change) You are commenting using your Twitter account. (LogO

 

Related content

error 14607 sql server

Error Sql Server table id toc tbody tr td div id toctitle Contents div ul li a href Sql Server Profile Name a li li a href Configuration Wizard Of Database Mail a li li a href Microsoft Odbc Sql Server Driver Sql Server Profile Name Is Not Valid a li li a href System data sqlclient sqlexception Profile Name Is Not Valid a li ul td tr tbody table p May April December relatedl October September August p h id Sql Server Profile Name p July March November msg level state procedure sysmail verify profile sp line profile name

error 14607 sql

Error Sql table id toc tbody tr td div id toctitle Contents div ul li a href Msg Level State Procedure Sysmail verify profile sp Line Profile Name Is Not Valid a li li a href Configuration Wizard Of Database Mail a li li a href Msg Level State Procedure Sp send dbmail Line Profile Name Is Not Valid a li ul td tr tbody table p here for a quick overview of the site relatedl Help Center Detailed answers to any questions profile name is not valid sql server you might have Meta Discuss the workings and policies of

error 14607 profile name is not valid

Error Profile Name Is Not Valid table id toc tbody tr td div id toctitle Contents div ul li a href System data sqlclient sqlexception Profile Name Is Not Valid a li li a href Msg Level State Procedure Sp send dbmail Line Profile Name Is Not Valid a li li a href How To Check Profile Name In Sql Server a li ul td tr tbody table p July June May April December October September relatedl August July March procedure sysmail verify profile sp profile name is not valid November October September August July sql server profile name June

error 14607 sql server 2008

Error Sql Server table id toc tbody tr td div id toctitle Contents div ul li a href Sql Server Profile Name a li li a href Configuration Wizard Of Database Mail a li li a href Microsoft Odbc Sql Server Driver Sql Server Profile Name Is Not Valid a li li a href System data sqlclient sqlexception Profile Name Is Not Valid a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us

profile name is not valid error 14607

Profile Name Is Not Valid Error table id toc tbody tr td div id toctitle Contents div ul li a href Procedure Sysmail verify profile sp Profile Name Is Not Valid a li li a href System data sqlclient sqlexception Profile Name Is Not Valid a li li a href Sysmail add principalprofile sp a li li a href Msg Level State Procedure Sp send dbmail Line Profile Name Is Not Valid a li ul td tr tbody table p Microsoft Tech Companion App Microsoft Technical Communities Microsoft Virtual Academy Script Center relatedl Server and Tools Blogs TechNet Blogs p

profile name is not valid sqlstate 42000 error 50000

Profile Name Is Not Valid Sqlstate Error table id toc tbody tr td div id toctitle Contents div ul li a href System data sqlclient sqlexception Profile Name Is Not Valid a li li a href Sysmail add principalprofile sp a li ul td tr tbody table p HomeLibraryLearnDownloadsTroubleshootingCommunityForums Ask a question Quick access Forums home Browse forums users FAQ Search related relatedl threads Remove From My Forums Answered by profile name is not valid microsoft sql server error sql server agent job fails SQL Server SQL Server procedure sysmail verify profile sp profile name is not valid Database Engine