Primal SQL - Connection Problems

Use this forum to ask questions after your subscription maintenance expires or before you buy. Need information on licensing or pricing? Questions about a trial version? This is the right place for you. No scripting questions, please.
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
This topic is 12 years and 2 weeks old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
pringtef
Posts: 45
Last visit: Mon Sep 23, 2019 11:00 am

Primal SQL - Connection Problems

Post by pringtef »

PrimalSQL Version - Revision 2.0.15Operating System - Windows 7 SP1 (x64)Server Type - SQL Server 2008 R2Connection Methods attempted- SQL Server, Windows Authentication ODBC, Windows Authentication I am experiencing problems connecting to databases on a server of the above type via either of the two ways above. The "Test connection" option in the connection settings dialog does work, but when it then goes to the database browser, it spends some time before giving the message below. I can connect without problems using the same authentication settings/connection string using both SQL Server Management Studio and and also through MS Access 2010 (32 bit) via an ODBC connection. thanks, Tim Error details: MSSQL: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.Query:select pf.TABLE_CATALOG as PK_TABLE_DATABASE, pf.TABLE_SCHEMA as PK_SCHEMA_NAME, pf.TABLE_NAME as PK_TABLE_NAME, pf.COLUMN_NAME as PK_FIELD_NAME, ff.TABLE_CATALOG as FK_TABLE_DATABASE, ff.TABLE_SCHEMA as FK_SCHEMA_NAME, ff.TABLE_NAME as FK_TABLE_NAME, ff.COLUMN_NAME as FK_FIELD_NAME, pf.ORDINAL_POSITION as ORDINAL from INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS rc, INFORMATION_SCHEMA.KEY_COLUMN_USAGE ff, INFORMATION_SCHEMA.KEY_COLUMN_USAGE pf where (rc.CONSTRAINT_NAME=ff.CONSTRAINT_NAME) and (rc.CONSTRAINT_SCHEMA=ff.CONSTRAINT_SCHEMA) and (rc.CONSTRAINT_CATALOG=ff.CONSTRAINT_CATALOG) and (rc.UNIQUE_CONSTRAINT_NAME=pf.CONSTRAINT_NAME) and (rc.UNIQUE_CONSTRAINT_SCHEMA=pf.CONSTRAINT_SCHEMA) and (rc.UNIQUE_CONSTRAINT_CATALOG=pf.CONSTRAINT_CATALOG) and (ff.ORDINAL_POSITION=pf.ORDINAL_POSITION) order by pf.TABLE_SCHEMA, pf.TABLE_NAME, ff.TABLE_SCHEMA, ff.TABLE_NAME, pf.ORDINAL_POSITION
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Primal SQL - Connection Problems

Post by davidc »

Looks like it is timing out while trying to build the metadata for the database. You can increase the Query Timeout settings in Options->Editor Tab->Query Timeout. Increase the value to 60 and see if it resolves the issue. David
David
SAPIEN Technologies, Inc.
pringtef
Posts: 45
Last visit: Mon Sep 23, 2019 11:00 am

Primal SQL - Connection Problems

Post by pringtef »

This doesnt make a difference unfortunately. The settings used for the connection string mimic the defaults used by SQL server.
I've also tried switching off the used cached metadata for queries parameter, which doesnt make a difference.

Couple of odd things i've noticed when trying to use Primal SQL this morning that may be of some assistance.

1) The timeout after clicking on the '+' to open the database tree will ALWAYS occur after 30 seconds, whether or not the timeout settings are put to 60 or not in options.

2) Stranger still, i can right click on the server select 'query with sql text' and enter the exact query expanding the tree uses (select pf.TABLE_CATALOG as PK_TABLE_DATABASE, pf.TABLE_SCHEMA as ...blablabla....pf.ORDINAL_POSITION), and it returns the information successfully.

3) As long as i have the SQL text, i can still run queries as long as the query is the same or less than the setting in options, which id expect.

4) I cannot use the Visual Query Builder at all, as it always tries to obtain the schema data. Again, 30 seconds timeout.

It seems almost as if the command timeout for the SQL query that runs automatically is always set to 30 seconds as other sql commands entered manually all execute to the value set in options.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Primal SQL - Connection Problems

Post by davidc »

Sorry it seems the Timeout setting only takes effect when you run a query. Please Right click on the connection on click the Edit option in the context menu. When the connection dialog appears, click on the "Edit Connection String" button and append the following to the connection string: ;Connect Timeout=60 Please let me know if that makes a difference. David
David
SAPIEN Technologies, Inc.
pringtef
Posts: 45
Last visit: Mon Sep 23, 2019 11:00 am

Primal SQL - Connection Problems

Post by pringtef »

Hi David, unfortunately this is something i've tried as well without success.

It does seem to be that it is connecting, otherwise i wouldnt be able to run any queries, and the 'test connection' button wouldnt work i assume.

It seems just to be the post connection query that automatically runs after a connection or when you click on the '+' to the left of the database name.

Graphically you can see the database icon change to blue and the circle goes round and round after an initial connection or when you click on +

At this point, you can right clock on the database, select "query with sql text", and the window to the left opens. The sql text window connection icon there is in yellow, and queries run when entered there. However, in the database browser it will continue in blue for half a minute before the timeout message appears in the log, and the database icon will then turn grey.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Primal SQL - Connection Problems

Post by davidc »

When we release the next service build, let me know if the issue persists. David
David
SAPIEN Technologies, Inc.
User avatar
pollostar
Posts: 1
Last visit: Mon Mar 12, 2012 4:15 pm

Primal SQL - Connection Problems

Post by pollostar »

You need to reinstall your SQL server again i think some installation problems are creating some kind of errors.___________Technical SupportHP Support
pringtef
Posts: 45
Last visit: Mon Sep 23, 2019 11:00 am

Primal SQL - Connection Problems

Post by pringtef »

I'm not certain i understand your logic pollostar.

I'd need a lot more justification than 'think some installation problems are creating some kind of errors' to justify why reinstalling SQL server should be necessary.

As mentioned, it is only in the one circumstance that this occurs, the query itself runs fine also within PrimalSQL outside of the initial execution that always occur after a connection. And the timeout occurs exactly after 30 seconds when this query is run automatically, ignoring the value set as an option. It seems to be something relating to the use of a large database and the product during this part.

I'll wait till the next update mentioned previously and see if it resolves the issue.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Primal SQL - Connection Problems

Post by davidc »

Please try the lastest build: 2.0.16.David
David
SAPIEN Technologies, Inc.
pringtef
Posts: 45
Last visit: Mon Sep 23, 2019 11:00 am

Primal SQL - Connection Problems

Post by pringtef »

Hi David,

Great news, it works nicely now after the update. And after the first initial delay of a couple of minutes (which i think is due to the caching on the metadate), it displays as connected and i can switch into the Visual Query builder.

thanks for your help.

Tim
This topic is 12 years and 2 weeks old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.