Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...database settings for dnn site in sql2005database settings for dnn site in sql2005
Previous
 
Next
New Post
10/24/2012 9:04 AM
 
you should make sure to use a single schema - each database object (procedures, views, tables) existing only once to avoid further issues. You must have used a different schema during an upgrade than during initial install.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
10/24/2012 9:49 AM
 

do you think it would be safe to  open up Programmability >> Stored Procedures >>
and individually delete all the stored procedures not belonging to the 'dbo' schema?
(or run a script to delete all the duplicate stored procedures, which would be quicker).

or is there a safer / better way to getr around the problem of having 2 schemas - perhaps in code ? (by changing ownership).

I can't just delete one of the schemas becasue I get an error (3729) that it is being referenced by a stored procedure

thanks.

 
New Post
10/24/2012 10:52 AM
 
Mark,

If you have a backup that you can restore if you break the site, then you can delete individual stored procedures BUT you should only delete those that are duplicated under the correct dbo schema

If that leaves you with a number of additional procedures that exist under another schema but not dbo, you should first create the dbo procedure and then delete the duplicate

The most important thing here is to make a database backup and test that you can restore it before you start, and then test, test, test after you do your deletes.

Bill

 
New Post
10/25/2012 10:28 AM
 

I've just checked the stored procedures again.
Even though there are duplicate entries, the items which are failing are not duplicated.

Under the dbo schema - the stored procedures which are failing do not exist.
They only exist under the other schema, i will call this schema 'nigel'.

Last time I ran the upgrade with 'nigel' as the default schema  - I got the permission errors.
however, I have reverted back to 'nigel' as the default schema (in >> Security >> users >> nigel >> Properties)
[note, I'm not certain what I used as the owner of the schema originally under security >> schemas >> nigel >> properties]

And now the upgrade has run successfully !
Albet except for minor errors, which don't seem to list any errors as such inside the log files:

These are all the failures:

00:02:31.114 -   Executing Application Upgrades: 05.03.00 Error!
00:02:34.349 -   Executing Application Upgrades: 05.04.03 Error!
00:02:34.474 -   Installing Package File HTML_Community_05.01.00_Install:  Error!
00:02:36.818 -   Installing Package File HTML_Community_05.01.02_Install:  Error!
00:02:39.349 -   Installing Package File HTML_Community_05.04.03_Install:  Error!
00:02:45.928 -   Installing Package File Messaging_01.01.00_Install:  Error!
00:02:46.084 -   Installing Package File Taxonomy_01.01.00_Install:  Error!
00:02:47.772 -   Installing Package File CorePermissionProvider_05.01.00_Install:  Error!

example of the log file errors:

05_01_00
/* change default logging to off */
/********************************/
UPDATE {databaseOwner}[{objectQualifier}EventLogConfig] set [LoggingIsActive]=0 where [LogTypeKey] is null and [LogTypePortalID] is null
GO
/*  add helper proc to create/update core audit events */
/********************************/
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'{databaseOwner}[{objectQualifier}SaveCoreAuditTypes]') AND OBJECTPROPERTY(id, N'IsPROCEDURE') = 1)
  DROP PROCEDURE {databaseOwner}{objectQualifier}SaveCoreAuditTypes
GO
CREATE PROCEDURE {databaseOwner}{objectQualifier}SaveCoreAuditTypes
 @LogTypeKey nvarchar(35), 
 @LogTypeFriendlyName nvarchar(50), 
 @LogTypeOwner nvarchar(100), 
...............................................................................................

05_03_00
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'{databaseOwner}[{objectQualifier}ContentTypes]') AND OBJECTPROPERTY(id, N'IsTable') = 1)
 BEGIN
  CREATE TABLE {databaseOwner}[{objectQualifier}ContentTypes]
  (
   [ContentTypeID] [int] IDENTITY(1,1) NOT NULL,
   [ContentType] [nvarchar](100) NOT NULL,
   CONSTRAINT [PK_{objectQualifier}ContentTypes] PRIMARY KEY CLUSTERED ( [ContentTypeID] ASC )
  )
 END
GO
/* Add ContentItems Table */
...............................................................................................

_05_04_03
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'{databaseOwner}[{objectQualifier}AddEventLog]') AND OBJECTPROPERTY(id, N'IsPROCEDURE') = 1)
  DROP PROCEDURE {databaseOwner}{objectQualifier}AddEventLog
GO
CREATE PROCEDURE  {databaseOwner}{objectQualifier}AddEventLog
 @LogGUID varchar(36),
 @LogTypeKey nvarchar(35),
...............................................................................................

btw,
I don't have a table called sysobjects - should I?



 
New Post
10/25/2012 4:31 PM
Accepted Answer 
Mark,

Make up your mind whether you are going to use nigel or dbo as the permanent schema for your installation.

RECOMMENDED - use dbo - because too many times it is already hard coded into procedures

Make sure there is ONE copy of every stored procedure, and that the ONE copy uses the ONE permanent schema you are going to use.

Once you have done this never ever touch the schema again.

Bill
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...database settings for dnn site in sql2005database settings for dnn site in sql2005


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out