Showing posts with label sql server. Show all posts
Showing posts with label sql server. Show all posts

Tuesday, 1 September 2009

SQL Express 2005 Configuration Manager - Cannot connect to WMI provider

It seems like the list of querky behaviour from database's never ends.

Came up against this problem with a fresh instal of SQL server 2005. I found the solution with a quick google leading me to this forum thread that had had the same issues.

This was the command prompt solution:

C:\Program Files\Microsoft SQL Server\90\Shared>mofcomp "C:\Program Files\Microsoft SQL Server\90\Shared\sqlmgmproviderxpsp2up.mof"

Retweet this button on every post blogger

Wednesday, 19 August 2009

Changing the datasource for Sugar

Sugar CRM was set up to run localy off of my PC but use a remote SQL Server datasource.

Not knowing much PHP it was a pretty easy instal. Things rarely run according to plan even when they appear to have been running smoothly. PHP didn't appear to maintain connections to the SQL server and was seemed to be gobbling up the CALs causing other sites to baulk.

New plan is to run off a local datasource that doesn't provide website's to other companies so that only sugar would be accessing. This would allow me to fully test out sugar without fear of killing a live site.

Step 1 is to open the config.php file in the root of the sugar system.

Within this file there are 3 points to edit
  • dbconfig array
  • host_name
  • site_url
You will also need to ensure that if you are importing the data from another database that the database owner remains as dbo. This can be scripted afterwards but is quite time consuming if I recall correctly.

Update: There is a way to create a script to alter the DBO.

Simply update this SQL: SOMEDBONAMEGOESHERE
SELECT 'ALTER SCHEMA dbo TRANSFER ' + TABLE_SCHEMA + '.' + TABLE_NAME
FROM INFORMATION_SCHEMA
.TABLES WHERE TABLE_SCHEMA = 'SOMEDBONAMEGOESHERE'
And it will create all of the desired scripts... sweet! Retweet this button on every post blogger

Friday, 7 August 2009

Setting up SQL Server Express 2005 or 2008

Ok, so I've got lots of old files related to SQL on my desktop and a recent attempt at an install didnt' work correctly. I think the best thing to do is to start a fresh.

I've removed all files relating to SQL Server 2005 from my desktop. Control Panel > Add remove programmes. I've noted that SQL server 2005 files don't have the 2005 included unlike 2000 & 2008? I've removed all SQL Server files accept for the VSS writer one which was associated with 2008.

Next, I've run the install and just follow the step on the wizard. I've ensure that when I got to the feature selection screen that I selected all the client components.

Grrr, just had the install blocked due to 2008 being on there. Now have to un-install that lot too. Can't just install as said is running, and couldn't just end the service via task manager as can't locate the instance.

Being dumb, the SQL Server 2005 install was stopping the 2008 un-install. Have cancelled the install and now run the un-install. Takes a while so go and have a coffee.

Great, now lets re-do the 2005 install.

I've opted for mixed installation mode within one of the screens to set up a user now rather than later.

Oh joy, again the install has failed... must have some thing else that needs removing.

Tried a new install with a new instance name, early indications bad :(

Further investigation reveals that there can be issues from the registry keys. So I've run regedit and gone to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\ and I've tried to delete what I can.

This still didn't work... so I left it for a couple days!!!

Right fresh start. First I removed all traces of SQL Server from:
  • Add/remove programmes
  • Programme files
  • Local users settings
  • and registry as indicated on this site
I then decided to install 2008 instead.

Make sure you install the express version with tools as otherwise you get a lot of extra agro trying to get SQL Server Management Studio installed.

To summarise:
  1. Try to upgrade in normal way if not work use the following:
  2. Remove programmes
  3. Remove files
  4. Delete registry keys
  5. Install 2005 or Install 2008
  6. Update Config Settings to allow TCP/IP and correct port etc.
This was a nightmare and not somethign to be undertaken lightly unless your well versed in this subject. Retweet this button on every post blogger
 
Bookmark and Share