Installing multiple DNNs on single SQL Server DB causes install error

Just ran into this one: when installing a second DNN pointing to an existing SQL db already holding another DNN installation I get the following error during install:

00:00:18.736 - Executing Additional Scripts:
00:00:18.746 -   Creating Portal: DotNetNuke Default Portal
00:00:19.758 -   Error: INSERT statement conflicted with COLUMN FOREIGN KEY constraint 'FK_DMXTest_TabPermission_DMXTest_Permission'. The conflict occurred in database 'DMXP', table 'DMXTest_Permission', column 'PermissionID'. The statement has been terminated.
00:00:19.758 -   Portal failed to install:

Installation Complete

Well, the installation is far from complete of course as there is no portal. This means one has to manually remove the last installation and start from scratch as DNN will obviously fail to even start up.

FYI: both installs were fresh 3.1.0 installs and used a different ObjectQualifier to keep them apart.


Peter Donker
bring2mind.net
Home of Document Exchange, the document management solution for DNN
0
donker
8/5/2005 10:48:41 AM
asp.net.dotnetnuke 25171 articles. 0 followers. Follow

11 Replies
688 Views

Similar Articles

[PageSpeed] 20

I believe because of the Membership provider DNN 3.x will only allow one host installation per SQL DB.

A compelling reason to continue on with 2.x in some cases.

0
smartsource
8/5/2005 12:04:41 PM
I need that feature too: one db, a dnn for my intranet (windows
authentication and integrated applications) and another one for intenet
reserved area.
Is any work planned for future releases ?
Thanks

0
garidan
8/5/2005 1:21:02 PM
Try changing the web.config file. There is a key named <add key=”InstallMemberRole” value=”true” />, change it to <add key=”InstallMemberRole” value=”false” />. This, according the DNN documentation, will make the install process not to run the member role scripts.

Patrizio

MCP, MCAD, MCSD, MCSD.NET, MCT, MBS Master Developer
0
Patrizio
8/5/2005 1:54:34 PM
Peter,

This fix for 3.1.1 might have something to do with your problem :

http://support.dotnetnuke.com/issue/ViewIssue.aspx?id=1446

Geert Veenstra
0
Geert
8/5/2005 4:26:56 PM
 Geert wrote:
Peter,

This fix for 3.1.1 might have something to do with your problem :

http://support.dotnetnuke.com/issue/ViewIssue.aspx?id=1446


Thanks Geert for the information.
I was planning to merge to DNN DBs in one to minimize admin related work. 
I will wait until the next release.

Patrizio
MCP, MCAD, MCSD, MCSD.NET, MCT, MBS Master Developer
0
Patrizio
8/5/2005 4:58:30 PM
 Geert wrote:
Peter,

This fix for 3.1.1 might have something to do with your problem :

http://support.dotnetnuke.com/issue/ViewIssue.aspx?id=1446


Geert,
I tried your solution and it did not work for me in 3.1
I tried out 3.1.1 to see if this problem had been fixed.  But I still get the same error in dnn 3.1.1. 

So I decided to dig deeper and here is what I found in 3.1.1.  I can see the fix you have provided in your link above has been implemented in the file 03.01.01.SqlDataProvider.  But as I watch the install scripts run, I notice that 03.01.01.SqlDataProvider gets executed after DotNetNuke.Data.SqlDataProvider.  When I check the DotNetNuke.Data.log and DotNetNuke.Schema.log there are errors for the EventLog foreign keys because they are missing {objectQualifier}.  Not a big deal for the DotNetNuke.Schema.SqlDataProvider because it executes all the other SQL statements, but it appears that if the DotNetNuke.Data.SqlDataProvider encounters one error, then the whole script does not execute.  Thus no data gets populated the tables such as

SET IDENTITY_INSERT {databaseOwner}[{objectQualifier}Permission] ON

INSERT INTO {databaseOwner}[{objectQualifier}Permission] ([PermissionID], [PermissionCode], [ModuleDefID], [PermissionKey], [PermissionName]) VALUES (1, 'SYSTEM_MODULE_DEFINITION', -1, 'VIEW', 'View')

INSERT INTO {databaseOwner}[{objectQualifier}Permission] ([PermissionID], [PermissionCode], [ModuleDefID], [PermissionKey], [PermissionName]) VALUES (2, 'SYSTEM_MODULE_DEFINITION', -1, 'EDIT', 'Edit')

INSERT INTO {databaseOwner}[{objectQualifier}Permission] ([PermissionID], [PermissionCode], [ModuleDefID], [PermissionKey], [PermissionName]) VALUES (3, 'SYSTEM_TAB', -1, 'VIEW', 'View Tab')

INSERT INTO {databaseOwner}[{objectQualifier}Permission] ([PermissionID], [PermissionCode], [ModuleDefID], [PermissionKey], [PermissionName]) VALUES (4, 'SYSTEM_TAB', -1, 'EDIT', 'Edit Tab')

INSERT INTO {databaseOwner}[{objectQualifier}Permission] ([PermissionID], [PermissionCode], [ModuleDefID], [PermissionKey], [PermissionName]) VALUES (5, 'SYSTEM_FOLDER', -1, 'READ', 'View Folder')

INSERT INTO {databaseOwner}[{objectQualifier}Permission] ([PermissionID], [PermissionCode], [ModuleDefID], [PermissionKey], [PermissionName]) VALUES (6, 'SYSTEM_FOLDER', -1, 'WRITE', 'Write to Folder')

SET IDENTITY_INSERT {databaseOwner}[{objectQualifier}Permission] OFF

If these statements do not execute then the error that started this thread occurs.  To fix this problem, I had to correct the DotNetNuke.Data.SqlDataProvider and DotNetNuke.Schema.SqlDataProvider to include {objectQualifier} where missing.  Then delete the database tables and stored procedures (not an easy thing to do unless you write a script to automate it.).  Then do a fresh install of the application. 

This apparantly only applies to installing the second or more instances of DNN in the same database.  If I do not hear any disenting opinions in the next few days, I will write this up as a bug in Gemini.

0
ldace
8/26/2005 11:58:53 AM
I noticed this is the same fix as well http://forums.asp.net/1011022/ShowPost.aspx
0
ldace
8/26/2005 12:06:52 PM
Geert,
running the script throws the following error:
System.Data.SqlClient.SqlException: löschen von Index 'dbo.DNN_EventLogConfig.LogTypeKey_LogTypePortalID' ist nicht möglich, da nicht im Systemkatalog vorhanden. at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText) at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions) DROP INDEX dbo.[DNN_EventLogConfig].[LogTypeKey_LogTypePortalID] System.Data.SqlClient.SqlException: Ein Index für die DNN_EventLogConfig-Tabelle mit dem Namen 'IX_DNN_LogTypeKey_DNN_LogTypePortalID' ist bereits vorhanden. at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText) at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions) CREATE UNIQUE NONCLUSTERED INDEX [IX_DNN_LogTypeKey_DNN_LogTypePortalID] ON dbo.[DNN_EventLogConfig] ([LogTypeKey], [LogTypePortalID])
Sebastian Leupold
gamma concept mbH

DeutschNetNuke = DotNetNuke in German

DNN Project UserDefinedTable
0
leupold
8/26/2005 1:25:39 PM

I had problems with a missing object qualifier in the installation scripts.  The {objectQualifier} tag was missing from several of the Event primary and foreign keys. 

Work Around…
The following two find/replace operations fixed the problems: 
Find:  FK_Event 
Replace: FK_{objectQualifier}Event
Find:  PK_Event 
Replace: PK_{objectQualifier}Event

Files:
03.01.00.SqlDataProvider
03.01.01.SqlDataProvider
DotNetNuke.Data.SqlDataProvider
DotNetNuke.Schema.SqlDataProvider

Use and install package with these modified sql scripts and multiple dnn installs sharing the same db works fine.
they all will share the same membership tables.

0
smartsource
8/26/2005 1:33:44 PM
I testet this with 3.1.1 but still have no luck. 

00:00:20.593 - Executing Additional Scripts:
00:00:20.593 -   Creating Portal: My Website
00:00:20.953 -   Portal failed to install:
00:00:20.953 - Installing Optional Resources:

Installation Complete


no further information.
Databases are fully created but without any data in Portals, PortalAlias and many others. 

Have you made other changes, that i have missed ??
What about the web.config:

add key="InstallMemberRole" value="false" ---> correct ???
add key="AutoUpgrade" value="true"  ----> have you changed this ???

Thanks!
 
0
hera
9/1/2005 4:22:26 PM
Had same issue caused by sql scripts not using object qualifier for events table.

Use the work around for Problem 2 from this post.

New installs worked using the modified scripts. 
0
smartsource
9/1/2005 10:55:15 PM
Reply:

Similar Artilces:

How does the installer install DB in SQL Server.
Hi All, I wonder how the installer do the DB installation when user choose to use SQL Server, I mean how does it detect what dbs are already in SQL Server, etc, etc. (is there a common dialog box for installing db in sql??) I would like to learn how the whole installer is created, where can I download the Installer project. If no, where can I found related tutorial on web? Thanks. I found this http://www.fawcette.com/vsm/2002_11/online/ferracchiati/default.aspx online but the articles didn't say much about installing database in SQL Server. Thanks in advance! Edwin Edwin, ...

dnn311: 1 db, multiple installations --> error on second install
Hi there,Does anyone recognize the following (and have a solution for it?):- one msSqlserver Database- two dnn311 installations i.e.: 2 filedirectories, 2 virtual directories (same (web)server, different webadresses)-  in the web.config files - sqldataproviders: two different objectQualifiers "demo_" and "dnn3_", one per web.config fileInstallation of first site is ok. (http://local/dnn311)Installation of second site errors. (http://local/dnn311demo).1. Errormessage:00:00:10.995 - Executing Additional Scripts:00:00:10.995 -   Creating Portal: My Website00:00:12....

Can't seem to install SQL server 2005? Install completes, but where is SQL Server 2005
I went to one of the Microsoft "Ready To Launch" events over a year ago. Microsoft was gracious and gave everyone who attended a free copy of Visual Studio 2005 and SQL Server 2005. I have installed the Visual Studio and use it all of the time. I also installed the SQL server 2005 but I can not find the application on my computer. After the install the only items that appear to have been installed are the following: SQL Server Configuration tools(SQL Server Configuration manager,SQL Server  Error and usage reporting, SQL Server surface area confiuration, Reporting Services configu...

Install Web application along with sql server db using a single setup ?.......
How to create a web application along with its sql server database using a single msi  or exe setup ?...... Can i do it with web deployment projects option ?.......I need to run a create database script and an installation data script......... Please Help Hi nbsamurai, I have answered the duplicate post. Please check it in the following link: DB scripts integration with installerhttp://forums.asp.net/t/1263659.aspx  Sincerely,Benson YuMicrosoft Online Community Support Please remember to mark the replies as answers if they help and unmark them if they provide no help. This can...

SQL Server 2005 Installation problems with SQL Server Express & SQL Server 2000
Hi Guys, I have had SQL Server Express and Sql Server Management Studio Express installed on my machine for some time and recently tried to install a trial of SQL Server 2005 as well.  (Yes, I'm migrating from Visual Studio Express to Visual Studio Professional, just as in tended!) Everything went fine except that nothing seemed to be installed.  I searched in all the obvious places - both on the Start/Programs menu and on the hard-drive: nothing. A check under Add/Remove Programs showed that Sql Server 2005 Express was installed, but called SQL Server 2005. So after a number o...

Error : An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does
Hi All, i am using tha conncetion string in web.config. <add name="MyLocalSqlConnection" connectionString="Data Source=.\SqlExpress;AttachDbFilename=|DataDirectory|\SqlServer\OC00003SQL.mdf;User Instance=false" providerName="System.Data.SqlClient"/>  Instance=false and true both i have used  but i am getting error like that. on my web hosting site  Error : An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Serv...

Installing DotNetNuke error
Hi,This is what I did:1) I installed MSDE using the following command: "setup SAPWD=aaaa"2) Using a tool called dbamgr2k, I then added a "dotnetnuke2" database and added a user ("aa") with password ("aaaa", and gave it db_owner permissions on the "dotnetnuke2" database. 3)  I edited the relevant line in web.config: " <add key="SiteSqlServer" value="Server=ASSAF-AMD64;Database=dotnetnuke2;uid=aa;pwd=****;" />"4) I started the installation scriptWould really apreciate if someone could help me on this,Thanks,Assaf. When trying to install the DotNetNuke using MSDE I g...

installation package install SQL Server and framework?
Hello, How can I built package that can install SQL Server and dot net framework? I want my client just to run a single setup file. All remaining accessories should be installed? How can I do it either via web project setup or desktop application setup or via third party softwares? If I develop database using professional/express edition, and my client use compact edition, then can it make problem? ? Installation package should install every thing the sql server,database,Application. Thanks & Regards,~~ Please mark the post as ANSWER if it helps you ~~  SQL Serv...

Error during installation of SQL Server.
I had sql server installed and had to install because of some problem. I uninstalled SQL Server. and then tried to install it again. However, while during the installation of "Workstation Components, Books Online and Development Tools", I got this error "Sample databases are higher version than SQL server instance specified. Sample databases cannot be attached to older SQL instance." . Now I am not able to use SQL Server.  Any help? Hi identityconcealed, From your description, it seems that your problem was because you SQL Server 2005 was not completely uninstal...

Sql Server Install Error
Hi everbody,İ am install sql server 2008 my computer but some error  This Error :  Hi! May be registry corrupted, actually? The article from error message does not help you?Best Regards,Alexander, Excel reports fan :)-----------------Now working with free version: http://www.monoreport.com/...

Error installing for SQL Server
What can cause the installation error:--------- DotNetNuke Upgrade ErrorERROR: Could not connect to database.Login failed for user 'Nuke'. Reason: Not associated with a trusted SQL Server connection. -----------my web.config connection string is <add key="SiteSqlServer" value="Server=ELIZA;Database=DotNetNuke;uid=Nuke;pwd=;" />here's a screenshot of my sql server db and user, web.config, and the error message http://www.kingzine.net/nuke/cantusedatabase.JPGmany thanks in advance-kroozer Solved!Problem was: SQL server was setup only for Windows AuthenticationTo fix: 1) Right cli...

Installation of SQL Server 2008 Express blows up before installing actual server, can't repair or continue it.
 I tried to installl SQL Server 2008 Express edition on my personal desktop.  I started off by chosing to install an unclustered version (don't know the difference between clustered and unclustered so I chose the first) and then it said I had all the requirements, all checks went through it even installd the management studio express.  But when it was installing the server, it went through and then just stopped through giving an error message saying there was an error in installation.  I had uninstalled previous versions of SQL server 2005 and compact, but it was just...

I couldn't install Visual Studio.Net 2003, while installing an error message "Internal Error is comming"
[DMW: deleted due to the length of the log, and what follows is what's important][09/29/05,14:28:23] Visual Studio .NET Enterprise Architect 2003 - English: ***ERRORLOG EVENT*** : ACTION FAILURE: Action ended 14:28:23: CADpc.D0DF3458_A845_11D3_8D0A_0050046416B9. Return value 3. See MSI log for details.[09/29/05,14:28:23] Visual Studio .NET Enterprise Architect 2003 - English: ***ERRORLOG EVENT*** : ACTION FAILURE: Action ended 14:28:23: INSTALL. Return value 3. See MSI log for details.[09/29/05,14:28:30] Visual Studio .NET Enterprise Architect 2003 - English: MsiInstallProduct return cod...

To install or not to install?
What's the difference between installing qpsmtpd as in...=0A=0Aperl Makefil= e.PL=0Amake=0Amake test=0Amake install=0Amake clean=0A=0A... or running it = directly from /home/smtpd/qpsmtpd?=0A=0APresently I'm running ./qpsmtpd fro= m xinetd, so the installed copy is probably wasted, right?=0A=0AIs there an= y benefit/downside in running an installed copy, and how would I do that?= =0A=0AHans=0A=0A=0A There is no benefit to installing. I've been running under xinetd for a couple of years, directly from an svn checkout in /var/qpsmtpd. In fact, I dont even make changes ...

Web resources about - Installing multiple DNNs on single SQL Server DB causes install error - asp.net.dotnetnuke

Help:Installing Japanese character sets - Wikipedia, the free encyclopedia
This help page will help you install Japanese character sets so that your computer will display them properly on the internet in your web browser ...

Earn Free Facebook Credits For Installing Apps — Of Course, There’s A Catch
This looks pretty cool at first: Earn free Facebook Credits for installing applications on your iPhone or Android device. AppDog offers this ...

Installing solar panels - Flickr - Photo Sharing!
Solar panels are lifted into place.

Installing Afterglow AX.1 Wired XBOX 360 Controller on Lion/Mountain Lion 10.7.3+ - YouTube
I finally managed to install an Afterglow AX.1 (Wired XBOX Controller) and make it work on Lion 10.7.3 with TattiBogle 0.08. This tutorial works ...

Fatal unit fire: Builder Ray Finianos reduced height of building to avoid installing fire sprinklers ...
The builder of&nbsp;a south-west Sydney unit block where a young woman plunged to her death during a ferocious fire told a certifier to reduce ...

Ballarat man accused of installing spy cameras in ex-wife's house
A man accused of concealing surveillance cameras in skirting boards at his ex-wife's home also allegedly attached a GPS tracker to her car, a ...

Iran installing new nuclear equipment
Sky News is Australia's leader in 24-hour news. Iran has begun installing next-generation equipment at one of its main nuclear plants, a new ...

Rentasaur Installing 'Spyware' On Rental Laptops
An Australian business that rents out computers is installing software that in the US has been used to spy on users, including taking webcam ...

Gillard defends installing Slipper
BBC News Gillard defends installing Slipper Sydney Morning Herald Prime Minister Julia Gillard has defended her decision to install Peter ...

CSIRO says installing solar panels on roofs of businesses could take pressure off the electricity grid ...
Installing more solar panels on the roofs of businesses would help Australia's energy grid cope with increased demand.

Resources last updated: 12/18/2015 12:20:39 AM