Sql Security Error

Hi there,
I created an app that contains list in it, I'm overriding ItemAdded class to do calculations and some parsing after item is created.
I want to store some number in SQL server and later add those in calculations.
My connection string:
string result;
            string connectionString = "Data Source=MyDB;Initial Catalog=MyCatalog;Trusted_Connection=true;User ID=12345;Password=12345;";
            using (SqlConnection connection = new SqlConnection(connectionString))
                using (SqlCommand command = new SqlCommand(
                             "SELECT blalalala, connection))
                    connection.Open();
                    result = (string)command.ExecuteScalar();                   
And i get error, on line "connection.Open();":"An exception of type 'System.Security.SecurityException' occurred in System.Data.dll but
was not handled in user codeAdditional information: Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
failed."
In web.config file i got "<trust level="Full" originUrl="" legacyCasModel="true" />" so problem shouldn't be there.
Any Ideas?

Hi,
If you want to access database in Event Receiver, in SharePoint, Business Connectivity Services would be a preferable choice for this requirement.
http://technet.microsoft.com/en-us/library/ee661740(v=office.14).aspx
http://www.dotnetcurry.com/showarticle.aspx?ID=794
Then in the Event Receiver, you can work with the data from database in an External list just like work with a normal SharePoint list:
http://zimmergren.net/technical/sp-2010-programmatically-work-with-external-lists-bcs-in-sharepoint-2010
Best regards,
Patrick
Patrick Liang
TechNet Community Support

Similar Messages

  • XDK for PL/SQL install errors

    Is this a problem ?
    resolver :
    Error while turning off verifier
    ORA-29532: Java call terminated by uncaught Java exception:
    java.security.AccessControlException: the Permis
    sion (oracle.aurora.security.JServerPermission Verifier ) has
    not been granted by dbms_java.grant_permission to
    SchemaProtectionDomain(SYSTEM|PolicyTableProxy(SYSTEM))
    I also get some of these ...
    errors : oracle/xml/sql/dml/OracleXMLSave
    ORA-29534: referenced object
    SYSTEM.oracle/xml/sql/core/OracleXMLConvert could not be resolved
    skipping : oracle/xml/sql/core/OracleXMLTime is already resolved
    resolving: oracle/xml/sql/core/OracleXMLConvert
    errors : oracle/xml/sql/core/OracleXMLConvert
    ORA-29521: referenced name oracle/gss/util/XmlValidate could
    not be found
    resolving: oracle/xml/sql/OracleXMLSQLNoRowsException
    errors : oracle/xml/sql/OracleXMLSQLNoRowsException
    ORA-29534: referenced object
    SYSTEM.oracle/xml/sql/OracleXMLSQLException could not be resolved
    resolving: oracle/xml/sql/core/OracleXMLUtil
    errors : oracle/xml/sql/core/OracleXMLUtil
    ORA-29534: referenced object
    SYSTEM.oracle/xml/sql/core/OracleXMLConvert could not be resolved
    At the end, the final test shows ...
    SQL> Rem Use these to test the results..
    SQL> select dbms_xmlquery.getxml('select * from dual', 2) from
    dual;
    select dbms_xmlquery.getxml('select * from dual', 2) from dual
    ERROR at line 1:
    ORA-29541: class
    SYSTEM.oracle/xml/sql/query/OracleXMLStaticQuery could not be
    resolved
    ORA-06512: at "SYSTEM.DBMS_XMLQUERY", line 20
    ORA-06512: at "SYSTEM.DBMS_XMLQUERY", line 271
    ORA-06512: at line 1
    Can anyone please help. My load command was ...
    ./xdkload -u "system/manager" -s -noverify -dbver "817"
    I'm trying to load version 9.0.2.0.0C into an 8.1.7 instance on
    HP-UX 11. Before running the script, I had to set environment
    variables INSTALL_ROOT, and LD_LIBRARY_PATH (we use
    SHLIB_PATH). I haven't actually found any installation
    instructions, so I've only got this far by poking around. Any
    help is much appreciated.
    Steve

    Sounds like the same problem described in a number of posts
    recently.
    Re: Startup/Shutdown 9iAS on windows
    http://forums.oracle.com/forums/message.jsp?id=550104
    The problem is caused by unresolved classes in the XSU package
    from the latest Beta, I hope someone from Oracle can take a look
    at this.
    Good luck!
    Ola

  • Connection failed: SQLState:'01000' SQL Server Error:67 [Microsoft]ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()). Connection failed: SQLState:'08001' SQL Server Error:17 [Microsoft]ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist o

    Help,
    setup a new sql server 2012 on a windows 2012r2 server to replace old sql server 2005 on an old windows server 2003 machine.  When i test the ODBC connection locally on the server it works fine, however when i try to connect via windows 7 client machine
    i get the following error:
    Connection failed:
    SQLState:'01000'
    SQL Server Error:67
    [Microsoft]ODBC SQL Server Driver][DBNETLIB]ConnectionOpen
    (Connect()).
    Connection failed:
    SQLState:'08001'
    SQL Server Error:17
    [Microsoft]ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied
    I think it must be a permissions thing, I've turned off the firewall for now and still no difference, 've also made sure remote connection is enabled.  I can connect to the other sql server in studio manager on the new machine however, i can't go do
    the same in the old server, says:
    cannot connect to hbfsqlpro1\hbfsqlpro1
    Additonal information a network related or instance specifc error occured while establising a connection to SQL server.  The server was not found or was not accessible.  Verify that the instance name is correct and that SQL server is configured to
    allow remote connections. (provider:SQL Network Interfaces, error 26 - error locationg server/instance specified) (Microsoft SQL server)
    the instance is def correct, as that is what i use to connect locally on the new machine and what it comes up on the studio manager on the new machine.  STarting to pull my hair out somewhat, i'm sure it's something really simple! 

    Hello,
    You are trying to connect to a named instance. Make sure the SQL Server Browser service is started on the SQL Server computer.
    Make sure TCP/IP is enabled.
    http://msdn.microsoft.com/en-us/library/ms191294(v=sql.110).aspx
    Try to disable Windows Firewall or security software on both, SQL Server instance and client computer.
    Test basic connectivity too. Try to ping from the client computer to the SQL Server computer.
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • SharePoint 2010 SQL Permission Errors

    We occasionally receive errors in the Event Log for SQL permission errors. I am not able to find what exactly is causing the issue and don't want to grant rights to something if I don't know what it is doing. There error is not specific
    to a particular list or library. Below is one example of the ULS log output. I see references to a deadlock but also permission denied.
    Name=Request (GET:https://subsite.contoso.com:443/HomePage/Forms/AllItems.aspx)
    Site=/
    Leaving Monitored Scope (PostResolveRequestCacheHandler). Execution Time=13.8458
    Videntityinfo::isFreshToken reported failure.
    Begin Query the AD to get the user email and display name.
    End Query the AD to get the user email and display name.
    System.Data.SqlClient.SqlException: The EXECUTE permission was denied on the object 'proc_SecAddUser', database 'SharePoint_AdminContent_d4605df0-8a2d-44e0-8805-8d65c4d73d99', schema 'dbo'.
    The EXECUTE permission was denied on the object 'proc_AddListItem', database 'SharePoint_AdminContent_d4605df0-8a2d-44e0-8805-8d65c4d73d99', schema 'dbo'.
    The EXECUTE permission was denied on the object 'proc_UpdateDiskUsed', database 'SharePoint_AdminContent_d4605df0-8a2d-44e0-8805-8d65c4d73d99', schema 'dbo'.
    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
    at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
    at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
    at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
    at System.Data.SqlClient.SqlDataReader.get_MetaData()
    at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
    at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
    at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
    at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
    at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
    at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
    at Microsoft.SharePoint.Utilities.SqlSession.ExecuteReader(SqlCommand command, CommandBehavior behavior, SqlQueryData monitoringData, Boolean retryForDeadLock)
    at Microsoft.SharePoint.SPSqlClient.ExecuteQueryInternal(Boolean retryfordeadlock)
    at Microsoft.SharePoint.SPSqlClient.ExecuteQuery(Boolean retryfordeadlock)
    at Microsoft.SharePoint.Library.SPRequestInternalClass.OpenWebInternal(String bstrUrl, Guid& pguidID, String& pbstrRequestAccessEmail, UInt32& pwebVersion, String& pbstrServerRelativeUrl, UInt32& pnLanguage, UInt32& pnLocale, String& pbstrDefaultTheme, String& pbstrDefaultThemeCSSUrl, String& pbstrThemedCssFolderUrl, String& pbstrAlternateCSSUrl, String& pbstrCustomizedCssFileList, String& pbstrCustomJSUrl, String& pbstrAlternateHeaderUrl, String& pbstrMasterUrl, String& pbstrCustomMasterUrl, String& pbstrSiteLogoUrl, String& pbstrSiteLogoDescription, Object& pvarUser, Boolean& pvarIsAuditor, Int32& plSiteFlags, Boolean& pbOverwriteMUICultures, Boolean& pbMUIEnabled, String& pbstrAlternateMUICultures, Int32& puiVersion, Int16& pnClientTag)
    at Microsoft.SharePoint.Library.SPRequest.OpenWebInternal(String bstrUrl, Guid& pguidID, String& pbstrRequestAccessEmail, UInt32& pwebVersion, String& pbstrServerRelativeUrl, UInt32& pnLanguage, UInt32& pnLocale, String& pbstrDefaultTheme, String& pbstrDefaultThemeCSSUrl, String& pbstrThemedCssFolderUrl, String& pbstrAlternateCSSUrl, String& pbstrCustomizedCssFileList, String& pbstrCustomJSUrl, String& pbstrAlternateHeaderUrl, String& pbstrMasterUrl, String& pbstrCustomMasterUrl, String& pbstrSiteLogoUrl, String& pbstrSiteLogoDescription, Object& pvarUser, Boolean& pvarIsAuditor, Int32& plSiteFlags, Boolean& pbOverwriteMUICultures, Boolean& pbMUIEnabled, String& pbstrAlternateMUICultures, Int32& puiVersion, Int16& pnClientTag)
    at Microsoft.SharePoint.SPWeb.InitWebPublic()
    at Microsoft.SharePoint.SPWeb.get_Url()
    at Microsoft.SharePoint.SPGroup.InitMember()
    at Microsoft.SharePoint.SPGroup..ctor(SPWeb web, SPSecurableObject scope, SPUser user, String GroupName, Object[,] arrGroupsData, UInt32 index, Int32 iByParamId, SPGroupCollectionType groupCollectionType)
    at Microsoft.SharePoint.SPGroupCollection.get_Item(String name)
    at Microsoft.SharePoint.Administration.SPFarm.PerformCentralAdministratorsGroupOperation(AdminGroupOperation operation, String[] usersToAdd, String[] usersToRemove, Boolean& groupExists)
    at Microsoft.SharePoint.Administration.SPFarm.CurrentUserIsAdministrator(Boolean allowContentApplicationAccess)
    at Microsoft.SharePoint.SPSite.set_AdministratorOperationMode(Boolean value)
    at Microsoft.SharePoint.SPFeatureManager.EnsureSiteAndWeb(SPUrlZone zone, Guid databaseid, Guid siteid, Guid webid, SPSite& site, SPWeb& web)
    at Microsoft.SharePoint.SPFeatureManager.<>c__DisplayClass19.<GetFeatureRootAndListSchemaPaths>b__18()
    at Microsoft.SharePoint.SPSecurity.RunAsUser(SPUserToken userToken, Boolean bResetContext, WaitCallback code, Object param)
    at Microsoft.SharePoint.SPFeatureManager.GetFeatureRootAndListSchemaPaths(Byte[]& userToken, Guid& tranLockerId, Int32 nZone, Guid databaseid, Guid siteid, Guid webid, Guid featid, Int32 ltid, String& sPathToFeatureRoot, String& sPathToSchemaXml)
    at Microsoft.SharePoint.Library.SPRequestInternalClass.GetViewsSchemaXml(String bstrUrl, String bstrListName, Boolean bFullBlown, Boolean bNeedInitAllViews, ISP2DSafeArrayWriter p2DWriter, Int32& plDefaultViewIndex, Int32& plMobileDefaultViewIndex)
    at Microsoft.SharePoint.Library.SPRequest.GetViewsSchemaXml(String bstrUrl, String bstrListName, Boolean bFullBlown, Boolean bNeedInitAllViews, ISP2DSafeArrayWriter p2DWriter, Int32& plDefaultViewIndex, Int32& plMobileDefaultViewIndex)
    at Microsoft.SharePoint.SPViewCollection.EnsureViewSchema(Boolean fullBlownSchema, Boolean bNeedInitallViews)
    at Microsoft.SharePoint.SPList.get_Views()
    at Microsoft.SharePoint.SPList.get_DefaultViewUrl()
    at Microsoft.SharePoint.Publishing.CachedList..ctor(SPList list, CachedObjectFactory factory)
    at Microsoft.SharePoint.Publishing.CachedArea.GetChildListByGuid(Guid listIdGuid)
    at Microsoft.Office.DocumentManagement.MetadataNavigation.MetadataNavigationSettings.GetCachedList(SPWeb web, Guid listId)
    at Microsoft.Office.DocumentManagement.MetadataNavigation.MetadataNavigationSettings.GetMetadataNavSettingsXml(SPWeb web, Guid sourceListId, Boolean& listExists)
    at Microsoft.Office.DocumentManagement.MetadataNavigation.MetadataNavigationSettings.GetMetadataNavigationSettings(SPWeb web, Guid sourceListId, Boolean checkWebPropHint)
    at Microsoft.Office.DocumentManagement.MetadataNavigation.MetadataNavigationContext.get_NavigationSettings()
    at Microsoft.Office.DocumentManagement.MetadataNavigation.MetadataNavigationContext.EnsurePageInitEventHandling(Control controlOnPage)
    at Microsoft.Office.Server.WebControls.MetadataHierarchyDataSourceControl.OnInit(EventArgs e)
    at System.Web.UI.Control.InitRecursive(Control namingContainer)
    at System.Web.UI.Control.InitRecursive(Control namingContainer)
    at System.Web.UI.Control.InitRecursive(Control namingContainer)
    at System.Web.UI.Control.AddedControl(Control control, Int32 index)
    at Microsoft.SharePoint.WebControls.DelegateControl.AddControlResilient(Control ctl)
    at Microsoft.SharePoint.WebControls.DelegateControl.CreateChildControls()
    at System.Web.UI.Control.EnsureChildControls()
    at Microsoft.SharePoint.WebControls.DelegateControl.OnInit(EventArgs e)
    at System.Web.UI.Control.InitRecursive(Control namingContainer)
    at System.Web.UI.Control.InitRecursive(Control namingContainer)
    at System.Web.UI.Control.AddedControl(Control control, Int32 index)
    at System.Web.UI.ControlBuilder.BuildChildren(Object parentObj)
    at System.Web.UI.TemplateBuilder.InstantiateIn(Control container)
    at Microsoft.SharePoint.WebControls.UIVersionedContent.CreateChildControls()
    at System.Web.UI.Control.EnsureChildControls()
    at Microsoft.SharePoint.WebControls.UIVersionedContent.OnInit(EventArgs e)
    at System.Web.UI.Control.InitRecursive(Control namingContainer)
    at System.Web.UI.Control.InitRecursive(Control namingContainer)
    at System.Web.UI.Control.InitRecursive(Control namingContainer)
    at System.Web.UI.Control.InitRecursive(Control namingContainer)
    at System.Web.UI.Control.InitRecursive(Control namingContainer)
    at System.Web.UI.Control.InitRecursive(Control namingContainer)
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    at System.Web.UI.Page.ProcessRequest()
    at System.Web.UI.Page.ProcessRequest(HttpContext context)
    at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
    at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
    at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)
    at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)
    at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)
    at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
    at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
    at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
    at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
    SqlError: 'The EXECUTE permission was denied on the object 'proc_SecAddUser', database 'SharePoint_AdminContent_d4605df0-8a2d-44e0-8805-8d65c4d73d99', schema 'dbo'.' Source: '.Net SqlClient Data Provider' Number: 229 State: 5 Class: 14 Procedure: 'proc_SecAddUser' LineNumber: 1 Server: 'sqlserver.contoso.com'
    SqlError: 'The EXECUTE permission was denied on the object 'proc_AddListItem', database 'SharePoint_AdminContent_d4605df0-8a2d-44e0-8805-8d65c4d73d99', schema 'dbo'.' Source: '.Net SqlClient Data Provider' Number: 229 State: 5 Class: 14 Procedure: 'proc_AddListItem' LineNumber: 1 Server: 'sqlserver.contoso.com'
    SqlError: 'The EXECUTE permission was denied on the object 'proc_UpdateDiskUsed', database 'SharePoint_AdminContent_d4605df0-8a2d-44e0-8805-8d65c4d73d99', schema 'dbo'.' Source: '.Net SqlClient Data Provider' Number: 229 State: 5 Class: 14 Procedure: 'proc_UpdateDiskUsed' LineNumber: 1 Server: 'sqlserver.contoso.com'
    Insufficient SQL database permissions for user 'Name: contoso\user1 SID: S-1-5-21-1326408308-1533151006-945732055-253740
    ImpersonationLevel: Impersonation' in database 'SharePoint_AdminContent_d4605df0-8a2d-44e0-8805-8d65c4d73d99' on SQL Server instance 'sqlserver.contoso.com'.
    Additional error information from SQL Server is included below.
    The EXECUTE permission was denied on the object 'proc_SecAddUser', database 'SharePoint_AdminContent_d4605df0-8a2d-44e0-8805-8d65c4d73d99', schema 'dbo'.
    The EXECUTE permission was denied on the object 'proc_AddListItem', database 'SharePoint_AdminContent_d4605df0-8a2d-44e0-8805-8d65c4d73d99', schema 'dbo'.
    The EXECUTE permission was denied on the object 'proc_UpdateDiskUsed', database 'SharePoint_AdminContent_d4605df0-8a2d-44e0-8805-8d65c4d73d99', schema 'dbo'.
    ConnectionString: 'Data Source=sqlserver.contoso.com;
    Initial Catalog=SharePoint_AdminContent_d4605df0-8a2d-44e0-8805-8d65c4d73d99;
    Integrated Security=True;
    Enlist=False;
    Asynchronous Processing=False;
    Connect Timeout=15' ConnectionState: Closed ConnectionTimeout: 15
    SqlCommand:
    'SET NOCOUNT ON;
    DECLARE @DN nvarchar(256),@LN nvarchar(128),@@DocUIVersion int,@@Level tinyint,@@S uniqueidentifier;
    DECLARE @ItemId int;
    DECLARE @@iRet int;
    DECLARE @ExtraItemSize int;
    DECLARE @Login nvarchar(255);
    DECLARE @Title nvarchar(255);
    DECLARE @Email nvarchar(255);
    DECLARE @Notes nvarchar(1023);
    DECLARE @MobilePhone nvarchar(127);
    DECLARE @AddedToTable bit;
    DECLARE @UserIdOut int;
    DECLARE @LoginOut nvarchar(255);
    DECLARE @TitleOut nvarchar(255);
    DECLARE @EmailOut nvarchar(255);
    DECLARE @NotesOut nvarchar(1023);
    DECLARE @MobilePhoneOut nvarchar(127);
    DECLARE @DeletedOut bit;
    DECLARE @NeedtoAddtoList bit;
    DECLARE @IsGroup bit;
    SET @IsGroup = 0;
    SET @@Level = 1;
    SELECT @Login = @wssp0;
    SELECT @Title = @wssp1;
    SELECT @Email = @wssp2;
    SELECT @Notes = @wssp3;
    SELECT @MobilePhone = @wssp4;
    SELECT @@S=@wssp5;
    EXEC @@iRet = proc_SecAddUser @@S, @wssp6, @wssp7, @wssp8, @wssp9, @wssp10, @Login, @Title, @Email, @Notes, @MobilePhone, @wssp11, @wssp12, @wssp13, @wssp14, @AddedToTable OUTPUT, @UserIdOut OUTPUT, @LoginOut OUTPUT, @TitleOut OUTPUT, @EmailOut OUTPUT, @NotesOut OUTPUT, @MobilePhoneOut OUTPUT, @DeletedOut OUTPUT, @NeedtoAddtoList OUTPUT;
    IF @@iRet <> 0 BEGIN GOTO DONE;
    END ;
    SELECT @ItemId = @UserIdOut;
    IF @NeedtoAddtoList = 0 BEGIN GOTO DONE;
    END ;
    BEGIN TRAN IF NOT EXISTS( SELECT tp_ID FROM UserData WHERE tp_ListId = 'E97F9667-B512-4AF9-8F98-ABA92DA3D4A2' AND tp_ID = @ItemId AND tp_Level = 1 AND tp_RowOrdinal =0) BEGIN SELECT @ExtraItemSize = 0 EXEC @@iRet = proc_AddListItem @SiteId =@wssp15,@WebId=@wssp16,@ListID=@wssp17,@RowOrdinal=@wssp18,@ItemDocType=@wssp19,@SortTypeReversed=@wssp20,@RetainId=@wssp21,@RetainObjectIdentity=@wssp22,@ItemId = @ItemId OUTPUT,@ItemDirName=@DN OUTPUT,@ItemLeafName=@LN OUTPUT,@UserID=@wssp23,@tp_Author = @ItemId,@tp_Editor = @ItemId,@TimeNow=@wssp24,@CopySecurityFromMasterID=@wssp25,@UseNvarchar1ItemName=@wssp26,@ServerTemplate=@wssp27,@IsNotUserDisplayed=@wssp28,@Basetype=@wssp29,@Level=@wssp30,@UIVersion=@wssp31,@tp_GUID=@wssp32,@CheckSchemaVersion=@wssp33,@OnRestore=@wssp34,@AddNamespace=@wssp35,@CheckDiskQuota=@wssp36, @tp_ContentTypeId = @wssp37, @nvarchar1 = @wssp38, @tp_ModerationStatus = @wssp39, @nvarchar3 = @wssp40, @nvarchar4 = @wssp41, @nvarchar5 = @wssp42, @nvarchar6 = @wssp43, @bit2 = @wssp44, @bit3 = @wssp45, @nvarchar9 = @wssp46, @nvarchar10 = @wssp47, @bit4 = @wssp48, @Size=@wssp49, @ExtraItemSize = @ExtraItemSize , @eventData=@wssp50, @acl=@wssp51, @DocClientId=@wssp52;
    IF @@iRet <> 0 BEGIN ROLLBACK TRAN;
    GOTO DONE;
    END END ;
    COMMIT TRAN;
    EXEC proc_UpdateDiskUsed @@S, 1;
    DONE:
    SELECT @@iRet, @ItemId, @AddedToTable, @LoginOut, @TitleOut, @EmailOut, @NotesOut, @MobilePhoneOut, @DeletedOut '
    CommandType: Text
    CommandTimeout: 0
    Parameter: '@wssp0'
    Type: NVarChar
    Size: 4000
    Direction: Input
    Value: 'NT AUTHORITY\LOCAL SERVICE'
    Parameter: '@wssp1'
    Type: NVarChar
    Size: 4000
    Direction: Input
    Value: 'UserLast, UserFirst'
    Parameter: '@wssp2'
    Type: NVarChar
    Size: 4000
    Direction: Input
    Value: ''
    Parameter: '@wssp3'
    Type: NVarChar
    Size: 4000
    Direction: Input
    Value: ''
    Parameter: '@wssp4'
    Type: NVarChar
    Size: 4000
    Direction: Input
    Value: ''
    Parameter: '@wssp5'
    Type: UniqueIdentifier
    Size: 0
    Direction:
    Input Value: 'eb7d8a16-18a1-46d7-a35d-36eedccb321b'
    Parameter: '@wssp6'
    Type: VarBinary
    Size: 8000
    Direction: Input
    Parameter: '@wssp7'
    Type: VarBinary
    Size: 8000
    Direction: Input
    Parameter: '@wssp8'
    Type: DateTime
    Size: 0
    Direction: Input
    Value: '04/24/2014 13:49:03'
    Parameter: '@wssp9'
    Type: Bit Size: 0
    Direction: Input
    Value: 'False'
    Parameter: '@wssp10'
    Type: Bit
    Size: 0
    Direction: Input
    Value: 'False'
    Parameter: '@wssp11'
    Type: Int
    Size: 0
    Direction: Input
    Value: ''
    Parameter: '@wssp12'
    Type: UniqueIdentifier
    Size: 0
    Direction: Input
    Value: ''
    Parameter: '@wssp13'
    Type: Bit
    Size: 0
    Direction: Input
    Value: 'False'
    Parameter: '@wssp14'
    Type: Bit
    Size: 0
    Direction: Input
    Value: 'False'
    Parameter: '@wssp15'
    Type: UniqueIdentifier
    Size: 0
    Direction: Input
    Value: 'eb7d8a16-18a1-46d7-a35d-36eedccb321b'
    Parameter: '@wssp16'
    Type: UniqueIdentifier
    Size: 0
    Direction: Input
    Value: 'c3cfb850-7d5e-4fd1-bea7-c2add4127427'
    Parameter: '@wssp17'
    Type: UniqueIdentifier
    Size: 0
    Direction: Input
    Value: 'e97f9667-b512-4af9-8f98-aba92da3d4a2'
    Parameter: '@wssp18'
    Type: TinyInt
    Size: 1
    Direction: Input
    Value: '0'
    Parameter: '@wssp19'
    Type: TinyInt
    Size: 1
    Direction: Input
    Value: '0'
    Parameter: '@wssp20'
    Type: Bit
    Size: 0
    Direction: Input
    Value: 'False'
    Parameter: '@wssp21'
    Type: UniqueIdentifier
    Size: 0
    Direction: Input
    Value: ''
    Parameter: '@wssp22'
    Type: Bit
    Size: 0
    Direction: Input
    Value: 'False'
    Parameter: '@wssp23'
    Type: Int
    Size: 0
    Direction:
    Input Value: '-1'
    Parameter: '@wssp24'
    Type: DateTime
    Size: 0
    Direction: Input
    Value: '04/24/2014 13:49:03'
    Parameter: '@wssp25'
    Type: Int
    Size: 0
    Direction: Input
    Value: ''
    Parameter: '@wssp26'
    Type: Bit
    Size: 0
    Direction: Input
    Value: 'True'
    Parameter: '@wssp27'
    Type: Int
    Size: 0
    Direction: Input
    Value: '112'
    Parameter: '@wssp28'
    Type: Bit
    Size: 0
    Direction: Input
    Value: ''
    Parameter: '@wssp29'
    Type: Int
    Size: 0
    Direction: Input
    Value: '0'
    Parameter: '@wssp30'
    Type: TinyInt
    Size: 1
    Direction: Input
    Value: '1'
    Parameter: '@wssp31'
    Type: Int
    Size: 0
    Direction: Input
    Value: '512'
    Parameter: '@wssp32'
    Type: UniqueIdentifier
    Size: 0
    Direction: Input
    Value: ''
    Parameter: '@wssp33'
    Type: Int
    Size: 0
    Direction: Input
    Value: ''
    Parameter: '@wssp34'
    Type: Bit
    Size: 0
    Direction:
    Input Value: 'False'
    Parameter: '@wssp35'
    Type: Bit
    Size: 0
    Direction: Input
    Value: 'True'
    Parameter: '@wssp36'
    Type: Bit
    Size: 0
    Direction: Input
    Value: 'False'
    Parameter: '@wssp37'
    Type: VarBinary
    Size: 8000
    Direction: Input
    Parameter: '@wssp38'
    Type: NVarChar
    Size: 4000
    Direction: Input
    Value: 'UserLast, UserFirst'
    Parameter: '@wssp39'
    Type: Int
    Size: 0
    Direction: Input
    Value: '0'
    Parameter: '@wssp40'
    Type: NVarChar
    Size: 4000
    Direction: Input
    Value: 'NT AUTHORITY\LOCAL SERVICE'
    Parameter: '@wssp41'
    Type: NVarChar
    Size: 0
    Direction: Input
    Value: ''
    Parameter: '@wssp42'
    Type: NVarChar
    Size: 0
    Direction: Input
    Value: ''
    Parameter: '@wssp43'
    Type: NVarChar
    Size: 0
    Direction:
    Input Value: ''
    Parameter: '@wssp44'
    Type: Bit
    Size: 0
    Direction: Input
    Value: 'False'
    Parameter: '@wssp45'
    Type: Bit
    Size: 0
    Direction: Input
    Value: 'False'
    Parameter: '@wssp46'
    Type: NVarChar
    Size: 0
    Direction: Input
    Value: ''
    Parameter: '@wssp47'
    Type: NVarChar
    Size: 0
    Direction: Input
    Value: ''
    Parameter: '@wssp48'
    Type: Bit
    Size: 0
    Direction: Input
    Value: 'False'
    Parameter: '@wssp49'
    Type: Int
    Size: 0
    Direction: Input
    Value: '82'
    Parameter: '@wssp50'
    Type: VarBinary
    Size: 0
    Direction: Input
    Parameter: '@wssp51'
    Type: VarBinary
    Size: 8000
    Direction: Input
    Parameter: '@wssp52'
    Type: VarBinary
    Size: 0
    Direction: Input
    System.Data.SqlClient.SqlException:
    The EXECUTE permission was denied on the object 'proc_SecAddUser', database 'SharePoint_AdminContent_d4605df0-8a2d-44e0-8805-8d65c4d73d99', schema 'dbo'.
    The EXECUTE permission was denied on the object 'proc_AddListItem', database 'SharePoint_AdminContent_d4605df0-8a2d-44e0-8805-8d65c4d73d99', schema 'dbo'.
    The EXECUTE permission was denied on the object 'proc_UpdateDiskUsed', database 'SharePoint_AdminContent_d4605df0-8a2d-44e0-8805-8d65c4d73d99', schema 'dbo'.
    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
    at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
    at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
    at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
    at System.Data.SqlClient.SqlDataReader.get_MetaData()
    at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
    at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
    at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
    at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
    at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
    at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
    at Microsoft.SharePoint.Utilities.SqlSession.ExecuteReader(SqlCommand command, CommandBehavior behavior, SqlQueryData monitoringData, Boolean retryForDeadLock)
    at Microsoft.SharePoint.SPSqlClient.ExecuteQueryInternal(Boolean retryfordeadlock)
    at Microsoft.SharePoint.SPSqlClient.ExecuteQuery(Boolean retryfordeadlock)
    Videntityinfo::isFreshToken reported failure.
    Leaving Monitored Scope (CachedList:HomePage). Execution Time=15.1112
    Leaving Monitored Scope (Load CachedList:151c2f9a-be3a-42ad-a4c6-379cb6ec05ad). Execution Time=825.2132
    Leaving Monitored Scope (Request (GET:https://subsite.contoso.com:443/HomePage/Forms/AllItems.aspx)). Execution Time=966.741

    did you check this post, 
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/5f8003a0-f845-4fb6-8b43-a0a234bcb1ea/the-execute-permission-was-denied-on-the-object-multiple-alerts?forum=sharepointadminprevious
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

  • The SELECT permissions was denied on the object 'extended_properties', database 'mssqlsystemresource', schema 'sys'.(Microsoft SQL Server, Error:229

    I have a SQL Server connected intro a Windows Server 2003 Domain Active Directory, the server holds a default instance with a single Database, the SQL Server is 2005 Std Edition, and is using mix mode Authentification, then I able to create SQL Native Users
    and Invoque Windows Domain Users also.
    The Goal of this project is remove the sysadmin Server role for all the Windows Domain Users, to give then a more granular secure model but at the moment is this only way to connect at the Data Base Server.
    I already create Native SQL Servers users without any problem!, they respect Securable Setting, Server Roles, User Mapping, everything...Just when I create a Login Profile form a Domain Users and apply the same setting, I get this error...
    The SELECT permissions was denied on the object 'extended_properties', database 'mssqlsystemresource', schema 'sys'.(Microsoft SQL Server, Error:229)
    But if the user have sysadmin Server Rol he can sing over the server without any issue, I review the .sys view extended_properties and "Public" is the only Database Role placed.
    Any Idea if I need change any Setting in the Secure in SQL Master DataBase? or which is the issue witjh this matter?
    Thank in advance for your help!

    Since there are so many possibilities for what might be wrong.  Here's another possibility to look at.  I ran into something where I had set up my own roles on a database.  (For instance, "Administrator", "Manager", "DataEntry",
    "Customer", each with their own kinds of limitations)  The only ones who could use it were "Manager" role or above--because they were also set up as sysadmin because they were adding users to the database (and they were highly trusted). 
    Also, the users that were being added were Windows Domain users--using their domain credentials.  (Everyone with access to the database had to be on our domain, but not everyone on the domain had access to the database--and only a few of them had access
    to change it.)
    Anyway, this working system suddenly stopped working and I was getting error messages similar to the above.  What I ended up doing that solved it was to go through all the permissions for the "public" role in that database and add those permissions
    to all of the roles that I had created.  I know that everyone is supposed to be in the "public" role even though you can't add them (or rather, you can "add" them, but they won't "stay added").
    So, in "SQL Server Management Studio", I went into my application's database, in other words (my localized names are obscured within <> brackets): "<Computername> (SQL Server <version> - sa)"\Databases\<MyAppDB>\Security\Roles\Database
    Roles\public".  Right-click on "public" and select "Properties".  In the "Database Role Properties - public" dialog, select the "Securables" page.  Go through the list and for each element in the
    list, come up with an SQL "Grant" statement to grant exactly that permission to another role.  So, for instance, there is a scalar function "[dbo].[fn_diagramobjects]" on which the "public" role has "Execute" privilege. 
    So, I added the following line:   
    EXEC ( 'GRANT EXECUTE ON [dbo].[fn_diagramobjects] TO [' + @RoleName + '];' )
    Once I had done this for all the elements in the "Securables" list, I wrapped that up in a while loop on a cursor selecting through all the roles in my roles table.  This explicitly granted all the permissions of the "public" role to
    my database roles.  At that point, all my users were working again (even after I removed their "sysadmin" access--done as a temporary measure while I figured out what happened.)
    I'm sure there's a better (more elegant) way to do this by doing some kind of a query on the database objects and selecting on the public role, but after about half and hour of investigating, I wasn't figuring it out, so I just did it the brute-force method. 
    In case it helps someone else, here's my code.
    CREATE PROCEDURE [dbo].[GrantAccess]
    AS
    DECLARE @AppRoleName AS sysname
    DECLARE AppRoleCursor CURSOR LOCAL SCROLL_LOCKS FOR
    SELECT AppRoleName FROM [dbo].[RoleList];
    OPEN AppRoleCursor
    FETCH NEXT FROM AppRoleCursor INTO @AppRoleName
    WHILE @@FETCH_STATUS = 0
    BEGIN
    EXEC ( 'GRANT EXECUTE ON [dbo].[fn_diagramobjects] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT EXECUTE ON [dbo].[sp_alterdiagram] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT EXECUTE ON [dbo].[sp_creatediagram] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT EXECUTE ON [dbo].[sp_dropdiagram] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT EXECUTE ON [dbo].[sp_helpdiagramdefinition] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT EXECUTE ON [dbo].[sp_helpdiagrams] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT EXECUTE ON [dbo].[sp_renamediagram] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[all_columns] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[all_objects] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[all_parameters] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[all_sql_modules] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[all_views] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[allocation_units] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[assemblies] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[assembly_files] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[assembly_modules] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[assembly_references] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[assembly_types] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[asymmetric_keys] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[certificates] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[change_tracking_tables] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[check_constraints] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[column_type_usages] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[column_xml_schema_collection_usages] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[columns] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[computed_columns] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[conversation_endpoints] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[conversation_groups] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[conversation_priorities] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[crypt_properties] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[data_spaces] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[database_audit_specification_details] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[database_audit_specifications] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[database_files] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[database_permissions] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[database_principal_aliases] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[database_principals] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[database_role_members] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[default_constraints] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[destination_data_spaces] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[event_notifications] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[events] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[extended_procedures] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[extended_properties] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[filegroups] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[foreign_key_columns] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[foreign_keys] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[fulltext_catalogs] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[fulltext_index_catalog_usages] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[fulltext_index_columns] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[fulltext_index_fragments] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[fulltext_indexes] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[fulltext_stoplists] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[fulltext_stopwords] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[function_order_columns] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[identity_columns] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[index_columns] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[indexes] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[internal_tables] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[key_constraints] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[key_encryptions] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[message_type_xml_schema_collection_usages] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[module_assembly_usages] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[numbered_procedure_parameters] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[numbered_procedures] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[objects] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[parameter_type_usages] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[parameter_xml_schema_collection_usages] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[parameters] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[partition_functions] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[partition_parameters] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[partition_range_values] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[partition_schemes] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[partitions] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[plan_guides] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[procedures] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[remote_service_bindings] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[routes] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[schemas] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[service_contract_message_usages] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[service_contract_usages] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[service_contracts] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[service_message_types] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[service_queue_usages] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[service_queues] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[services] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[spatial_index_tessellations] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[spatial_indexes] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[sql_dependencies] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[sql_modules] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[stats] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[stats_columns] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[symmetric_keys] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[synonyms] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[syscolumns] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[syscomments] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[sysconstraints] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[sysdepends] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[sysfilegroups] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[sysfiles] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[sysforeignkeys] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[sysfulltextcatalogs] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[sysindexes] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[sysindexkeys] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[sysmembers] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[sysobjects] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[syspermissions] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[sysprotects] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[sysreferences] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[system_columns] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[system_objects] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[system_parameters] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[system_sql_modules] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[system_views] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[systypes] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[sysusers] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[table_types] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[tables] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[transmission_queue] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[trigger_events] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[triggers] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[type_assembly_usages] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[types] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[views] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[xml_indexes] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[xml_schema_attributes] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[xml_schema_collections] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[xml_schema_component_placements] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[xml_schema_components] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[xml_schema_elements] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[xml_schema_facets] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[xml_schema_model_groups] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[xml_schema_namespaces] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[xml_schema_types] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[xml_schema_wildcard_namespaces] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[xml_schema_wildcards] TO [' + @AppRoleName + '];' )
    FETCH NEXT FROM AppRoleCursor INTO @AppRoleName
    END
    CLOSE AppRoleCursor
    RETURN 0
    GO
    Once that is in the system, I just needed to "Exec GrantAccess" to make it work.  (Of course, I have a table [RoleList] which contains a "AppRoleName" field that contains the names of the database roles.)
    So, the mystery remains: why did all my users lose their "public" role and why could I not give it back to them?  Was this part of an update to SQL Server 2008 R2?  Was it because I ran another script to delete each user and add them back
    so to refresh their connection with the domain?  Well, this solves the issue for now.
    One last warning: you probably should check the "public" role on your system before running this to make sure there isn't something missing or wrong, here.  It's always possible something is different about your system.
    Hope this helps someone else.

  • The SELECT permission was denied on the object 'extended_properties', database 'mssqlsystemresource', schema 'sys'. (Microsoft SQL Server, Error: 229)

    I have created a user and given him the owner rights for the database.  Though I can LogIn as the user, I cannot access the databases.  I am having the error mesage:
    Failed to retrieve data for this request. (Microsoft.SqlServer.Management.Sdk.Sfc)
    For help, click:
    http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476
    ADDITIONAL INFORMATION:
    An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
    The SELECT permission was denied on the object 'extended_properties', database 'mssqlsystemresource', schema 'sys'. (Microsoft SQL Server, Error: 229)
    For help, click:
    http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1600&EvtSrc=MSSQLServer&EvtID=229&LinkId=20476
    Sha_woop

    Since there are so many possibilities for what might be wrong.  Here's another possibility to look at.  I ran into something where I had set up my own roles on a database.  (For instance, "Administrator", "Manager", "DataEntry", "Customer",
    each with their own kinds of limitations)  The only ones who could use it were "Manager" role or above--because they were also set up as sysadmin because they were adding users to the database (and they were highly trusted).  Also, the users that
    were being added were Windows Domain users--using their domain credentials.  (Everyone with access to the database had to be on our domain, but not everyone on the domain had access to the database--and only a few of them had access to change it.)
    Anyway, this working system suddenly stopped working and I was getting error messages similar to the above.  What I ended up doing that solved it was to go through all the permissions for the "public" role in that database and add those permissions to
    all of the roles that I had created.  I know that everyone is supposed to be in the "public" role even though you can't add them (or rather, you can "add" them, but they won't "stay added").
    So, in "SQL Server Management Studio", I went into my application's database, in other words (my localized names are obscured within <> brackets): "<Computername> (SQL Server <version> - sa)"\Databases\<MyAppDB>\Security\Roles\Database
    Roles\public".  Right-click on "public" and select "Properties".  In the "Database Role Properties - public" dialog, select the "Securables" page.  Go through the list and for each element in the list, come up with an SQL "Grant" statement to
    grant exactly that permission to another role.  So, for instance, there is a scalar function "[dbo].[fn_diagramobjects]" on which the "public" role has "Execute" privilege.  So, I added the following line:
    EXEC ( 'GRANT EXECUTE ON [dbo].[fn_diagramobjects] TO [' + @RoleName + '];' )
    Once I had done this for all the elements in the "Securables" list, I wrapped that up in a while loop on a cursor selecting through all the roles in my roles table.  This explicitly granted all the permissions of the "public" role to my database roles. 
    At that point, all my users were working again (even after I removed their "sysadmin" access--done as a temporary measure while I figured out what happened.)
    I'm sure there's a better (more elegant) way to do this by doing some kind of a query on the database objects and selecting on the public role, but after about half and hour of investigating, I wasn't figuring it out, so I just did it the brute-force method. 
    In case it helps someone else, here's my code.
    CREATE PROCEDURE [dbo].[GrantAccess]
    AS
    DECLARE @AppRoleName AS sysname
    DECLARE AppRoleCursor CURSOR LOCAL SCROLL_LOCKS FOR
    SELECT AppRoleName FROM [dbo].[RoleList];
    OPEN AppRoleCursor
    FETCH NEXT FROM AppRoleCursor INTO @AppRoleName
    WHILE @@FETCH_STATUS = 0
    BEGIN
    EXEC ( 'GRANT EXECUTE ON [dbo].[fn_diagramobjects] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT EXECUTE ON [dbo].[sp_alterdiagram] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT EXECUTE ON [dbo].[sp_creatediagram] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT EXECUTE ON [dbo].[sp_dropdiagram] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT EXECUTE ON [dbo].[sp_helpdiagramdefinition] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT EXECUTE ON [dbo].[sp_helpdiagrams] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT EXECUTE ON [dbo].[sp_renamediagram] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[all_columns] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[all_objects] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[all_parameters] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[all_sql_modules] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[all_views] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[allocation_units] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[assemblies] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[assembly_files] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[assembly_modules] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[assembly_references] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[assembly_types] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[asymmetric_keys] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[certificates] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[change_tracking_tables] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[check_constraints] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[column_type_usages] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[column_xml_schema_collection_usages] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[columns] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[computed_columns] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[conversation_endpoints] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[conversation_groups] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[conversation_priorities] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[crypt_properties] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[data_spaces] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[database_audit_specification_details] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[database_audit_specifications] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[database_files] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[database_permissions] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[database_principal_aliases] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[database_principals] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[database_role_members] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[default_constraints] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[destination_data_spaces] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[event_notifications] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[events] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[extended_procedures] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[extended_properties] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[filegroups] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[foreign_key_columns] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[foreign_keys] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[fulltext_catalogs] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[fulltext_index_catalog_usages] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[fulltext_index_columns] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[fulltext_index_fragments] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[fulltext_indexes] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[fulltext_stoplists] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[fulltext_stopwords] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[function_order_columns] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[identity_columns] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[index_columns] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[indexes] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[internal_tables] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[key_constraints] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[key_encryptions] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[message_type_xml_schema_collection_usages] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[module_assembly_usages] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[numbered_procedure_parameters] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[numbered_procedures] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[objects] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[parameter_type_usages] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[parameter_xml_schema_collection_usages] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[parameters] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[partition_functions] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[partition_parameters] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[partition_range_values] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[partition_schemes] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[partitions] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[plan_guides] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[procedures] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[remote_service_bindings] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[routes] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[schemas] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[service_contract_message_usages] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[service_contract_usages] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[service_contracts] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[service_message_types] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[service_queue_usages] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[service_queues] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[services] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[spatial_index_tessellations] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[spatial_indexes] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[sql_dependencies] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[sql_modules] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[stats] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[stats_columns] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[symmetric_keys] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[synonyms] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[syscolumns] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[syscomments] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[sysconstraints] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[sysdepends] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[sysfilegroups] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[sysfiles] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[sysforeignkeys] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[sysfulltextcatalogs] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[sysindexes] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[sysindexkeys] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[sysmembers] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[sysobjects] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[syspermissions] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[sysprotects] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[sysreferences] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[system_columns] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[system_objects] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[system_parameters] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[system_sql_modules] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[system_views] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[systypes] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[sysusers] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[table_types] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[tables] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[transmission_queue] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[trigger_events] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[triggers] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[type_assembly_usages] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[types] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[views] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[xml_indexes] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[xml_schema_attributes] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[xml_schema_collections] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[xml_schema_component_placements] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[xml_schema_components] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[xml_schema_elements] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[xml_schema_facets] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[xml_schema_model_groups] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[xml_schema_namespaces] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[xml_schema_types] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[xml_schema_wildcard_namespaces] TO [' + @AppRoleName + '];' )
    EXEC ( 'GRANT SELECT ON [sys].[xml_schema_wildcards] TO [' + @AppRoleName + '];' )
    FETCH NEXT FROM AppRoleCursor INTO @AppRoleName
    END
    CLOSE AppRoleCursor
    RETURN 0
    GO
    Once that is in the system, I just needed to "Exec GrantAccess" to make it work.  (Of course, I have a table [RoleList] which contains a "AppRoleName" field that contains the names of the database roles.)
    So, the mystery remains: why did all my users lose their "public" role and why could I not give it back to them?  Was this part of an update to SQL Server 2008 R2?  Was it because I ran another script to delete each user and add them back so to refresh
    their connection with the domain?  Well, this solves the issue for now.
    One last warning: you probably should check the "public" role on your system before running this to make sure there isn't something missing or wrong, here.  It's always possible something is different about your system.
    Hope this helps someone else.

  • Displaying SQL Exception errors in plain english

    Hi,
    How can I display SQL Exception errors in plain english. For example how would I display:
    java.sql.SQLException: ORA00001:unique consraint(EMP.NAME) violated
    to
    Name already exists!
    Regards.

    When you log into SharePoint you give it a username and password, this might be automatic so you never notice it but it still happens in the background. The UPS then takes that username and creates a UPS entry for that account using information stored in
    Active Directory.
    If you're not familiar with AD it's normally a generally accessible 'phone book' like collection of user data like username, first name, surname, email address, manager, department and what security groups they belong to.
    If you configure the sync service this information is pulled through earlier in bulk rather than on-demand as users log in. You also get a lot more control over what data is used where and how.
    It's slightly different if you're using Forms Based Authentication but that's another story.

  • Flex encounters "Security error accessing url.Unable to load WSDL"

    i have created a flex application which connects to SAP via web service.
    when i try to run my flex application i encounter the following error.
    "Security error accessing url.Unable to load WSDL"
    i went through various posts relating a BSP application and crossdomain.xml
    i have created the crossdomain.xml file in the application and
    i tried those options and still not able to figure out the problem.
    the security error is because of the absence of the crossdomain.xml file, and in which path should i be saving the file?
    Kindly help me solve the problem.
    Thanks in advance.

    Have you seen this blog
    "Crossdomain.xml" in ABAP Web AS Server cache

  • Security error accessing ur unable to load wsdl

    HI
    I am using a webservice(.net webservice) that is on my
    localhost and using it in flex application that is also on my
    system. Means both the webservice and flex application are on the
    same system.
    But when i gives the reference of the webservice using the
    system ip and run the application by the flex builder it generates
    the error as:
    mx.messaging.messages::ErrorMessage)#0
    body = (Object)#1
    clientId = "DirectHTTPChannel0"
    correlationId = "24CD6542-F141-1A05-BA35-00A108CB30A0"
    destination = ""
    extendedData = (null)
    faultCode = "Channel.Security.Error"
    faultDetail = "Destination: DefaultHTTP"
    faultString = "Security error accessing url"
    headers = (Object)#2
    messageId = "CC123DF0-0E6C-05FF-7894-00A109676283"
    rootCause = (flash.events::SecurityErrorEvent)#3
    bubbles = false
    cancelable = false
    currentTarget = (flash.net::URLLoader)#4
    bytesLoaded = 0
    bytesTotal = 0
    data = (null)
    dataFormat = "text"
    eventPhase = 2
    target = (flash.net::URLLoader)#4
    text = "Error #2170: Security sandbox violation:
    http://localhost:3000/MYCIMS/flex_bin/Design.swf
    cannot send HTTP headers to
    http://myip/MyServer/AdminWS.asmx."
    type = "securityError"
    timestamp = 0
    timeToLive = 0
    I have put crossdomain.xml file in the root of the localhost
    and made every changes possible in the crossdomain.xml file but the
    application is not running.
    Please somebody provide an effective solution, I have spend
    lots of time to resolve the problem but its not being....
    Thanks in advance
    Gopi Saini

    Have you seen this blog
    "Crossdomain.xml" in ABAP Web AS Server cache

  • Security error accessing url (Unable to load WSDL)

    Hi folks.
    I have a Flex project that use a WCF webservice. In my localhost everything is allright, but I want to upload my flex project to a web host (http://www.dorj.ir) and upload my WCF webservice to a server that has a valid IP...
    After going to http://www.dorj.ir, you can see this error
    Security error accessing url
    Unable to load WSDL. If currently online, please verify the URI and/or format of the WSDL (http://ip/service.svc?wsdl)
    I put the crossdomain.xml file in the root of my server:
    <?xml version="1.0"?>
    <!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
    <cross-domain-policy>
         <allow-access-from domain="http://www.dorj.ir" />
         <allow-http-request-headers-from domain="http://www.dorj.ir" headers="SOAPAction"/>
    </cross-domain-policy>
    But I have the same error, yet...!
    what should I do?!

    Have you seen this blog
    "Crossdomain.xml" in ABAP Web AS Server cache

  • I keep receiving security errors when trying to open a pdf.

    I keep receiving a security error when trying to run my javascript program, the function previously worked, but now creates an error after I entered the addWaterMark function. I have put my whole code below for my script.
    The basic function is to load a text file into an array which has the path and file location, open the document, add a watermark, save the file, close the file, then repeat for the next array position.
    I am using Acrobat Standard so I am unable to debug using the console, therefore I am struggling to understand what I am doing wrong. I will point out that I am not a fluent programmer, only have a basic knowledge of programming.
    Code
    app.addSubMenu(
      cName:"Extras",
      cParent:"Edit"
    app.addMenuItem(
      cName:"Import File",
      cParent:"Extras",
      cExec:"main()"
    function main()
      var fileCount = 0
      var listOfFiles = []
      listOfFiles = importData()
      amountOfFiles = listOfFiles.length
      for (var i =0; i<listOfFiles.length; i++)   //calculates amount of entries in the array listOfFiles
      newFile = openFile(listOfFiles[i]) //Opens current file
      var d = app.activeDocs; //Gets current document title name 
      addWater(d[0]);
      app.execMenuItem("Save");
      for( var x in d ) d[x].closeDoc();
    function addWater(myName)
    { app.alert("watermark",0);
      myName.addWatermarkFromText(
      cText: "OBSOLETE",
      cFont: "Arial",
      nFontSize:36,
      aColor: color.red,
      nOpacity: 0.5
    //function SaveFile saves the current file but with an addition of WM to the filename
    saveFile = app.trustedFunction(function(currentDoc, currentFileName)
      { app.alert("savefile",0);
      app.beginPriv();
      currentDoc.saveAs(currentFileName);
      app.endPriv();
    //function openFile which opens the file named in the variable currentFilename
    openFile = app.trustedFunction(function(currentFileName)
      {app.alert("openfile" + currentFileName,0);
      app.beginPriv();
      app.openDoc(currentFileName);
      app.endPriv();
    //importData function imports the paths and filenames contained in the list.txt located on the desktop
    importData = app.trustedFunction(function()
      {app.alert("import",0);
      app.beginPriv();
      cFilePath = "/C/Users/103019944/Desktop/File_List.txt";
      var stmData = util.readFileIntoStream(cFilePath);
      var cData = util.stringFromStream(stmData);
      var cMsg = cData;
      var fileArray = cMsg.split("\r\n");
      for (var i =0; i<fileArray.length; i++)
      return(fileArray);
      app.endPriv();

    I have found the error, you are quite correct I had an extra letter in the filename, I thought I'd checked this but just shows that sattention to detail is the key.
    The script works perfectly now, thanks you for your help, really appreciated.
    Thanks again
    Ben

  • How can I fix 2121 sandbox security error, local swf MP3 player test calls MP3's from website?

    1st Issue.  I am a new user and am fighting #2121, #2044 & #2048 Flash security errors in getting an MP3 player to work as I test the fla file in Flash CS4 on my local computer.  The fla in Flash and swf in Dreamweaver calls mp3 files from our host server on the internet.
    After reading various sparce posts and Adobe articles on this issue, I have added a crossdomain.xml file at our websites root (see file below) and added the code, flash.system.Security.allowDomain in line 1 of the action script of the flash fla to allow our site access (-see script below).  These efforts have helped get the player to work better on our test site.
    But, I am still getting the 2121 error within Flash CS4 as I debug the player or play the swf in live view within Dreamweaver.  Playing the fla or swf will lock-up the Flash 10 player and crash the program. I am having the mp3 player access the mp3 files from our web site as I test the fla.
    Here is the debug message I am getting:
    Attemping to launch and connect to Player using URL C:\Web Site Files\Plank Productions afc\Plank Productions 2010\site\MP3_List_Player_AS3.swf [SWF] C:\Web Site Files\Plank Productions afc\Plank Productions 2010\site\MP3_List_Player_AS3.swf - 209827 bytes after decompression SecurityError: Error #2121: Security sandbox violation: Sound.id3: file:///C/Web%20Site%20Files/Plank%20Productions%20afc/Plank%20Productions%202010/site/MP3%5FList %5FPlayer%5FAS3.swf cannot access . This may be worked around by calling Security.allowDomain.
    at flash.media::Sound/get id3()
    at com.afcomponents.mp3player::MP3Player/get id3()
    at com.afcomponents.mp3player::MP3Player/handleBuffe ring()
    Here is the crossdomain xml code:
    <?xml version="1.0" encoding="utf-8"?>
    <?xml version="1.0"?><!DOCTYPE cross-domain-policySYSTEM "http://www.macromedia.com/xml/dtds/cross-domain- policy.dtd">
    <cross-domain-policy>
    <allow-access-from domain="www.plankproductions.com" secure="false"/>
    <allow-access-from domain="plankproductions.com" secure="false"/>
    </cross-domain-policy>
    Here is the AS3 in line 1 of the Fla file that I added:
    flash.system.Security.allowDomain("www.plankproductions.com", "plankproductions.com");
    2nd Issue.  The online playback of the mp3 player will play about 4-7 mp3’s then lock-up in Internet Explorer 8 on a pc.  I think that is related to flash security, not sure, I do not know how to debug the mp3 player on the web site.
    http://plankproductions.com/pptemplate_afc_mp3.shtml
    Questions.
    -How can I resolve the error 2121?
    -What as3 code do I need to target the local c drive to have security clearance and work properly, is this the problem?
    -Why is the mp3 player locking up on the web page?
    Thank you in advance for any help.
    Operating System: Windows XP Professional, CS4 Web Premium

    Do you have the standard or debug player installed?  Such errors should not occur with the standard player.
    See http://helpx.adobe.com/flash-player/kb/find-version-flash-player.html#main_Find_Flash_Play er_version_type_and_capabilities__Flash_developers_only_

  • Java.sql.SQLException: Error while trying to retrieve text for error ORA-24

    Hi All,
    Am having serious problem with ORA-24327 and the behavior is very very unpredictable. I have couple of environment where the same error comes in different context. The recent one was surprising. I have describe bellow the environment configuration and the stack trace. The error which surprised me was when I use type � 3 driver while starting weblogic I get ORA �24327 but when I use Type �4 it starts properly. If you could kindly provide solution it would be great help. I would also appreciate if u can provide information which driver to use where performance is the major concern. I would also appreciate if u could provide feed-back from the industry about booth the driver. Apart from that I have couple have environment where it occurs when 10/12 user access simultaneously. All the open connection is closed in program properly still am getting the error.
    Thanks in anticipation.
    Cheers,
    Tapas
    Environment
    OS - SunOS 5.8 Generic_108528-07 sun4u sparc SUNW,Ultra-Enterprise
    JDK - Solaris VM (build Solaris_JDK_1.2.2_07, native threads, sunwjit)
    Weblogic - 5.1.0 Service Pack 9 04/05/2001 14:59:53 #105983
    Oracle � 8.1.6
    Delaying 10 seconds before making a beuatpool pool connection.
    Pool 1 (Type �3 )
    weblogic.jdbc.connectionPool.beuatpool=\
    url=jdbc:weblogic:oracle,\
    driver=weblogic.jdbc.oci.Driver,\
    loginDelaySecs=10,\
    initialCapacity=10,\
    maxCapacity=20,\
    capacityIncrement=2,\
    allowShrinking=true,\
    shrinkPeriodMins=10,\
    refreshMinutes=10,\
    testTable=dual,\
    props=user=xxx;password=xxx;server=xxxx
    Pool 2(Type �4)
    weblogic.jdbc.connectionPool.thinPool=\
    url=jdbc:oracle:thin:@xxx:1521:xxx,\
    driver=oracle.jdbc.driver.OracleDriver,\
    loginDelaySecs=1,\
    initialCapacity=1,\
    maxCapacity=10,\
    capacityIncrement=1,\
    allowShrinking=true,\
    shrinkPeriodMins=15,\
    refreshMinutes=15,\
    testTable=dual,\
    props=user=xxx;password=xxx;server=xxx:1521:xxx
    allow=everyone
    ---------- LOGIN ERROR CODE: 24327
    java.sql.SQLException: Error while trying to retrieve text for error ORA-24327 �
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at java.sql.SQLException.<init>(SQLException.java:43)
    at weblogic.db.oci.OciConnection.getLDAException(OciConnection.java:143)
    at weblogic.jdbcbase.oci.Driver.connect(Driver.java:157)
    at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(Con
    nectionEnvFactory.java:149)
    at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(Con
    nectionEnvFactory.java:109)
    at weblogic.common.internal.ResourceAllocator.makeResources(Compiled Cod
    e)
    at weblogic.common.internal.ResourceAllocator.<init>(Compiled Code)
    at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.j
    ava:330)
    at weblogic.jdbc.common.internal.JdbcInfo.initPools(Compiled Code)
    at weblogic.jdbc.common.internal.JdbcInfo.startup(JdbcInfo.java:200)
    at weblogic.jdbc.common.internal.JdbcStartup.main(JdbcStartup.java:11)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.t3.srvr.StartupThread.runMain(StartupThread.java:219)
    at weblogic.t3.srvr.StartupThread.doWork(Compiled Code)
    at weblogic.t3.srvr.PropertyExecuteThread.run(PropertyExecuteThread.java
    :62)
    ---------- LOGIN ERROR CODE: 24327
    ---------- LOGIN ERROR CODE: 24327
    Fri Aug 31 00:57:22 GMT-05:00 2001:<I> <JDBC Pool> Sleeping in createResource()
    Fri Aug 31 00:57:23 GMT-05:00 2001:<E> <JDBC Pool> Failed to create connection p
    ool "beuatpool"
    weblogic.common.ResourceException: weblogic.common.ResourceException:
    Could not create pool connection. The DBMS driver exception was:
    java.sql.SQLException: Error while trying to retrieve text for error ORA-24327 -
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at java.sql.SQLException.<init>(SQLException.java:43)
    at weblogic.db.oci.OciConnection.getLDAException(OciConnection.java:143)
    at weblogic.jdbcbase.oci.Driver.connect(Driver.java:157)
    at java.sql.DriverManager.getConnection(Compiled Code)
    at java.sql.DriverManager.getConnection(DriverManager.java:137)
    at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(Con
    nectionEnvFactory.java:172)
    at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(Con
    nectionEnvFactory.java:109)
    at weblogic.common.internal.ResourceAllocator.makeResources(Compiled Cod
    e)
    at weblogic.common.internal.ResourceAllocator.<init>(Compiled Code)
    at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.j
    ava:330)
    at weblogic.jdbc.common.internal.JdbcInfo.initPools(Compiled Code)
    at weblogic.jdbc.common.internal.JdbcInfo.startup(JdbcInfo.java:200)
    at weblogic.jdbc.common.internal.JdbcStartup.main(JdbcStartup.java:11)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.t3.srvr.StartupThread.runMain(StartupThread.java:219)
    at weblogic.t3.srvr.StartupThread.doWork(Compiled Code)
    at weblogic.t3.srvr.PropertyExecuteThread.run(PropertyExecuteThread.java
    :62)
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at weblogic.common.ResourceException.<init>(ResourceException.java:18)
    at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(Con
    nectionEnvFactory.java:182)
    at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(Con
    nectionEnvFactory.java:109)
    at weblogic.common.internal.ResourceAllocator.makeResources(Compiled Cod
    e)
    at weblogic.common.internal.ResourceAllocator.<init>(Compiled Code)
    at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.j
    ava:330)
    at weblogic.jdbc.common.internal.JdbcInfo.initPools(Compiled Code)
    at weblogic.jdbc.common.internal.JdbcInfo.startup(JdbcInfo.java:200)
    at weblogic.jdbc.common.internal.JdbcStartup.main(JdbcStartup.java:11)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.t3.srvr.StartupThread.runMain(StartupThread.java:219)
    at weblogic.t3.srvr.StartupThread.doWork(Compiled Code)
    at weblogic.t3.srvr.PropertyExecuteThread.run(PropertyExecuteThread.java
    :62)
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at weblogic.common.ResourceException.<init>(ResourceException.java:18)
    at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(Con
    nectionEnvFactory.java:125)
    at weblogic.common.internal.ResourceAllocator.makeResources(Compiled Cod
    e)
    at weblogic.common.internal.ResourceAllocator.<init>(Compiled Code)
    at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.j
    ava:330)
    at weblogic.jdbc.common.internal.JdbcInfo.initPools(Compiled Code)
    at weblogic.jdbc.common.internal.JdbcInfo.startup(JdbcInfo.java:200)
    at weblogic.jdbc.common.internal.JdbcStartup.main(JdbcStartup.java:11)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.t3.srvr.StartupThread.runMain(StartupThread.java:219)
    at weblogic.t3.srvr.StartupThread.doWork(Compiled Code)
    at weblogic.t3.srvr.PropertyExecuteThread.run(PropertyExecuteThread.java
    :62)

    Hi,
    I guess you can try some of these:
    - Make sure you're not missing an entry inside your tnsnames.ora file. Thin driver does not require the information inside that file, as opposed to Weblogic's OCI driver. If you are able to connect to the DB using a thin driver, then the problem is most probably (WL)driver-related.
    - Make sure you've properly configured the DB user / password inside your weblogic.properties (config.xml if WL6+).
    - Make sure you're able to access all drivers and classes required (PATH, CLASSPATH, etc...)
    - Make sure the OCI driver version you are using is fully compatible with the Oracle (server) version you are pointing to.
    - Try to access the DB user through some other client (for instance, SQLPlus*).
    Hope this is of some help,
    Freddy.

  • Today I tried to open Safari and what I was presented was several minimized windows stating that there was a security error detected, also a suspicious activity was found in my computer. How do I go by in getting this cleared off?  Help.  Thanks

    MAcBook Pro, 2.4 Ghz Intel Core 2 Duo, 4GB 1067Mhz DDR3, Software Mac OS X Lion 10.7.5 (11G63). 
    Problem:  i tried to open Safari about a couple of hours ago and I was presented with this error message block with an address of http://www.virushealthcheck.com. The message is; Windows detected security error, due to suspicious activity found on your computer.  Contact Windows Certified Live Tech ( 1.866.606.2003).  If I clk the OK button , there are multiple layered windows that will appear after that.  Can't get out of it , except to quit Safari.  earlier today before this happened I was on Facebook, Instagram, responding email cutting and paste transactions and saving it to Microsoft word.  then I turned off my lap top for several hours. When I turned it back on awhile ago, I discovered this problem.  on top of that aI can't even clear the history everything is gray out except for the Earlier today, and the day and date of the month. I tried several times to quit Safari, turn off and turn back on my lap top to no avail.  My question is; How do I go by to in getting this error message when I click on Safari? Does that mean that I might have a virus in my lap top? Please Help.  Thanks.

    Force Quit .
    Press command + option + esc keys together at the same time. Wait.
    When Force Quit window appears, select the Safari if not already.
    Press Force Quit button at the bottom of the window.   Wait.
    Safari will quit.
    Relaunch Safari holding the shift key down.
    http://www.thesafemac.com/fbi-ransomware-virus-rampant/

  • Java.sql.SQLException: Error in allocating a connection. Cause: No Password

    I'm deploying an EJB Module with a CMP in SJAS from SJSE.
    I get the following exception "java.sql.SQLException: Error in allocating a connection. Cause: No PasswordCredential found" the first time a CMP tries to connect to the MS SQL Server database.
    I can connect through the Admin console (PING works fine) but this error hapens in runtime.
    The datasource classname i'm using is "com.sun.sql.jdbcx.sqlserver.SQLServerDataSource" which is suggested by the SJSE.
    Any help will be welcome...
    Nelson Marques

    If you are using Netbeans, then this link might help:
    http://forum.java.sun.com/thread.jspa?forumID=136&threadID=598423
    Otherwise, have you try this ?
    Verify your sun-ejb-jar.xml does not use default-resource-princinpal element:
    <res-ref-name>jdbc/pdisasdb</res-ref-name>
    <jndi-name>jdbc/pdisasdb</jndi-name>
    <default-resource-principal>
    <name>myname</name>
    <password>geheim</password>
    </default-resource-principal>
    </resource-ref>

Maybe you are looking for