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 ...Installation Problem(Want to remove all the dnn objects from database)Installation Problem(Want to remove all the dnn objects from database)
Previous
 
Next
New Post
12/21/2009 9:20 AM
 

Hello All,

        I have installed the latest dotnetnuke version in my production server.it was working fine ,unfortunately  i have deleted some tables from my live db,so its created the problem.so i want to delete the all tables,procedures,view and functions manually and try to reinstall the dotnetnuke,but i am not able to install dnn db.because of some dnn objects are not deleted completely,I have tried more than 5 times,i dont want to delete the existing database.

So please advise how to delete the exisiting dnn objects(eg:tables,procedures,views,schems...) completely and how to reinstall the nuke.

Thanks
Mani

 
New Post
12/21/2009 2:02 PM
 

Personally this is not really an easy task, there is a set of uninstall scripts, but you need to run them for each and every module and everything that you had.

You are much better off to just drop the DB and re-create.  Or if you have objects that you need to keep, make a new DB for DNN, setup DNN then copy the object over to it.


-Mitchel Sellers
Microsoft MVP, ASPInsider, DNN MVP
CEO/Director of Development - IowaComputerGurus Inc.
LinkedIn Profile

Visit mitchelsellers.com for my mostly DNN Blog and support forum.

Visit IowaComputerGurus.com for free DNN Modules, DNN Performance Tips, DNN Consulting Quotes, and DNN Technical Support Services
 
New Post
6/8/2011 1:13 AM
 
Hey guys,

So I know this is pretty old, but it comes up from time to time...

Here's a script I've scraped together from somewhere (definitely not my own but I can't remember where/who should get the credit).

Anyway, it seems to do the job...you may have to run it more than once and you may get errors on the first run but it does work as of 5.6.2.

Hope it helps:

--DELETE ALL TABLES
declare @table_count int;
declare @iter int;
-- we know we're going to have tables the first time through
set @table_count = 1 ;
set @iter = 0;
-- check to see how many tables we have in the database
while @table_count > 0
begin
exec sp_MSforeachtable "DROP TABLE ? PRINT '? dropped' ";
SET @table_count = (select COUNT(*) from sysobjects where type = 'U'and name <> 'dtproperties');
SET @iter = @iter + 1;
end
print 'iterations: ' + CAST(@iter as varchar);


--DELETE ALL VIEWS
declare @procName sysname

declare someCursor cursor FOR
SELECT name FROM sysobjects WHERE type = 'V' AND objectproperty(id, 'IsMSShipped') = 0

open someCursor
fetch next FROM someCursor INTO @procName
while @@FETCH_STATUS = 0
begin
exec('drop view ' + @procName)
fetch next FROM someCursor INTO @procName
end

close someCursor
deallocate someCursor
go

--DELETE ALL PROCEDURES

declare @procName sysname

declare someCursor cursor FOR
SELECT name FROM sysobjects WHERE type = 'P' AND objectproperty(id, 'IsMSShipped') = 0

open someCursor
fetch next FROM someCursor INTO @procName
while @@FETCH_STATUS = 0
begin
exec('drop proc ' + @procName)
fetch next FROM someCursor INTO @procName
end

close someCursor
deallocate someCursor
go
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Installation Problem(Want to remove all the dnn objects from database)Installation Problem(Want to remove all the dnn objects from database)


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