[TYPO3] Typo3 / DBAL / ADODB / MSSQL: Violation of primary Key

SassoNet - Stefan Gruendel info at sassonet.de
Wed Jun 7 16:19:00 CEST 2006


Hi,

I am struggling with the combination of Typo3, DBAL, ADODB and MSSQL,
running on an IIS server for some days now.

After setting up everything and defining a new page from fresh (which all
works without major problems), I am getting the following messages once I am
viewing the new page:

Warning: mssql_query(): message: Violation of PRIMARY KEY constraint
'PK__cache_hash__37A5467C'. Cannot insert duplicate key in object
'cache_hash'. (severity 14) in
C:\...\typo3\typo3conf\ext\adodb\adodb\drivers\adodb-mssql.inc.php on line
701

Warning: mssql_query(): Query failed in
C:\...\typo3\typo3conf\ext\adodb\adodb\drivers\adodb-mssql.inc.php on line
701

These are the facts of the installation:
OS: MS Windows Server 2003 Std Edition (NT 5.2 - 3790)
MSSQL: SQL Server Std Edition Version 9.00.194 (RTM), English MS Internet
Information Services 6.0 PHP 4.4.1 MS Internet Explorer 6.0


To give you the complete picture, I have done the following steps before:

1 - Installation of Typo3 4.0 package, with Dummy
2 - Copy DBAL & ADODB extensions in /typo3conf/ext
3 - Configure DBAL localconf.php (dbal/handlerCfg) according to DBAL
documentation (part 1.4): DBAL Type = "adodb" / Driver = "mssql"
4 - Change /typo3/install/index.php (inactivate row which prevents install
script to be executed)
5 - Create new MSSQL database with name "typo"
6 - With MSSQL Enterprise Manager change properties of new database "typo":
Set options to "Use quoted identifiers" and "ANSI NULL default"
7 - Create new MSSQL user with name "typo"; give all access rights on the
new database to this user
8 - Run typo3 installation script from browser (/typo3/install/index.php)
9 - Enter "Basic Configuration", enter username, password and host (MSSQL
pipe) for database, confirm with "update localconf.php"
10 - Back to "Basic Configuration", all databases on host are shown in drop
down list, database "typo" is selected
11 - Enter Database Analyzer, it says "connected to SQL database
successfully, database typo has 0 tables". Click on "COMPARE" to update
required tables, a lot of "CREATE TABLE" statements are displayed,
automatically ticked and confirmed with "Write to database"
12 - "Changing fields" is proposed, but not done as I think this might be a
problem between typo3 and MSSQL
13 - Database Analyzer: Select "IMPORT" on Dump static data; select tick box
"Import the whole file CURRENT_STATIC directly", confirm with "Write to
database"
14 - Database Analyzer: Create admin user (message: "User created")
15 - Login to backend of typo3 with freshly created admin user (working
fine)
16 - Create new page (using wizard) and new page content on that page
(regular text element)
17 - Select "Template", typo3 says "No Template"; select "template;
BUSINESS" from drop down list, confirm with "Create template for a new
site". "Are you sure.?" is confirmed with OK, next page is confirmed with
update
18 - Select "View", getting the mentioned error messages.


Maybe anyone has encountered the same and solved this or can see any hint of
what's going wrong?

Thanks in advance
Stefan






More information about the TYPO3-english mailing list