SharePoint: Multiple databases for 1 Web Application

This process makes assumptions that the SharePoint environment is in a very exact state. Specifically that:
• All databases other the one currently being used for new MySites are in an offline state and that there is only ever one Web Application available.
• There is a defined business need for a series of smaller databases rather than one large and potentially unwieldy one.

When a database in SharePoint is in an offline state it is not in an inaccessible mode but rather it is not viewed as a tenable location by the process that creates new site collections. Instead SharePoint will look at the delta on the current number of sites value versus the set maximum in any and all other open Content Databases and select the one with the greatest value.

To set a content database status to offline:
1. Go to “Central Administration > Application Management > Content Databases”
2. Then click on the database of your choice set it to “Offline”

To create a new database for every new site collection the following steps need be followed.
1. Create a new content database.
a. Start the SharePoint Central Administration Web site.
b. On the Application Management page, in the SharePoint Web Application Management section, click Content databases.
c. On the Manage Content Databases page, click Add a content database.
d. On the Add Content Database page:
e. Select a Web application for the new database.
f. Select a database server to host the new database.
g. Specify the authentication method the new database will use and supply an account name and password if necessary.
h. Specify both the total number of top-level sites that can be created in the database and the number at which a warning will be issued.
i. Click OK.
2. Create the new Site Collection.
3. Set the newly created content database status to Offline.
4. View the contents of the new content database to confirm that it only contains what it should. (In theory a new My Site could be in there.)

It is important to confirm that this new database is appropriately accounted for by backup and DBA maintenance routines.

If a site collection was errantly created during the period that the new content database was online it can be moved as follows:

1. Run the following stsadm command, to get a list of all the sites in the web application

Stsadm -o enumsites -url <URL> > <path/file name>.xml

Where:
• <URL> is the address of the Web application that contains the site collection that you want to move,and
• <path/file name> is the name of the XML file that you want to create with the site collection data.

(Example: stsadm -o enumsites -url http://localhost > c:Sites.XML)

Open the XML file that you created in a text editing application. If there are any URLs for site collections that you do not want to move, be sure to delete them from the file. The only URLs that should remain in the XML file should be for the site collections that you want to move.

Note: There is no need to change the site count or any of the other site collection information in the file. Only the URLs are relevant to this procedure.

2. Run the following stsadm command:
Stsadm -o mergecontentdbs -url <URL> -sourcedatabasename <database name> -destinationdatabasename <destination database name> -operation 3 -filename <file name>

Where:
• <URL> is the address of the Web application that contains the site collection that you want;
• <database name> is the name of the database that you want to move the site collection from; and
• <destination database name> is the name of the database that you want to move the site collection to;
• operation 3 is the “Read from file” operation; and
• <file name> is the name of the file that you created in step 4.

(Example: stsadm -o mergecontentdbs -url http://localhost -sourcedatabasename WSS_Content -destinationdatabasename WSS_Content2 -operation 3 -filename c:Sites.xml)

Note: This step assumes that all of the sites in the Sites.xml file where in the source database name. If the sites are located in multiple databases you may need to repeat these steps for each source Content Database.

3. Restart IIS by typing the following command, and then pressing ENTER: iisreset /noforce.

Cause and Effect: An example of DR strategy

Voyager 2 left Earth on Aug. 20, 1977 to explore Jupiter and Saturn. It successfully finished that mission, then proceeded to fly on by Uranus and Neptune before heading into interstellar space.
It is currently traveling through heliopause — a region of space where the sun’s influence ebbs and interstellar forces begin to dominate. A rather interesting, and commonly unknown by the general public, portion of our solar system. Think of it a bit like a bow wave from a ship except the material replacing the sea is space/time and the ships hull is the bubble of our solar system.
Voyager 2 and its twin, Voyager 1, are both expected to enter interstellar space — the first human-made objects to do so — in the next five years which means scientists are very excited about what may be discovered in the next five years as both Voyagers push their way through the heliopause. So you can imagine their consternation when it started acting a bit like VGER from Star Trek The Motion Picture
The 33 year old piece of hardware starting speaking in tongues from 8.6 billion miles away preventing mission control from decoding any of its data. Over the course of two weeks with 26 hour round trip communication cycles and replication with exact hardware copies on Earth, the root cause of the problem was discovered to be a single memory bit that had flipped from 0 to 1. A single bit of memory caused the whole system to fail. A simple cause. The effect was catastrophic in impact but NASA did what they do best and implemented predefined processes which included troubleshooting on hardware duplicates and predefined steps through what if scenarios. They were successful. They intend to reset Voyagers memory tomorrow ~ May 20 2010.
The point to take from all of this is – no matter what system you implement you have to have a strategy for handling situations when ‘it’ does not work properly. SharePoint is a difficult product to work in depth with, and when things go wrong they are either minor or very major. But even if you’re working with something other than SharePoint have your DR strategy and related documents ready. Know, comment, and if appropriate visualize with UML, your processes and make sure that others can and will be able to understand what they say. If you do it right, even after 33 years, you can look like a superstar…
If you are interested in more information about the two Voyagers NASA has a weekly update here where you can see detail down to how much propellant the two craft have recently used and left.

PROPELLANT/POWER CONSUMABLES STATUS AS OF THIS REPORT

Spacecraft

Consumption

One Week (Gm)

Propellant

Remaining (Kg)

Output

(Watts)

Margin

(Watts)

1

4.84

26.22

274.2

30

2

4.25

27.90

275.5

29

RANGE, VELOCITY AND ROUND TRIP LIGHT TIME AS OF THIS REPORT

Voyager 1

Voyager 2

Distance from the Sun (Km)

16,915,000,000

13,737,000,000

Distance from the Sun (Mi)

10,510,000,000

8,536,000,000

Distance from the Earth (Km)

16,858,000,000

13,753,000,000

Distance from the Earth (Mi)

10,475,000,000

8,456,000,000

Total Distance Traveled Since Launch (Km)

21,833,000,000

20,860,000,000

Total Distance Traveled Since Launch (Mi)

113,566,000,000

12,962,000,000

Velocity Relative to Sun (Km/sec)

17.071

15.487

Velocity Relative to Sun (Mi/hr)

38,185

34,643

Velocity Relative to Earth (Km/sec)

19.977

22.862

Velocity Relative to Earth (Mi/hr)

44,689

51,139

Round Trip Light Time (hh:mm:ss)

31:13:28

25:28:58