Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2010
    Posts
    2

    Unanswered: DDL triggers disable

    Hi All,
    I'm joining this forum because i dont have the good connection with the DB Admin at my company that I would like....there was a question as to who created Adventure works tables....and i might have but not intentionally ....after learnin about this problem i searched for a way to monitor who creates tables....and this way i know if i do when i'm learning Visual Studio. VS is completely new to me and i see how much power it has based on my limited programmin knowledge from other development tools like VBA. about a month ago i was practicing with VS and learned in SQL Server that the cubes and other things that were experiments in VS actually deployed in the DB.

    So the problem i'm having now is i cant do anything....i ran code on website i found, DDL Triggers in SQL Server 2005, which creates DDL triggers in hopes to track when i create tables...

    .so let me explain the DB structure....


    there is the server....in server there is one Database called "A" that is a copy of the production.....it is a mirror image of the actual warehouse data....restore happens once every morning. Second one is "B".....that is the workspace provided ...and really the only place to which i can create tables and views.

    So what happened after i ran that DDL code is that there now appears a third database called DDL_Trigger_Log.....and i can't delete it...i can't access it...or nothing


    when i'm in A or B, i get the error

    Cannot find the object "B" because it does not exist or you do not have permissions.

    this happens on any query i try to run...help








    also i was practicing with connecting to analytics on local and creatnig a data cube...hope that has nothing to do with the immediate problem of running any code....but i think that data cube might have somethin to do with the Adventure works tables that were created....about a month ago i was doing so and the tables were created in B database but this time i dont think it was me....

  2. #2
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    I think you got into a realm of confusing concepts. Until you get a clear understanding of what a database is in SQL, you'll be pretty much lost if you decide to go as far as DDL triggers. If you're getting "Cannot find the object 'B'" error, this means that you're trying to do anything other than USE, DROP, or ALTER (creat is omitted for obvious reasons).
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

  3. #3
    Join Date
    Jun 2010
    Posts
    2
    i can't alter or create new tables in "B"

    so what is the problem then?? how can i turn off the triggers i have set to "B" that prevents doing anything new?

  4. #4
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    Again, if you're talking about B being a database, you would be getting an error similar to this if it didn't exist:

    Could not locate entry in sysdatabases for database 'B'. No entry found with that name. Make sure that the name is entered correctly.

    Do everyone a favor, and execute the following from the Query window:

    select db_name()

    Copy the output and paste it here.
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

Posting Permissions

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