LLBLGen Project Designer Timeout

Posts   
 
    
ctadlock avatar
ctadlock
User
Posts: 60
Joined: 12-Feb-2004
# Posted on: 07-Jun-2005 20:43:24   

I have a fairly large SQL Server database, when I use the LLBLGen project designer to create a new project, it times-out on the following query (which taked 35 seconds)...


SELECT db_name() as TABLE_CATALOG, user_name(t_obj.uid) as TABLE_SCHEMA, t_obj.name as TABLE_NAME, col.name as COLUMN_NAME, c_obj.name as CONSTRAINT_NAME FROM sysobjects  c_obj, sysobjects t_obj, syscolumns col, master.dbo.spt_values v, sysindexes i WHERE permissions(t_obj.id) != 0 and c_obj.xtype in ('UQ') and t_obj.id = c_obj.parent_obj and t_obj.xtype  = 'U' and t_obj.id = col.id and col.name = index_col('[' + user_name(t_obj.uid) + '].[' + t_obj.name + ']', i.indid, v.number) and t_obj.id = i.id and c_obj.name  = i.name and v.number > 0 and v.number <= i.keycnt and v.type = 'P' ORDER BY TABLE_SCHEMA ASC, TABLE_NAME ASC, COLUMN_NAME ASC 

Any way to increase the connection timeout?

UPDATE: This issue looks specific to SQL 2005 in 2005 compatability mode.

Thanks CT

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 08-Jun-2005 11:28:23   

You could add a timeout to the command in method: SqlServerCatalogRetriever.RetrieveUniqueConstraints, line 264.

In there add the line: command.CommandTimeOut = 150;

or other large number.

Comment out the line [assembly: AssemblyKeyFile("C:\Myprojects\mystrongkey.key")] in AssemblyInfo.cs and compile the driver.

If it doesn't work, please let me know and I'll build one for you.

Frans Bouma | Lead developer LLBLGen Pro
jspanocsi
User
Posts: 145
Joined: 04-Mar-2005
# Posted on: 22-Aug-2005 19:49:45   

Hmm, I get this with 05 also, but never with 2000 on the same db. I think it's the way MS is handling the system views. If you execute that query without the where clause, it returns millions of rows. It takes query analyzer around 1:30 to execute the query with the where clause. In 2000 is was miliseconds.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 23-Aug-2005 09:42:14   

in 2005, they've added new system views, which should speed things up, though that will be done in the 2005 driver for v2.0. As a workaround: either create the project on 2000 and at runtime target the 2005 server, or don't use compatibility mode in 2005.

Frans Bouma | Lead developer LLBLGen Pro