Solved

Creating a new top level site with a different content database

Posted on 2011-03-08
7
449 Views
Last Modified: 2012-05-11
I have SERVER1 and SERVER2.
I need to create a top level site on SERVER2 and attach it to a different content database. I have allready restored the 2nd database.

This is plan.
Create a new web app
attach the content DB to the web app

But it seems like it only lets me create a "New Content DB", not attach.

So I tried via STSADM but no luck.

stsadm.exe -o addcontentdb -url " http://sharepoint " -assignnewdatabaseid -databasename "WSS_Content " -databaseserver "SERVER1"

How can I create multiple websites within one and have separate content db

0
Comment
Question by:fstinc
7 Comments
 
LVL 39

Expert Comment

by:BrandonGalderisi
Comment Utility
Ok.  I have only SLIGHTLY dabbled in sharepoint, but have you tried approaching it as a sharepoint restore?
0
 
LVL 38

Expert Comment

by:Justin Smith
Comment Utility
What are you trying to do exactly?  Your question really doesn't make sense.

Under Application Management in Central Admin, the content databases section allows you to attach pre existing content db's from sql to web apps.  Just type in the name.
0
 

Author Comment

by:fstinc
Comment Utility
OK Heres what I am doing. I created a new web application. In that application I plan to import the same DB that I am using on the same server. Enoying, but my manager wants to make sure I can add another web app and add the content database without any downtime. The problem was that since both content DB have the same ID (2 DB, 1 is original and 2 is a copy via backup/restore), I needed to change the ID so I changed it through stsadm

stsadm.exe -o addcontentdb -url "https://SERVER1" -assignnewdatabaseid -databasename "WSS_Sharepoint_3" -databaseserver "Sharepoint"

However, When I add the database in Central Admin, the number of sites for the DB says 0. I checked SQL and its pointing to the correct DB. Is it the duplicate DB that is giving me the problem?
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 6

Accepted Solution

by:
sabby447 earned 250 total points
Comment Utility
Ok, Here is what i understand with current situation :

- You have current databases from existing environment which you are migrating
- You have restored the content db and now want to attach to the site
- You are unable to attach as it shows to create new db in web
- You are able to do it from command line and want to add more website and have them their own db

some pointers and explanations :

- You can attach a db from Web as well as you can click add new db and type the exact name, This way sharepoint will use the existing db and will not overwrite anything

- You want to add more sites and have their seperate DB and not that you want to add more db to same site .. Correct me if i am wrong

You can accomplish this by creating new web applications for these sites, If you would like to have all the site collection in the same web app then they all will use the same common name for accessing the site, That is not feasible and have a lot of complications. Creating a new web app and adding content db is the best option


Hope this helps
0
 
LVL 38

Assisted Solution

by:Justin Smith
Justin Smith earned 250 total points
Comment Utility
You can't use the same content db on multiple web apps in the same farm....it just won't allow this as it causes conflicts in the config db.  In some cases you can get around this by using the -newid switch (not all cases).  You are getting site=0 on the newly attached db's because those same sites already exist in the farm.

If you are trying to replicate sites between different web apps, why not just use site backup/restore?  stsadm -o backup/restore -url _____________

0
 

Author Comment

by:fstinc
Comment Utility
Yeah, the fact is this should be so hard if I had another DB to import, however, my manager wants to see the same database replicated on the same server to make sure we will not have any problems which is a bit a hard since it causes too many problems involving the configuration database. I cant restore WSS 3.0 running on a different server (SERVER2) since its a SQL 2005 DB, and it will also cause problems. So from the looks of it, I just need to create a new web app on the productions server (SERVER2) and hope all goes well.
0
 

Author Comment

by:fstinc
Comment Utility
I meant * Shouldnt
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Pimping Sharepoint 2007 without Server-Side Code Part 1 One of my biggest frustrations with Sharepoint 2007 in the corporate world is that while good-intentioned managers lock down the more interesting capabilities of Sharepoint programming in…
SharePoint Designer 2010 has tools and commands to do everything that can be done with web parts in the browser, and then some – except uploading a web part straight into a page that is edited in SPD. So, can it be done? Scenario For a recent pr…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now