Solved

Creating a new top level site with a different content database

Posted on 2011-03-08
7
492 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
Comparison of Amazon Drive, Google Drive, OneDrive

What is Best for Backup: Amazon Drive, Google Drive or MS OneDrive? In this free whitepaper we look at their performance, pricing, and platform availability to help you decide which cloud drive is right for your situation. Download and read the results of our testing for 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

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

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

In this article I will describe the Copy Database Wizard 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.
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

707 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