#66 Where are tempdb tables in explorer?

Squirrel SQL
closed-fixed
Core (461)
5
2015-01-08
2002-10-08
Stan Berka
No

I can't find any of the Sybase tempdb tables in the DB
explorer (tree). I mean not the tables created with name
starting with a '# ' but shared tables like
tempdb..myTable. I think, I have checked the whole
tempdb branch without success.

Is there a trick to see them?

I'm using the jConnect 5.5 and Sybase ASE 12.0.0.3

BTW, the client is very nice and I enjoy it a lot!

Stan Berka

Discussion

1 2 > >> (Page 1 of 2)
  • Colin Bell

    Colin Bell - 2002-10-09
    • assigned_to: nobody --> colbell
     
  • Colin Bell

    Colin Bell - 2002-10-09

    Logged In: YES
    user_id=233132

    Hi Stan,

    There seems to be a number of problems with combinations of
    different versions of Sybase and JConnect. At home I'm
    running Sybase 11 and JConnect 5.5 and I see the tempdb
    tables under the "tempdb.dbo.SYSTEM TABLE" node.

    I suggest you try JConnect 4.5. Some people have fixed other
    problems by moving from 5.5 to 4.5.

    Col

     
  • Colin Bell

    Colin Bell - 2002-10-09
    • status: open --> closed-works-for-me
     
  • Stan Berka

    Stan Berka - 2002-10-09

    Logged In: YES
    user_id=615064

    Hi Col,

    Could you do a test using the SQL like below:

    select * into tempdb..aaa from tableA where ...

    Note that there is no user specified for tempdb (it seems in
    your case there was dbo specified). I have checked with
    jConnect but still don't find the table in the place you
    suggested. BTW, even from SQLAdvatnage, the Sybase native
    client, to see this table I need to use the full table name
    tempdb..aaa. The name tempdb.dbo.aaa doesn't work.

    Stan Berka

     
  • Colin Bell

    Colin Bell - 2002-10-09
    • status: closed-works-for-me --> open-works-for-me
     
  • Colin Bell

    Colin Bell - 2002-10-09

    Logged In: YES
    user_id=233132

    Hi Stan,

    The object tree is built from the table list from the
    metadata and for Sybase/JConnect should use the full table
    type/user to retrieve the table names. IIf they're not
    showing up there it looks like a drive/DBMS issue. Just to
    confirm with you, the tables AREN'T showing in the tree at
    all? Or are they showing in the tree but the Content tab
    shows them to have zero rows?

    >> Could you do a test using the SQL like below:
    >> select * into tempdb..aaa from tableA where ...

    I'll give this a go and let you know the results, probably
    won't get a chance tonight though.

    Col

     
  • Colin Bell

    Colin Bell - 2002-10-10

    Logged In: YES
    user_id=233132

    FWIW the following SQL

    select * into tempdb..aaa from pubs..authors

    run on Microsoft SQL Server (not Sybase) creates the
    following entry in the object tree

    tempdb.dbo.TABLE.aaa

    Probably a silly question but have you refreshed the object
    tree after creating the temporary table (Session/Refresh
    Tree (F5))? If you have already expanded tempdb/dbo/TABLE
    before creating the new temp table it won't show up.
    Collapsing the tree doesn't actually remove the information,
    its cached until the tree gets refreshed.

    Col

     
  • Stan Berka

    Stan Berka - 2002-10-10

    Logged In: YES
    user_id=615064

    Col,

    They are not showing at all. I think, the tables like
    tempdb..aaa have no user assigned. Or user with an empty
    name? I am not usre here.

    Stan

     
  • Colin Bell

    Colin Bell - 2002-10-10

    Logged In: YES
    user_id=233132

    I just ran

    select * into tempdb..aaa from pubs..authors

    on Sybase 11 and JConnect 5.5/4.5 and the new table appeared
    as tempdb.dbo.TABLE.aaa in the object tree.

    I can think of two possibilities. One is the ever present
    issue of Sybase/JConnect compatibility. The other could be a
    security one. On my version of Sybase I've never created
    users, I just use the sa account.

    Could you try it as sa and see if it works?

    Col

     
  • Stan Berka

    Stan Berka - 2002-10-10

    Logged In: YES
    user_id=615064

    Col,

    I have checked it. It's not the refresh-tree problem.
    Sybase assigns the owner "guest" to a table created like
    this, regardless who actually created it. However, 'guest'
    doesn't show in the tree. Why?

    Stan

     
  • Colin Bell

    Colin Bell - 2002-10-11

    Logged In: YES
    user_id=233132

    Hi Stan,

    The list of users (or schemas in JDBC terms) comes from
    DatabaseMetaData.getSchemas(). For me the temp tables
    show under dbo, not guest (I'm not sure if guest even
    appears in the tree, I'll check tonight).

    I'll also work out how to create a user in Sybase
    and see if I get the same results as I do when using sa.

    At the moment its looking as if your (more recent) version
    of Sybase is handling temp tables (and the guest user)
    differently to mine.

    We can test a workaround where if its Sybase I can just
    add the guest user to the list of schemas (if its not
    already there) and see if the tables show up in the objet
    tree. I'll try to do that this weekend.

    Col

     
  • Colin Bell

    Colin Bell - 2002-10-12

    Logged In: YES
    user_id=233132

    Hi Stan,

    Running as an ordinary user (not sa) the temp tables show up
    in the guest user, not the dbo user for me.

    I've put in a workaround for Squirrel. If guest isn't
    returned as one of the schemas by the driver then I just add
    it. Theres two files:

    http://users.bigpond.com/colbelloz/alpha/fw.jar
    http://users.bigpond.com/colbelloz/alpha/squirrel-sql.jar

    Could you download these and replace your
    <squirrel>/squirrel-sql.jar and <squirrel>/lib/fw.jar and
    see if the guest user appears in the tree and then if the
    temp tables appear under the guest user.

    Col

     
  • Stan Berka

    Stan Berka - 2002-10-14

    Logged In: YES
    user_id=615064

    Col,
    I downloaded and put both jars into their places, removing
    the versions that were there elsewhere. Unfortunately, the
    guest user doesn't appear under tempdb.
    Stan

     
  • Colin Bell

    Colin Bell - 2002-10-14

    Logged In: YES
    user_id=233132

    Hi Stan,

    Could you connect to your Sybase database using Squirrel and
    take the Dump Session option from the Session menu and
    attach the text file to this bug report.

    Thanks
    Col

     
  • Stan Berka

    Stan Berka - 2002-10-14

    Dump of session with Sybase

     
  • Stan Berka

    Stan Berka - 2002-10-14

    Squirrel client dump

     
    Attachments
  • Stan Berka

    Stan Berka - 2002-10-14

    Logged In: YES
    user_id=615064

    Col,
    Session and client app dump files attached to the issue.

    Stan

     
  • Colin Bell

    Colin Bell - 2002-10-14

    Logged In: YES
    user_id=233132

    Hi Stan,

    I see the problem. In my version of Sybase
    DatabaseMetaData.getDatabaseProductName returns "SQL Server"
    but in later versions it returns(the more sensible) "Sybase
    SQL Server".

    I'll fix it tonight and put up a new version for you to test.

    Col

     
  • Stan Berka

    Stan Berka - 2002-10-15

    Logged In: YES
    user_id=615064

    Col,

    Unfortunately, still there is no guest user. I have
    attached new session dump file.

    I appreciate your help!

    Stan

     
  • Stan Berka

    Stan Berka - 2002-10-15

    Session dump from 10/15/02

     
  • Colin Bell

    Colin Bell - 2002-10-17

    Logged In: YES
    user_id=233132

    I'll be putting out 1.1rc2 in the next few days with some
    more changes to try to handle this.

    Col

     
  • Colin Bell

    Colin Bell - 2002-10-27

    Logged In: YES
    user_id=233132

    Hi Stan,

    1.1rc2 has just been released. Could you try this version
    and see if your temp tables show up.

    Col

     
  • Stan Berka

    Stan Berka - 2002-10-28

    Logged In: YES
    user_id=615064

    Col,

    Yes!!! Good job! Did I tell you that I appreciate a lot
    your work? The temp tables show allright under the guest
    user/schema which is at the end of the list. Thanks! I
    like the new icon and app's background.

    A question:
    My plugins, sqlscript, sessionsctipt, sqlval report
    initialization error with the RC2 (jedit doesn't complain).
    All of them work fine under the previous 1.1beta6 version.
    I didn't install them on RC2 but I have just copied them,
    all what is in the "plugins" folder from the 1.1beta6 (I
    have beta6 and RC2 in two completely sepearate folders).

    Stan Berka

     
  • Colin Bell

    Colin Bell - 2002-10-29
    • status: open-works-for-me --> closed-fixed
     
1 2 > >> (Page 1 of 2)

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks