Sunday, February 26, 2012

Command line error for adding content DB or delete content DB

Today I was playing with SharePoint content DBs for detaching and attaching. I mean changing the content DB of a Site Collection to a new Content DB (like restored copy of other environment like Prod).

So to do this, I was using STSADM commands like this:

stsadm -o deletecontentdb -url http://srisaihome:1099/sites/site2 -databasename wss_content_1099_1

I made this string in a notepad and coped to Commond Prompt Console and hit the Enter and I got the error like
“ Command Line Error”. However, I did'n’t do any mistake in writing the command. Here is the complete command I have written:

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN>stsadm -o deletecontentdb -url http://srisaihome:1099/sites/site2 -databasename wss_content_1099_1

The weird thing is instead of copying the command from notepad If I type the command manually it works like a charm. Don’t be surprised, it’s weird but it’s true.  Not sure how many has experienced this, but thought of sharing this in my blog.

3 comments:

  1. Came across this article with the same issue - command line error. When I read what you'd written, I didn't believe it, but you're absolutely right!

    Copying and pasting from Notepad didn't work, typing the command by hand did - very bizarre, but thanks for posting!

    ReplyDelete
  2. I am glad that it helped you...

    ReplyDelete

Access to XMLHttpRequest at 'from origin has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https. .net core angular

Issue: The angular application was getting error from API that the origin has been blocked by CORS policy. Solution: Make sure that the...