Showing posts with label SQL server 2005. Show all posts
Showing posts with label SQL server 2005. Show all posts

Sunday, December 01, 2013

Insufficient SQL database permissions for user '' in database '' on SQL Server instance ''. Additional error information from SQL Server is included below.

Event Type:    Error
Event Source:    Windows SharePoint Services 3
Event Category:    Database
Event ID:    5214
Date:        2/12/2013
Time:        2:51:05 PM
User:        N/A
Computer:    SERVERNAME
Description:
Insufficient SQL database permissions for user '' in database 'SharePoint_ConfigDBXX' on SQL Server instance 'SERVERNAME'. Additional error information from SQL Server is included below.

The EXECUTE permission was denied on the object 'proc_getNewObjects', database 'SharePoint_ConfigDBXX', schema 'dbo'.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

----


The procedure to solve the problem follow these steps:

    Open the SQL Management Studio
    Locate the database that presents the problem in my case was 'SharePoint_Config'
    Open the database and then Security> Roles> Database Roles
    In the right part of the window, right-click the role WSS_Content_Application_Pools and click on properties
    Select from the left menu option "Securables"
    By clicking "Add"
    Select "Specific objects" and click "OK"
    Click "Object Types", select "Stored Procedures" and click "OK"
    Add the stored procedures in the error in my case was the proc_GetNewObjects but it is also important to check whether the following stored procedures are added; proc_FetchDocForUpdate, proc_GetWebMetaInfo, proc_UpdateDirtyDocument, proc_UpdateListItem not I be there to add.
    Click Ok to add these stored procedures
    Teams stored procedures that were added and select "Execute" in the column of "Grant"
    Click "Add" once again
    Select "Specific objects" and click "OK"
    Click "Object Types", select "views" and click "OK"
    Check if the view is added UserData otherwise select to add
    Click on ok to add this view
    Teams eye that was added and select "Select" column of "Grant"
    Click on ok to finish.

Once this procedure done mistakes of 5214 should no longer appear in the event viewer of the server.

ref: http://mundomoss.blogspot.com.au/2010/04/sharepoint-error-5214-execute.html

Wednesday, October 01, 2008

Read SharePoint documents using SQL Server query

Retrieve documents form the SharePoint website and display the same in your Windows forms application. No need to use SharePoint webservices or SharePoint Object model. Just run through the query to fetch the documents from the SharePoint using SQL query.
Sample Code:
private void btnload_Click(object sender, EventArgs e)
{
string RootSite = txtsharepointsite.Text.ToString(); // "http://w2czbmlg01:12345/";
// Opening SQL connection for Microsoft SQL Server 2005
SqlConnection MySQLConnection = new SqlConnection(@"Data Source=W2CZBMLG01;Initial Catalog=WSS_Content_12345;Integrated Security=True");
// Passing SQL command text
string strSQLcmd = "SELECT CONVERT(nvarchar(36), Id) AS ID, '" + RootSite + "'+ DirName + '/' + LeafName AS Name, LeafName FROM dbo.Docs WHERE (LeafName NOT LIKE 'template%') AND LeafName LIKE '%.doc' ORDER BY DirName, LeafName";
SqlCommand MySQLCommand = new SqlCommand (strSQLcmd, MySQLConnection);
MySQLConnection.Open();
MySQLCommand.ExecuteNonQuery();
// Dats set
DataSet Docds = new DataSet("Docs");
SqlDataAdapter MySQLAdapter = new SqlDataAdapter();
MySQLAdapter.SelectCommand = MySQLCommand;
MySQLAdapter.Fill(Docds, "Docs");
for (int i = 0; i < Docds.Tables["Docs"].Rows.Count; i++)
{
// list populates
lstdocuments.Items.Add(Docds.Tables["Docs"].Rows[i].ItemArray[2].ToString());
//lstdocuments.DisplayMember = Docds.Tables["Docs"].Rows[i].ItemArray[2].ToString();
//lstdocuments.ValueMember = Docds.Tables["Docs"].Rows[i].ItemArray[1].ToString();
}
}
}


Just create a Windows Form application and add this code in the form load or button click to get the result.

Friday, August 29, 2008

Shrink Database files in Sharepoint Database

Let's see simple steps to shrink the database files for the SharePoint environment.
First check out the properties first for our SharePoint database files.

Now let's run the SQL command to shrink the database data file
Now let's run the SQL command to shrink the database log file
After these execution look at the property again to check the difference of after shrinking the files.

Friday, May 30, 2008

None of the selected features can be installed or upgraded. Setup cannot proceed since no

While installing Microsoft SQl 2005 you may face this message...

TITLE: Microsoft SQL Server Setup------------------------------
None of the selected features can be installed or upgraded. Setup cannot proceed since no effective change is being made to the machine. To continue, click Back and then select features to install. To exit SQL Server Setup, click Cancel.
For help, click: http://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.06&EvtSrc=setup.rll&EvtID=SQLSetup90&EvtType=28108
------------------------------BUTTONS: OK------------------------------
To solve this problem:
To get around this issue, run the setup.exe from the SQL installation source from your Run command with the parameter SKUUPGRADE=1 or UPGRADE=1.
For more ref
Hope this helps you people!

Wednesday, April 04, 2007

MOSS Form Authentication -- EXECUTE permission denied on object 'aspnet_CheckSchemaVersion', database 'aspnetdb', schema 'dbo'

When enabled form authentication in my MOSS 2007 i'm getting "EXECUTE permission denied on object 'aspnet_CheckSchemaVersion', database 'aspnetdb', schema 'dbo'"

Later exploring the problem and found the solution. By executing the following SQL commands will solve the problem.

USE aspnetdb
GO
sp_addrolemember 'aspnet_Membership_FullAccess', 'Network Service'


“Network Service” is your user name.

ASP.NET MVC - Sport Facility Booking system

  The project relies on some external service providers. Thus accessing them via their API requires authentication. An API Key need to be su...