You can create or remove a content database either using the Central Administration in Microsoft Office SharePoint Server (MOSS) 2007 or by using the STSADM tool. In the GUI you need to go to the Application Management tab in Central Administration and then click on Content databases. There you can manage the content databases. A second option is to use the command-line STSADM tool. Frankly, I find STSADM to be quicker and much easier to use. Sometimes the GUI will prompt you to use the STSADM tool to delete the content database, in which case you have no option but to use STSADM. Here’s how you can use STSADM to create or delete a content database in MOSS 2007.
When you go to the command prompt, by default STSADM will not be on your path. You might want to add the location of STSADM to your path to make things easier. The file is located in C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\BIN. Go to the Environment Variables and edit the path under System variables. If you already have a command prompt open, you need to close the window and open it again to make the new path take effect.
Let’s assume you want to create a database called WSS_Content_Intranet and the SharePoint site is http://intranet:80. To create the database at the command prompt use the following command:
stsadm.exe -o addcontentdb -url http://intranet:80 -databasename WSS_Content_Intranet
If you want to delete a content database simply use the switch -deletecontentdb.
stsadm.exe -o deletecontentdb -url http://intranet:80 -databasename WSS_Content_Intranet
By the way, there is a space after “-databasename” in the above commands.
Copyright ©2002-2013 Zubair Alexander. All rights reserved.
|« Aug||Oct »|
26 queries. 0.396 seconds