I managed to get this thing connecting (After 8 hours total). The problem, if you believe it or not was the name of the database i've tried to connect to. The name was (see below) data-hub. I created a new one named datahub. This one worked. To confirm this guess i created another database named data2-hub with the same permissions like datahub. This one didn't work...
Solved... shockshell wrote: > > Hi everybody, > > i have a problem connecting to a mssql server. > > What i have done so far: > > 1. Installed MS SQL Server 2005 with advanced features (no named > instance) > 2. Added a new user > 3. Check if user is able to connect to server withing management studio > 4. Created a new database (owner is sa, granted access rights to new > user to new database) > 5. enabled named pipes > 6. using both connection types (windows and server) > 6.5. Changed the Database dialect from 7 to 8 to 9 and back > 7. enabled php_pdo and php_pdo_mssql > 8. Wrote this little part of code: > > self::$db=Zend_DB::factory($CONFIG->environment->get(ENVIRONMENT)->datab > aseConnections->get($serveralias)); > self::$db->getConnection(); > > Whereas xml structure is the following: > > <datahub adapter="pdo_mssql"> > <!-- Name of the database,host and credentials --> > <params host="127.0.0.1" port="1433" username="xxx" > password="xxx" dbname="data-hub" /> > </datahub> > > 9. Receving the following log entry from the database server: > > 2008-11-11 16:17:51.42 Logon Login succeeded for user 'xxx'. > Connection: non-trusted. [CLIENT: 127.0.0.1] > > 10. At the same time receving following Exception: > > SQLSTATE[HY000] General SQL Server error: Check messages from the SQL > Server. (severity 5) > > This is the stacktrace: > > [0] => Array > ( > [file] => > D:\Projekte\Unilever\Digital-Layer\src\library\Zend\Db\Adapter\Pdo\Mssql > .php > [line] => 134 > [function] => _connect > [class] => Zend_Db_Adapter_Pdo_Abstract > [type] => -> > [args] => Array > ( > ) > ) > [1] => Array > ( > [file] => > D:\Projekte\Unilever\Digital-Layer\src\library\Zend\Db\Adapter\Abstract. > php > [line] => 274 > [function] => _connect > [class] => Zend_Db_Adapter_Pdo_Mssql > [type] => -> > [args] => Array > ( > ) > ) > [2] => Array > ( > [file] => > D:\Projekte\Unilever\Digital-Layer\src\library\class\DBFactory.php > [line] => 57 > [function] => getConnection > [class] => Zend_Db_Adapter_Abstract > [type] => -> > [args] => Array > ( > ) > ) > > Has anyone an idea what is going wrong? I have no message in my logfile > (no other than the one under point 9). > > What looks strange to me is that the server replies ok, PHP says no. > > Any help would be appriciated > > Best regards > > Marcus > > > This e-mail and any attachment is for authorised use by the intended > recipient(s) only. It may contain proprietary material, confidential > information and/or be subject to legal privilege. It should not be copied, > disclosed to, retained or used by, any other party. If you are not an > intended recipient then please promptly delete this e-mail and any > attachment and all copies and inform the sender. Thank you. > > > -- View this message in context: http://www.nabble.com/mssql-Database-Connection-Problem-tp20445271p20448429.html Sent from the Zend Framework mailing list archive at Nabble.com.
