Solved

Creating a new top level site with a different content database

Posted on 2011-03-08
7
487 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 39

Expert Comment

by:BrandonGalderisi
ID: 35076752
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
ID: 35077348
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
ID: 35079571
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
Office 365 Advanced Training for Admins

Special Offer:  Buy 1 course, get 2nd free!  Buy the 'Managing Office 365 Identities & Requirements' course w/ Accelerated TestPrep, and automatically receive the 'Enabling Office 365 Services' course FREE!

 
LVL 6

Accepted Solution

by:
sabby447 earned 250 total points
ID: 35079870
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
ID: 35082036
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
ID: 35084996
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
ID: 35085114
I meant * Shouldnt
0

Featured Post

Office 365 Training for IT Pros

Learn how to provision Office 365 tenants, synchronize your on-premise Active Directory, and implement Single Sign-On.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
When using a search centre, I'm going to show you how to configure Sharepoint's search to only return results from the current site collection. Very useful when using Office 365 with multiple site collections.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

737 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