Start a new topic

INSERT INTO <table> is affected by Grid's Max Rows

[This topic is migrated from our old forums. The original author name has been removed]

Grid's Max Rows value affecting INSERT INTO <table> statement and SELECT * INTO <table> Sybase ASE 15.4 .... Product: DbVisualizer Personal 7.1.4 Build: #1585 (2010/11/23 12:21) Java VM: Java HotSpot(TM) Client VM Java Version: 1.6.0_13 Java Vendor: Sun Microsystems Inc. OS Name: Windows XP OS Arch: x86 OS Version: 5.1

[This reply is migrated from our old forums.]

Re: INSERT INTO is affected by Grid's Max Rows
Hi Alex, There is a workaround for SQL Server and SYBASE ASE for all non SELECT statements so that max rows should not impact these commands (due to the design of the SQL Server and Sybase ASE drivers). Unfortunately SELECT ... INTO is not be affected by this fix, If you see Max Rows impacting INSERT INTO this is clearly a bug. What is the Database Type for the actual database connection in the Connection tab? Also, can you please enable debug of DbVisualizer in Tools->Debug Window. Then run the INSERT INTO statement. Post or email the debug output. Regards Roger support@dbvis.com
[This reply is migrated from our old forums. The original author name has been removed]

Re: INSERT INTO is affected by Grid's Max Rows
Hi Roger: Database Type: Sybase ASE Debug outputs are below When I execute +select * into #ctp+ +from position_hist_ctp+ t, only 250000 rows are copied... (debugs are below). However, the workaround it was to do SELECT INTO where 1 = 0 just to create the table structure and then do INSERT INTO which seems not to be affected by the # of grid rows setting.. But if you can find the solution, it would be great, if not I'll just have to remember the workaround ;) ------------------------- Product Information ------------------------ Product: DbVisualizer Personal 7.1.4 Build: #1585 (2010/11/23 12:21) Java VM: Java HotSpot(TM) Client VM Java Version: 1.6.0_13 Java Vendor: Sun Microsystems Inc. OS Name: Windows XP OS Arch: x86 OS Version: 5.1 ------------------------- Connected Databases ------------------------ Database Type: Sybase ASE Major Version: 12 Minor Version: 5 Profile: sybase-ase Connection Message: Adaptive Server Enterprise Adaptive Server Enterprise/12.5.4/EBF 14919 ESD#7/P/Sun_svr4/OS 5.8/ase1254/2093/64-bit/FBO/Thu Oct 11 09:25:36 2007 jConnect (TM) for JDBC (TM) jConnect (TM) for JDBC(TM)/6.05(Build 26023)/P/EBF14466/JDK14/Thu Mar 15 1:05:45 2007 --------------------------- Debug Printouts -------------------------- 11:44:06 [DEBUG Thread-69 F.?] Creating new connection: DefaultEditor-14 for ETMA_NYDEV_DS (dbo) 11:44:06 [DEBUG Thread-69 G.?] Connecting: ETMA_NYDEV_DS (dbo) 11:44:06 [DEBUG Thread-69 I.?] Loading class using CLASSPATH: com.sybase.jdbc3.jdbc.SybDataSource 11:44:06 [DEBUG Thread-69 I.?] Loading class using dynamic ClassLoader: com.sybase.jdbc3.jdbc.SybDataSource 11:44:06 [DEBUG Thread-69 I.?] Loading class using CLASSPATH: com.sybase.jdbc3.jdbc.SybDataSource 11:44:06 [DEBUG Thread-69 I.?] Loading class using dynamic ClassLoader: com.sybase.jdbc3.jdbc.SybDataSource 11:44:06 [DEBUG pool-2-thread-15 D.?] DefaultEditor-14: SybDataSource.acceptsURL("jdbc:sybase:Tds:<<address removed>>?HOSTNAME=AE_CLS532") 11:44:06 [DEBUG pool-2-thread-15 D.?] DefaultEditor-14: SybDataSource.connect("jdbc:sybase:<<removed>?HOSTNAME=AE_CLS532", {user=<removed>, password=<removed>}) 11:44:06 [DEBUG pool-2-thread-15 C.?] DefaultEditor-14: SybConnection.setAutoCommit(true) 11:44:06 [DEBUG Thread-69 G.?] Using facade: sybase-ase for ETMA_NYDEV_DS (dbo) 11:44:06 [DEBUG pool-2-thread-15 E.?] DefaultEditor-14: SybDatabaseMetaData.getUserName() 11:44:06 [DEBUG pool-2-thread-15 E.?] DefaultEditor-14: SybDatabaseMetaData.getDatabaseProductName() 11:44:06 [DEBUG pool-2-thread-15 E.?] DefaultEditor-14: SybDatabaseMetaData.getDatabaseProductVersion() 11:44:06 [DEBUG pool-2-thread-15 E.?] DefaultEditor-14: SybDatabaseMetaData.getDriverName() 11:44:06 [DEBUG pool-2-thread-15 E.?] DefaultEditor-14: SybDatabaseMetaData.getDriverVersion() 11:44:06 [DEBUG pool-2-thread-15 E.?] DefaultEditor-14: SybDatabaseMetaData.getUserName() 11:44:06 [DEBUG Thread-69 J.execute] Executing... 11:44:06 [DEBUG Thread-69 J.setCurrentCatalog] DbConnection='ETMA_NYDEV_DS (dbo)' Catalog='tss_ds_dev2' Schema='null' NewCatalog='FDA_PRD_NY' 11:44:06 [DEBUG pool-2-thread-15 C.?] DefaultEditor-14: SybConnection.setCatalog("FDA_PRD_NY") 11:44:06 [DEBUG pool-2-thread-15 E.?] DefaultEditor-14: SybDatabaseMetaData.getUserName() 11:44:06 [DEBUG Thread-69 J.setCurrentSchema] DbConnection='ETMA_NYDEV_DS (dbo)' Catalog='null' Schema='dbo' NewSchema='dbo' 11:44:06 [DEBUG pool-2-thread-15 C.?] DefaultEditor-14: SybConnection.createStatement() 11:44:06 [DEBUG pool-2-thread-15 B.?] DefaultEditor-14: SybStatement.execute("use FDA_PRD_NY") 11:44:06 [DEBUG pool-2-thread-15 E.?] DefaultEditor-14: SybDatabaseMetaData.getUserName() 11:44:06 [DEBUG AWT-EventQueue-1 B.?] Error removing file<br><br>File doesn't exist:<br> <b>C:\DEV_APPS_SETTINGS\dbvis\History\20101208-104946837.sql</b> 11:44:06 [DEBUG AWT-EventQueue-1 B.?] Error removing file<br><br>File doesn't exist:<br> <b>C:\DEV_APPS_SETTINGS\dbvis\History\20101208-105000196.sql</b> 11:44:06 [DEBUG AWT-EventQueue-1 B.?] Error removing file<br><br>File doesn't exist:<br> <b>C:\DEV_APPS_SETTINGS\dbvis\History\20101208-105019696.sql</b> 11:44:06 [DEBUG AWT-EventQueue-1 B.?] Error removing file<br><br>File doesn't exist:<br> <b>C:\DEV_APPS_SETTINGS\dbvis\History\20101208-105227042.sql</b> 11:44:06 [DEBUG AWT-EventQueue-1 B.?] Error removing file<br><br>File doesn't exist:<br> <b>C:\DEV_APPS_SETTINGS\dbvis\History\20101208-105604029.sql</b> 11:44:06 [DEBUG AWT-EventQueue-1 B.?] Error removing file<br><br>File doesn't exist:<br> <b>C:\DEV_APPS_SETTINGS\dbvis\History\20101208-105847469.sql</b> 11:44:06 [DEBUG AWT-EventQueue-1 B.?] Error removing file<br><br>File doesn't exist:<br> <b>C:\DEV_APPS_SETTINGS\dbvis\History\20101208-105904766.sql</b> 11:44:06 [DEBUG AWT-EventQueue-1 B.?] Error removing file<br><br>File doesn't exist:<br> <b>C:\DEV_APPS_SETTINGS\dbvis\History\20101208-105905922.sql</b> 11:44:18 [DEBUG pool-2-thread-15 E.?] DefaultEditor-14: SybDatabaseMetaData.getUserName() 11:44:18 [DEBUG Thread-72 J.execute] Executing... 11:44:18 [DEBUG Thread-72 J.setCurrentCatalog] DbConnection='ETMA_NYDEV_DS (dbo)' Catalog='FDA_PRD_NY' Schema='null' NewCatalog='FDA_PRD_NY' 11:44:18 [DEBUG pool-2-thread-15 E.?] DefaultEditor-14: SybDatabaseMetaData.getUserName() 11:44:18 [DEBUG Thread-72 J.setCurrentSchema] DbConnection='ETMA_NYDEV_DS (dbo)' Catalog='null' Schema='dbo' NewSchema='dbo' 11:44:18 [DEBUG pool-2-thread-15 C.?] DefaultEditor-14: SybConnection.createStatement() 11:44:18 [DEBUG pool-2-thread-15 B.?] DefaultEditor-14: SybStatement.execute("select * into #ctp from position_hist_ctp") 11:44:20 [DEBUG pool-2-thread-15 E.?] DefaultEditor-14: SybDatabaseMetaData.getUserName() 11:44:20 [DEBUG AWT-EventQueue-1 B.?] Error removing file<br><br>File doesn't exist:<br> <b>C:\DEV_APPS_SETTINGS\dbvis\History\20101208-104946837.sql</b> 11:44:20 [DEBUG AWT-EventQueue-1 B.?] Error removing file<br><br>File doesn't exist:<br> <b>C:\DEV_APPS_SETTINGS\dbvis\History\20101208-105000196.sql</b> 11:44:20 [DEBUG AWT-EventQueue-1 B.?] Error removing file<br><br>File doesn't exist:<br> <b>C:\DEV_APPS_SETTINGS\dbvis\History\20101208-105019696.sql</b> 11:44:20 [DEBUG AWT-EventQueue-1 B.?] Error removing file<br><br>File doesn't exist:<br> <b>C:\DEV_APPS_SETTINGS\dbvis\History\20101208-105227042.sql</b> 11:44:20 [DEBUG AWT-EventQueue-1 B.?] Error removing file<br><br>File doesn't exist:<br> <b>C:\DEV_APPS_SETTINGS\dbvis\History\20101208-105604029.sql</b> 11:44:20 [DEBUG AWT-EventQueue-1 B.?] Error removing file<br><br>File doesn't exist:<br> <b>C:\DEV_APPS_SETTINGS\dbvis\History\20101208-105847469.sql</b> 11:44:20 [DEBUG AWT-EventQueue-1 B.?] Error removing file<br><br>File doesn't exist:<br> <b>C:\DEV_APPS_SETTINGS\dbvis\History\20101208-105904766.sql</b> 11:44:20 [DEBUG AWT-EventQueue-1 B.?] Error removing file<br><br>File doesn't exist:<br> <b>C:\DEV_APPS_SETTINGS\dbvis\History\20101208-105905922.sql</b>
[This reply is migrated from our old forums. The original author name has been removed]

Re: INSERT INTO is affected by Grid's Max Rows
Hi Roger. I know I said that I found a work-around, but is it in your plans to address the SELECT INTO issue? Thanks..
[This reply is migrated from our old forums.]

Re: INSERT INTO is affected by Grid's Max Rows
Alex, SELECT INTO is difficult to fix since we then need to parse the complete statement. I've put it on the list. Not top prio though. Another workaround is that you put the following before the SELECT INTO statement: @set maxrows ; (Temporarily set the max rows for the duration of the script) Regards Roger
[This reply is migrated from our old forums.]

Re: INSERT INTO is affected by Grid's Max Rows
Alex, Just to inform you this is now fixed in the new 9.1.12 version. http://www.dbvis.com/download/ Regards Roger