[unixODBC-support] isql: unable to create temp tables

Gorman, Greg Greg.Gorman at mercer.com
Wed Jan 11 16:26:16 GMT 2012


Hello all,

I am using isql version 2.3.0, under Red Hat Enterprise Linux Server release 5.3 (Tikanga), to connect to a MS SQL Server db.

I can successfully connect to the database using my username and password.
I can successfully run select statements just fine.
I *cannot create a temp table*, though, even though my user id has permission to do so.

For comparison, I *can*, using the same credentials, create a temp table using each of the following:
        the sqlcmd utility,
        the tsql utility, and
        the SQL Server Management Studio (from Windows).

Any guidance or help would be appreciated. Thank you in advance.

/etc/odbcinst.ini

        /home/ggorman> cat /etc/odbcinst.ini

        [SQL Server Native Client 11.0]
        Description=Microsoft SQL Server ODBC Driver V1.0 for Linux
        Driver=/opt/microsoft/sqlncli/lib64/libsqlncli-11.0.so.1720.0
        UsageCount=1

/etc/odbc.ini

        /home/ggorman> cat /etc/odbc.ini

        [DB34]
        Driver=SQL Server Native Client 11.0
        Servername=USFKL11DB34
        Server=USFKL11DB34.domain.com,3433

Screen output below:

/home/ggorman> isql -v DB34 myuser mypwd
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL> create table [#testgg] ([Field1] int, [Field2] nvarchar(50));
SQLRowCount returns 0
SQL> use dev_db
[01000][Microsoft][SQL Server Native Client 11.0][SQL Server]Changed database context to 'dev_db'.
[ISQL]INFO: SQLExecute returned SQL_SUCCESS_WITH_INFO
SQLRowCount returns 0
SQL> create table [#testgg] ([Field1] int, [Field2] nvarchar(50));
SQLRowCount returns 0
SQL> create table #testgg (Field1 int, Field2 varchar(50))
SQLRowCount returns 0
SQL> select top 1 * from person
+--------------+------------+-------------------------------+-------------------------------+-------------------------------+-------------+-------------+------------------------+------------------------+---------+--------------+---------------+------------------------+
| personId     | ssnNumberTx| lastNm                        | firstNm                       | middleNm                      | namePrefixTx| nameSuffixTx| deathDt                | birthDt                | genderIn| addressId    | sourceOriginCd| lastTs                 |
+--------------+------------+-------------------------------+-------------------------------+-------------------------------+-------------+-------------+------------------------+------------------------+---------+--------------+---------------+------------------------+
| 3783         | 012345678  |  DOE                          | JOHN                          |                               |             |             |                        | 1950-01-01 00:00:00.000| M       | 3333         |               | 2011-12-05 14:43:07.560|
+--------------+------------+-------------------------------+-------------------------------+-------------------------------+-------------+-------------+------------------------+------------------------+---------+--------------+---------------+------------------------+
SQLRowCount returns 0
1 rows fetched


This e-mail and any attachments may be confidential, proprietary or legally privileged. Any review, use, disclosure, distribution or copying of this e-mail is prohibited except by or on behalf of the intended recipient. If you received this message in error or are not the intended recipient, please delete or destroy the e-mail message and any attachments or copies and notify the sender of the erroneous delivery by return e-mail. To the extent that this message or its attachments were sent without encryption, we can not guarantee that the contents have not been changed or tampered with. Any advice expressed in this message is being delivered to you solely for your use in connection with the matters addressed herein and may not be used for any other purpose without our prior written consent.

The information contained in this document (including any attachments) is not intended by Mercer to be used, and it cannot be used, for the purpose of avoiding penalties under the Internal Revenue Code that may be imposed on the taxpayer.


More information about the unixODBC-support mailing list