Advertisement
Guest User

Untitled

a guest
Dec 22nd, 2016
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. SPWebApplication elevatedWebApp = spWeb.Site.WebApplication;
  2. string serverName = "xxxxxx";
  3. string newDbName = "WSS_Content_1";
  4. string username = "xxxx\spfarm";
  5. string password = "xxxxx";
  6. var contentDatabase = elevatedWebApp.ContentDatabases.Add(serverName,newDbName,username,password,0,1,0);
  7.  
  8. contentDatabase.Update();
  9. elevatedWebApp.Update();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement