Mysterious db and tables

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default Mysterious db and tables

    This is really strange behavior. When I create a new SQL 2000 db using
    Enterprise Manager and then register the data source using the CF Admin page,
    everything works as expected and the new db gets an OK status indicating that
    CF can connect to it in the normal way.

    When I connect to the db via RDS using either HomeSite + or Dreamweaver MX, I
    actually connect to a mysterious db that DOES NOT appear in the list of
    databases on my development server when using Enterprise Manager. The name of
    the db is the correct one I want to work with, but the tables are all wrong.
    This is a repeatable problem. Every new database I create shows me one list of
    tables using Enterprise Manager and a different list of tables using HomeSite
    or Dreamweaver. All of my old databases work properly, it's only new ones that
    are behaving this way. The tables in the mysterious db has two tables that
    appear to be standard CF variables with a table named dbo.CDATA and dbo.CGLOBAL
    and there are about 20 values in these tables all timestamped 2004-07-31. The
    other tables are all appear to be system type tables such as dbo.spt_X where X
    is items such as datatype_info, fallback_db, etc.

    Anyone have any idea how to restore normal functionality to this system?

    Honcho Guest

  2. Similar Questions and Discussions

    1. a mysterious gap in my page
      It was all perfect before I worked on the header image... There's that gap between the header and the three columns following down. I want the...
    2. Mysterious Borders
      I have created an animation in ImageReady which has been saved as a swf file. When I incorporate it into a larger image white borders appear at the...
    3. Mysterious Log-ins
      In the security portion of my event viewer there are login/logouts under the user names Guest (even though the Guest account is deactivted) and the...
    4. mysterious account
      I am the only person using my computer. XP should have my account and a guest account only, which is off. On startup, only my account shows. ...
  3. #2

    Default Re: Mysterious db and tables

    Suppose you chose to have client management and suppose that, in your
    Coldfusion Administrator, you checked the "Create Client Database Tables"
    box. Then Coldfusion will automatically create the tables, CDATA and CGLOBAL,
    by running an in-built SQL script that runs:

    <cfquery datasource="yourDatasource">
    CREATE TABLE [dbo].[CDATA] (
    [cfid] [char] (20) NULL ,
    [app] [char] (64) NULL ,
    [data] [text] NULL
    )

    CREATE TABLE [dbo].[CGLOBAL] (
    [cfid] [char] (20) NULL ,
    [data] [text] NULL ,
    [lvisit] [datetime] NULL
    )
    </cfquery>


    BKBK Guest

  4. #3

    Default Re: Mysterious db and tables

    Good suggestion as a possibility, however, the Client Variables db already exists and is the default storage mechanism for Client Sessions. Thanks for idea, it just doesn't seem to be the proble.
    Honcho Guest

  5. #4

    Default Re: Mysterious db and tables

    Is it possible cf is in the "master" database? Try running this command to get the current database name

    SELECT DB_NAME() AS CurrentDatabaseName
    mxstu Guest

  6. #5

    Default Re: Mysterious db and tables

    Mxstu said:
    >... Is it possible cf is in the "master" database?
    Indeed. I've just seen that the tables, "dbo.spt_X where X is items such
    as datatype_info, fallback_db, etc." come from the system database in
    MS SQL called "Master".

    Honcho said:
    >... The name of the db is the correct one I want to work with, but the tables
    >... are all wrong
    Combinig the two hints, one could conclude that MS SQL automatically added
    those system("master") tables to your database when you created it. Can you
    verify whether your database contains those tables? If so, what happens when
    you delete them?




    BKBK Guest

  7. #6

    Default Re: Mysterious db and tables

    >If so, caution...caution... what happens when you delete them?
    Now that's just evil ... ;-)

    I'm thinking he's simply logged into the master database and that he's not
    really in the database he thinks he is in at all. Maybe the default database
    name is not set in HomeSite/Dreamweaver. Although since I don't use either
    product, I'm not even sure they have a "default database" setting ;-)


    mxstu Guest

  8. #7

    Default Re: Mysterious db and tables

    Good idea! I checked the master db and it did contain the two CF tables and the
    data from 2004-07-31. I deleted the two tables without any apparent problems.

    This allows me to now restate the problem: I can create a new db in the usual
    fashion using Enterprise Manager, make tables, perform queries and all the
    other standard things - as long as I use Enterprise Manager. When I access the
    new db using HomeSite +, or a CF page, I am apparently connecting to the Master
    db rather than the newly created db. I can properly connect and interact with
    old databases with HomeSite + or ColdFusion pages without any difficulity, the
    problem is just with any new db I create.

    Honcho Guest

  9. #8

    Default Re: Mysterious db and tables

    Indeed getting stranger and stranger. Let's avoid complication and first verify
    that

    - you heed Mxstu and are not "simply logged into the master database and that
    he's not
    really in the database he thinks he is in at all";

    - you didn't inadvertently give your new database the name "master";

    - in Dreamweaver, in the Window menu, select databases and, if required, log
    in
    with your Coldfusion Administrator credentials. You should get the list of all
    the databases
    that Coldfusion can connect to. Is the name of your new database in the list?
    And the "Master"
    database? Assuming your new database is in the list, if you click on the "+"
    to expand the
    list of tables, do you see all the tables you expect?

    BKBK Guest

  10. #9

    Default Re: Mysterious db and tables

    I found the problem. It really was something stupid.

    In registering a new data source in CF Admin, I was specifying the Data Source
    Name on the first page, but failing to name the database on the second page. In
    these circumstances, CF evidently connects to master db and generates a status
    OK message.

    It's been a VERY LONG time since I've set up a new database and I overlooked
    one of the basic steps and CF failed indicate anything was wrong.

    Thanks for the suggestions, it got me pointed in the right direction.

    Honcho Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139