For symfony 1.4 it is best to use the sfPropel15Plugin http://www.symfony-project.org/plugins/sfPropel15Plugin as it has MANY MSSQL fixes over the Propel 1.4 that comes with symfony 1.4.
Before starting look at the propel docs for using MSSQL and get everything setup correctly: http://www.propelorm.org/wiki/Documentation/1.5/MSSQL-Server
Linux Host
To access MSSQL Server from symfony 1.4 the PDO driver pdo_dblib is utilized.
Do a php -m from the command line and make sure you have pdo_dblib listed. Next modify/create the following files:
config/databases.yml
dev:
propel:
param:
classname: MssqlDebugPDO
debug:
realmemoryusage: true
details:
time: { enabled: true }
slow: { enabled: true, threshold: 0.1 }
mem: { enabled: true }
mempeak: { enabled: true }
memdelta: { enabled: true }
test:
propel:
param:
classname: MssqlDebugPDO
all:
propel:
class: sfPropelDatabase
param:
phptype: mssql
classname: MssqlPropelPDO
dsn: dblib:host=12.34.56.78;dbname=YOURDB
username: xxx
password: xxx
encoding:
pooling: true
config/propel.ini
propel.database = mssql propel.database.driver = dblib propel.database.url = dblib:host=12.34.56.78;dbname=YOURDB propel.database.user = xxx propel.database.password = xxx
Clear the cache and then build the model
Windows Host
To access MSSQL Server from symfony 1.4 the PDO driver pdo_sqlsrv is utilized.
Do a php -m from the command line and make sure you have pdo_sqlsrv listed. Next modify/create the following files:
config/databases.yml
dev:
propel:
param:
classname: DebugPDO
debug:
realmemoryusage: true
details:
time: { enabled: true }
slow: { enabled: true, threshold: 0.1 }
mem: { enabled: true }
mempeak: { enabled: true }
memdelta: { enabled: true }
test:
propel:
param:
classname: DebugPDO
all:
propel:
class: sfPropelDatabase
param:
phptype: sqlsrv
classname: PropelPDO
dsn: sqlsrv:server=12.34.56.78,1433;Database=YOURDB
username: xxx
password: xxx
encoding: null
pooling: true
config/propel.ini
propel.database = sqlsrv propel.database.driver = sqlsrv propel.database.url = sqlsrv:server=12.34.56.78,1433;Database=YOURDB propel.database.user = xxx propel.database.password = xxx
Clear the cache and then build the model