Wednesday, December 23, 2009

Making Stuff Happen

Sometimes stuff doesn't seem to happen in a timely manner in MOSS. Sometimes you just need to give it a bit of a kick along. Here is a little command to do just that.

Stsadm –o execadmsvcjobs

Thursday, September 24, 2009

How to move Microsoft SharePoint databases from one SQL server to another

I have been using Ahmed Ammar's excellent instructions for moving MOSS databases. However, I noticed I could only find them in the Google cache, so I have taken the liberty of repeating them in total here, with a couple of notes from me. Ahmed, let me know if you want me to take this down, but folks, in the interests of preserving a very useful resource, here are Ahmed's instructions.


 

Step 1 – Move
SharePoint_AdminContent

Step 2 – Move Sharepoint_Config database

Step 3 – Move all other site collection databases

Step 4 – Restore Indexers and SSP (Shared Service Provider)

Step 5 – Correct configuration database.

Shortcuts:

SSP: SharePoint Service Provider
CA: Central Administration
RDP: Remote Desktop
MOSSSRV: Web Front server hosting SharePoint central administration and web service.
OLDSQL: SQL server you want to move DBs from.
NEWSQL: SQL server you want to move DBs to.

Prerequisite:

Write down version of your SharePoint farm.

New SQL server needs to have mixed security mode set and TCPIP access enabled.

Local SQL user is required for DB access and creation, together with domain search account, that will perform crawling.

Topology

MOSS 2007 SP2 – ver. 12.0.0.6421 with two servers in a farm.  (Win2k3 and W2k8 32 bit systems)

One web front end hosting CA and second SQL Server 2005 Standard Edition.

Step 1 – Move Sharepoint_AdminContent database

Central Administration website is stored in  Sharepoint_AdminContent
Database, thus it cannot be moved from administration interface, however you can see it there under its web application.

0, Login to OLDSQL and make backups of all databases related to SharePoint farm to shared folder.

1, Put DB offline using CA - Application Management – Content Databases – select proper web application "SharePoint Central Administration V3" and change database status offline.

DO NOT CHECK REMOVE!!!

2, Login to MOSSSRV server using RDP

(I recommend you to create BAT files with commands, in case you mistype character and close CMD.EXE window by mistake.)

Launch prepare to move command from CMD.EXE or BAT file:

STSADM –o preparetomove –contentdb OLDMOSS:SharePoint_AdminConfig_0245-87547-a547f" –site http://mosssrv:4235

 After Operation completed successfully, disconnect DB using:

STSADM –o deletecontentdb –url "http://mosssrv:4235" –databasename "SharePoint_AdminConfig_0245-5698-485-asd21"

3, Switch to OLDSQL server and in SQL Management studio backup SharePoint_AdminContent_2254-sdsa454-45454
database.

After backup, copy this DB to NEWSQL and restore database. Now it's the best time to rename database just to "SharePoint_AdminContent" and get rid of GUID.

4, Go back to MOSSSRV and launch attach DB command :

STSADM –o addcontentdb –url http://mosssrv:4235 –databasename "SharePoint_AdminConfig" -databaseserver "NEWSQL"

5, After operation completed appear, launch command iisreset /noforce.

6, Check http://mosssrv:4235 – e.g. CA website if it is functioning.

 Now you moved Sharepoint_AdminContent
database and renamed it to more understandable name.

Step 2 - Move Sharepoint_Config database

Most difficult part from SharePoint structure view is moving Sharepoint_Content database. This is the first database created and holds settings of your Sharepoint structures.

1,Go to OLDSQL and backup Sharepoint_Content database with suffix "before_move" for example "SharePoint_Config_before_move.bak"

2, Go to MOSSSRV and launch command to disconnect database from server  :

Psconfig.exe –cmd configdb –disconnect

3, Go to OLDSQL server and in SQL Management studio backup SharePoint_Config
database.

After backup, copy this DB to NEWSQL and restore database.

4, Connect database back to sharepoint farm using :

psconfig.exe -cmd configdb  -connect -server "newsql" -database "SharePoint_Config" -dbuser "mossdbcreate" -dbpassword "Aaa123456" -user "DOMAIN\USER" -password "user_password"

Notes:

·         mossdbcreate user is local NEWSQL user with permission to create DB.

·         DOMAIN\USER is user that was set as Sharepoint Administrator. ( I used domain admin account for all these operations.)

·         Your new "SharePoint_AdminContent" database will be used automatically.

Naaman's Life Note:

This didn't work for me, so in the end I ran the following command, which worked:

psconfig.exe -cmd configdb  -connect -server "newsql" -database "SharePoint_Config" -user "DOMAIN\USER" -password "user_password"

5, Launch Sharepoint Technology wizard and provision new CA :

·         Choose "No do not disconnect" and click NEXT,

·         Change the port to the same you had before e.g.  4235 in our case !! and leave NTLM and click NEXT

·         Wizard will now display summary page (already filled with NEWSQL name) and will start creating CA website.After finish it will open you CA website.

Browse around to check everything is functioning…try SSP Admin page for example.

Now we almost finished move of Sharepoin_Config DB, but this step needs to be finished as described in last step. ( You may notice, that in Operations – Server in Farm is written OLDSQL as home of configuration database.)

  
 

Step 3 - Move all SharePoint Site Collection Content Databases

Now move all production "normal" databases.

1, restore your production DBs from step 0 to NEWSQL or backup them all again at OLDSQL and restore in NEWSQL.

2, Go to CA – Application Management – Content DB

3, Change the web application from the drop down list appropriately.

4, open content DB, write down its name, select "offline" and check "Remove Content Database". (If database was created using special account use that account to delete it).

5, After removal, click "Add Content Database" and add the same database but from NEWSQL.

  
 

Repeat these steps for all your production databases.

Note: Some sources are recommending to use chain : preparetoremove > disconnect > connect (same as in Sharepoint_AdminContent) to move all content databases. This is probably needed, if you are moving databases to different farm environment and not to the same Sharepoint_Config database. It has something to do with site and DB GUID.

  
 

Step 4 – Restore SSP

Shared Service Provider – is a feature of Sharepoint Farm and you will not found it by WSS. As name is saying it goes about services, that could be shared in a farm. For example crawling (or indexing or searching) could be configured here and one server can perform crawling and its searchDB could be then used be then used by other servers in a farm.

1, Go to OLDSQL and backup SharedServiceProved_DB (in fact I do not know default name, but there are two databases for SSP – one is content and second is search.)

Then go to NEWSQL and restore this DB. There is no reason to restore search DB, because it will be created anyway.

2, Open CA -  In order to restore SSP from a database you need to enable indexers. This is done in Operations – Servers on Farm – Office SharePoint Server Search.

You need to provide content access account – see prerequisites. You can then leave default name of search DB – WSS_SEARCH_MOSSSRV.

3, In the same menu enable also second Office search service.

4, Go back to SSP Administration page – now choose "Restore SSP"

     Fill the form with existing DB name you restored to NEWSQL and click OK.

Note : Restoration and provisioning process of new SSP could take long time.

You can also get into trouble here, especially if SharePoint's versions are different. You need to be sure, you are restoring SSP from same version of SharePoint system.

5, After successful finish you should see two providers. Now, by clicking "Change associations" change association of old SSP's web applications to new one.

6, By clicking on "Change Default SSP" you change default SSP to restored one.

7, Delete old SSP with option "and delete the associated databases". After clicking OK, un-provisioning of old SSP will occur and it takes a lot of time. May be you will need to restart IIS with /noforce if system will stop responding.

Now you are done with moving all the databases. Before continuing, please double-check all content databases are transferred. You can stop SQL Server service on OLDSQL and check all sites and CA.

 
 

Step 5 – Correct configuration database

As you may noticed, no one told Sharepoint_Config, that configuration database is not on old server, but someplace else. In fact this should be done by disconnecting and connecting operations done by SharePoint Wizard, but system writes, that config DB is still on OLDSQL in CA.

Fact is, system is now using NEWSQL for SharepointConfig, but some sub-systems may not work, because somewhere is still written OLDSQL.

In my case, creating site collection from stsadm in new contentdb was issuing error, that DB is not accessible. Unfortunately, system did not write which DB, so I naturally thought it was NEWSQL, that is not accessible and I have bad credentials, but content DB was created, so what was wrong??

I then started OLDSQL resp. SQL service there is tried again.

So I looked at NEWSQL – directly into SharePoint_Config database and find out you have to change Name in first row in dbo.Objects table, where OLDSQL still resides.

I did it using "New Query" button in SQL Management studio and executing this SQL command.

update dbo.Objects set Name = replace(Name, 'oldsql','newsql.ccc.com')

Note : You cannot use newsql name only, because then system reports an error. My workaround was to use FQDN e.g. with dns name like MS's favorite contoso.local  - it is unique in table, and still valid for the system. Probably you can create DNS A record and use this one instead. It will anyway point to same location.

Sharepoint Migration

Currently working on migrating the databases for a MOSS 2007 install from one SQL Server to another. To be more precise, I am moving the database from one instance on one node of a clustered SQL Server to the clustered instance of the SQL Server itself. Anyway, have been working though Ammed Ammar's excellent instructions (I found them here). Had moved my Admin_Content db, and was in the process of moving the Config db when I hit a roadblock. Was using the psconfig.exe command to reconnect to my now migrated Config database and kept on getting the dreaded "The server parameter specified with the configdb command is invalid. Failed to connect to the database server or the database name does not exist. Ensure the database server exists, is a Sql server, and that you have the appropriate permissions to access the database server. To diagnose the problem, review the extended error information located at C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\LOGS\PSCDiagnostics_9_24_2009_11_5_7_53_419108824.log. Please consult the SharePoint Products and Technologies Configuration Wizard help for additional information regarding database server security configuration and network access." error ...

Couldn't work out the appropriate username and password to connect to the database for this command ... I finally found a solution by fluke. Ammed suggest the following command to reconnect the config database:

psconfig.exe -cmd configdb -connect -server "newsql" -database "SharePoint_Config" -dbuser "mossdbcreate" -dbpassword "Aaa123456" -user "DOMAIN\USER" -password "user_password"

If that doesn't work, try running the cmd exe from your mossdbcreate account using "runas /user:Doman\mossdbcreate /noprofile cmd.exe" and then use the following simplification of the psconfig command:

psconfig.exe -cmd configdb -connect -server "newsql" -database "SharePoint_Config" -user "DOMAIN\USER" -password "user_password"

Worked for me, anyway. Let me know if it helps you out.

Friday, September 11, 2009

Monopoly City Streets Housing

Just done some analysis on the rates of return from houses in the new Monopoly City Streets. It seems to me that the City Centre Cottage is the best building to build if you are not running out of space.

Building

Price (1000s)

Return (1000s)

Rate of Return

Green House

50

9

18.000%

City Centre Cottage

75

14

18.667%

Cane Top Multiplex

150

23

15.333%

The Sentinel

175

28

16.000%

High Reach Place

200

33

16.500%

Nova Tower Block

300

51

17.000%

PolyHedron Plaza

400

66

16.500%

The Grid Building

500

85

17.000%

Four Sided Fortress

600

95

15.833%

Nori Place

750

104

13.867%

Honeycomb Complex

900

123

13.667%

Blanco Bastion

1100

142

12.909%

The Photat Building

1500

180

12.000%

Cubix Quarters

2000

180

9.000%

Opaque Overlook

2800

209

7.464%

Tri-Rectangle Tower

3900

228

5.846%

Spear End Summit

5000

247

4.940%

Unbounded Megaplex

6000

266

4.433%


Update: OK, just made the discovery that the amount you make for properties has an effect on the return. It appears that the higher the value of the street the greater the return on the building. So rental returns will depend on having high quality streets. Even so, the City Centre Cottage still remains the building with the best return. I am making 60% on mine!

Tuesday, March 10, 2009

Sharepoint Regional Settings or the Saga of the Non US Date Format

Actually, this is a rather short saga. Today I've been struggling with the fact that WSS 3.0 (this post does not apply to MOSS), by default uses American date formats (MM.dd.YYYY), and that there seemed to be no way to change this. However, I just happened to be wandering through the LAYOUTS folder in the 12 hive (don't ask me what I was doing there) and found a file called regionalsetng.aspx. Turns out, if you open your Central Administration site and alter the path to point to this file (eg http://myserver:12345/_layouts/regionalsetng.aspx), bingo, you get Regional Settings. It is rather bizarre that there appears to be no link to this page from anywhere. Kind of like the mysterious 13 floor on lots of buildings. Or not.

Update: Not sure why this happens, but a regional change made at the top of a Site Collection will not necessarily populate right through the sites below. Sometimes each site must be opened and the regional settings changed there.

Monday, March 09, 2009

Site Collections in MOSS 2007

Been setting up MOSS lately, primarily to serve as a file system replacement. Due to the large volume of files going in, we felt that it just might be a good idea to break the volume of files up into separate site collections. One of the big advantages of creating a separate site collection for each block of files or part of the business is that each site collection, unlike a site, can have its own database on SQL. Site collections can also be recycled and restored independently of each other. The way to tell MOSS to create a site collection with its own database is to use STADM and use a command similar to the following:
stsadm.exe -o createsiteinnewdb -url "http://myMOSSsite/sitecollectionname" -owneremail "owners.email@mycompany.com" -ownerlogin "mydomain\my.superuserlogin" -sitetemplate "thesitetemplate_I_want_to_use#1" -title "MyCollectionName" -databaseserver "mySQLserver\myMOSSinstance" -databasename "WSS_Content_sitecollectionname"

Wednesday, March 04, 2009

ASUS U/UX Notebook Series Announced

As some of you may know, I am on the hunt for a new notebook to replace my geriatric Sony Vaio SZ (it's had a hard life). Engadget is reporting that ASUS has announced 2 new notebook series, one of which (the U series) looks pretty good to me. There is little information available on these machines, although from the picture here (note the numberpad) it seems that the UX series will include a 15 inch, and be very sleek and glossy. It also appears that at a minimum it will have:

  • Slot loading optical drive (according to Engadget)
  • At least 2 USB ports
  • HDMI port
  • Network port
  • Headphone and line in jacks
  • Backlit chicklet keyboard with numberpad
  • Ambient light sensor
  • Altec Lansing speakers with SRS true surround sound
The U series on the other hand looks like having the following specs:
  • A 12 inch (U20), a 14 inch (U80) and a 15 inch (U50) options to be available
  • Backlit chicklet keyboard
  • Normal tray loading optical drive
  • Inbuilt webcam
  • Ambient light sensor
Updated: The 12 inch U20 (pictured here), will include:
  • Intel Core 2 Solo SU3300
  • Mobile Intel GS45 Chipset
  • Up to 4Gb RAM
  • 2.5 inch HDD up to 500Gb
  • DVD Super Multi Drive
  • Built in 1.2 M web cam
  • Less than 2 kg
The 15 inch U50 will, according to Engadget include:
  • An Intel Core 2 Duo processor
  • NVIDIA GeForce G105M
  • Up to 500GB HDD
  • Altec Lansing speakers with SRS true surround sound
Both series include what is described as "a frame inspired by the curvature of a butterfly's wings", which sounds pretty lame, but looks like this! So far so good. Let's hope they come up with goods ... 12 inch, internal optical drive, GPU and less than 1.8kg.

Update - Late April: Looks like these may, emphasize, may have been released somewhere. AVING is reporting that the ASUS U/UX Series have been released in Korea. Meanwhile, NordicHardware thinks the U series, the UZ series and the Edge series will be "presented" (whatever that means) at Computex in July. NordicHardware also suggests that the UX series are high end notebooks, while the U will be midrange. Too little information, too slowly,

Update 2 - May 4: ASUS in the Philippines has apparently released a news update on the U Series, with a very entertaining photo. I say apparently because Hardware Zone sites the Philippino Asus site, but I can't find the information on it.

Update 3 - May 5: Sigh! Doesn't look like either the U Series or the UX Series will make the grade. ASUS have just released specs and those that are light enough to meet my criteria (sub 2Kg) lack a discreet GPU. What do we need to do to get a non-Sony, GPU and optical drive equipped sub 2Kg notebook?

Thursday, February 12, 2009

Two Big Lies

Back in 2006, I posted about the Anglican church selling out on evolution. Today, the SMH reports the Catholic church has done likewise. Two big lies really.

Firstly, that evolution is compatible with the bible ... despite Jesus apparently endorsing Moses' literal view of creation.

Secondly, that the church cares about what the Bible or God think. After all, why concern yourself over God's word when you consider yourself
God On Earth (see the start of the 5th paragraph of the Encyclical Letter Præclara Gratulationis Publicæ of Pope Leo XIII).