Results 1 to 6 of 6

Thread: information_schema.tables, triggers, cursors

  1. #1
    Join Date
    Jul 2003
    Posts
    23

    information_schema.tables, triggers, cursors

    how do i return only the tables created by the user?
    in three of my databases i am inserting one record per 5 secs. in all the tables. how good is using triggers for 'insert instead of' for these tables?

  2. #2
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254
    Nothing wrong in using triggers on such tables. It depends on your architecture and what you are trying to accomplish.

    one row per 5 sec is not a huge volume.

  3. #3
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254
    This will show all user owned objects
    ---------------------------------------
    select o.name as Objectname ,s.name as Owner from sysobjects o,sysusers s
    where o.uid=s.uid order by o.name,s.name

  4. #4
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254
    --This will show all user owned objects
    for one particular user


    select o.name as Objectname ,s.name as Owner from sysobjects o,sysusers s
    where o.uid=s.uid and s.name = 'username' order by o.name,s.name

  5. #5
    Join Date
    Aug 2003
    Location
    Loughborough, UK
    Posts
    4
    Mak, Is it possible to tailor this script to return

    a) only tables
    b) only user tables

    Cheers

    Os

  6. #6
    Join Date
    Aug 2003
    Location
    Loughborough, UK
    Posts
    4
    Sorry - just worked out the User type objects - just added in

    and xtype = 'U'

    into the WHERE clause

Posting Permissions

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