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

No comments:

Post a Comment

 
Bookmark and Share