Database Permissions

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

This thread is closed to new posts. You must sign in to post in the forums.
10/17/2012 10:05:54 AM
Gravatar
Total Posts 118

Database Permissions

mojoSetup has detected that the database user does not have permission to alter the database schema.

I'm setting mojoPortal on Windows Server 2003 Enterprise Edition Service Pack 2. I've created a db in SQL Server 2005 and am following this connection string in user config. 

<add key="MSSQLConnectionString" value="server=localhost;UID=uid;PWD=pword;database=dbase" />

I am able to manually create a table in the database and add data to it. 

I've tested the connection using Data Link Properties, test succeeds.

I've tried this using the 'sa' account in SQL and with an independent login. 

Any ideas?

10/17/2012 12:31:08 PM
Gravatar
Total Posts 2239

Re: Database Permissions

Make sure that SQL Authentication is enabled.

HTH,
Joe D.

10/17/2012 12:41:38 PM
Gravatar
Total Posts 118

Re: Database Permissions

Hi Joe, 

thanks for the response, both 'Windows Authentication Mode' and 'SQL Server and Windows Authentication Mode' are greyed out with neither selected. 

10/17/2012 12:46:44 PM
Gravatar
Total Posts 18439

Re: Database Permissions

It sounds like it is connecting but not able to alter the schema.

Are you putting the connection string in Web.config or user.config?

Obviously the sa user should be able to alter the schema but if the connection string setting is in more than one place in user.config, the one towards the bottom of the file wins, so in that situation if you were editing a copy of the setting closer to the top it would have no effect if there was one lower in the file with a less privledged user.

Other than that I would make sure you have all the service paks for sql 2005 installed.

Hope that helps,

Joe

10/17/2012 1:25:27 PM
Gravatar
Total Posts 118

Re: Database Permissions

 

Thanks,

I've added the connection string to both the web.config and user.config and checked to see that only one version of the connection string is in there. 

I'll check for SQL Server updates. 

10/17/2012 3:42:28 PM
Gravatar
Total Posts 2239

Re: Database Permissions

Hi,

With regard to the authentication mode being grayed out, it sounds like you didn't connect to the sql instance using a user which has the appropriate permissions to change that setting. Make sure you connect with a user that has been assigned to the sysadmin server role.

If SQL Server Auth isn't enabled, the 'sa' user isn't going to work. Also, the 'sa' user disabled by default if SQL was installed with the Server Auth mode set to Windows.

HTH,
Joe D.

10/18/2012 2:51:49 AM
Gravatar
Total Posts 118

Re: Database Permissions

Okay, I've logged into SQL Management Studio as the sa user (which is assigned as sysadmin) and is the owner of my db. The two types of authentication are still greyed out. 

I tried creating a user specifically for this database, but I got the same error. 

10/18/2012 3:21:25 AM
Gravatar
Total Posts 118

Re: Database Permissions

I just tried to create a new user and select a database schema (as trying anything now)..

Double click on user >> General tab >> Default schema

and I get the following error...

"Failed to retrieve data for this request. (Microsoft.SqlServer.Express.SmoEnum)"

"Operation not supported on SQL Server 2000. (Microsoft.SqlServer.Express.SqlEnum)"

I know that mojoPortal doesn't support SQL 2000, but  when I check help >> about >> I'm told that it's SQL 2005. 

Could it be that I'm not running SQL 2005?

10/18/2012 6:46:07 AM
Gravatar
Total Posts 18439

Re: Database Permissions

I would look under control panel > programs

Its possible that you have SQL 2000 but also have SQL 2005 and/or SQL 2005 management tools

typically with SQL Express and especially when its installed on a box that alread has sql 2000 it would be installed with an instance name so you would need localhost\SQLExpress instead of just localhost ie server\instance

If you only have sql 2005 management tools and only sql 2000 it won't work

Hope that helps,

Joe

You must sign in to post in the forums. This thread is closed to new posts.