?
Solved

Creating a new top level site with a different content database

Posted on 2011-03-08
7
Medium Priority
?
501 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 6

Accepted Solution

by:
sabby447 earned 1000 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 1000 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

Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

Question has a verified solution.

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

We had a requirement to extract data from a SharePoint 2010 Customer List into a CSV file and then place the CSV file into a directory on the network so that the file could be consumed by an AS400 system. I will share in Part 1 how to Extract the Da…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

801 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