Solved

Sharepoint 3.0 STSADM command IIS

Posted on 2011-03-08
3
564 Views
Last Modified: 2012-08-13
Does any one know where I am going wrong with this code to add the content database and assign it a different ID?

stsadm.exe -o addcontentdb -url http://sharepointsite -assignnewdatabaseid -databasename Sharepoint_2DB
0
Comment
Question by:fstinc
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
ThatSharepointGuy earned 250 total points
ID: 35073032
What isn't working (what does it say when you run your command)?

According to Microsoft you're doing it the right way:
http://technet.microsoft.com/en-us/library/cc288692(office.12).aspx

stsadm.exe -o addcontentdb

-url <URL name>

-[-assignnewdatabaseid]

-[-clearchangelog]

-databasename <database name>

[-databaseserver <database server name>]

[-databaseuser <database username>]

[-databasepassword <database password>]

[-sitewarning <site warning count>]

[-sitemax <site max count>]


One thing I would do, is wrap your URL, Database Name, and Database Server in quotes.

So try this:
stsadm.exe -o addcontentdb -url "https://mySharePoint.com" -assignnewdatabaseid -databasename "New-ContentDB" -databaseserver "MySharePointSQL" 

Open in new window


I know the server isn't "required", so you can leave that out if you want.  I usually supply server and credentials regardless, and haven't had any issues with it.
0
 

Author Comment

by:fstinc
ID: 35073671
Yup, the quotes seemed to have done they job. Didnt know that. Thanks.
0
 
LVL 6

Expert Comment

by:ThatSharepointGuy
ID: 35073959
No problem, fstinc!

I have a habit of wrapping everything in quotes, from URLs to server names, etc.  It doesn't always do the trick, but i've had more success doing it than without.  

Have a good one!
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SharePoint 2010 Foundation Gatherer 10 74
Does SharePoint 2016 using SQL 2016 function correctly with Workflow Manager? 2 46
Web site error 3 44
Sharepoint 2010 Auditing 4 35
Running classic asp applications under Windows Server 2008 R2 (x64) and IIS 7 is not as easy as one may think. It took me a while to figure it out while getting error 8002801d a few times. After you install the OS you will need to install the fol…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

830 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