Re: Table Creation DateTime

From: Vinodk (vinodk_sct_at_NO_SPAM_hotmail.com)
Date: 06/10/04


Date: Thu, 10 Jun 2004 11:42:53 +0530


> 1.Is there any way possible to find out who created the user table ?
If you are using proper permissions in place then from the sysobjects table
you can query something like:
Select User_name(uid), name from sysobjects
and get user who created the same. If the user is a system admin then the
user name will be dbo.

> 2.Will the Create Date of the SQL Server user table ever be modified by
any
> operation? In my production system I can see a user table Create Date got
> changed. I was wondering did any one dropped this table and created again
or
> does any of the SQL server operation does change the Create Date of the
user
> table.

The crdate in the sysobjects will hold the creation date. This WILLNOT
change unless the object was dropped and recreated. This is the only option.
The only value that changes on modification is the base_schema_ver value.
Hence if you have a snapshot of the table with these two columns you can
find out which are modified and which tables are re-created.

-- 
HTH,
Vinod Kumar
MCSE, DBA, MCAD, MCSD
http://www.extremeexperts.com
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
"Gill Soo" <SooGill@hotmail.com1> wrote in message
news:etvzC7qTEHA.3480@TK2MSFTNGP11.phx.gbl...
> Table Creation DateTime
>
> I am using SQL Server 2000.
>
> 1.Is there any way possible to find out who created the user table ?
>
> 2.Will the Create Date of the SQL Server user table ever be modified by
any
> operation? In my production system I can see a user table Create Date got
> changed. I was wondering did any one dropped this table and created again
or
> does any of the SQL server operation does change the Create Date of the
user
> table.
>
> Thank you very much for your thoughts.
>
> -Gill
>
>


Relevant Pages

  • Re: Table Creation DateTime
    ... select crdate from sysobjects where name='table' ... > Table Creation DateTime ... > 2.Will the Create Date of the SQL Server user table ever be modified by ... > does any of the SQL server operation does change the Create Date of the ...
    (microsoft.public.sqlserver.server)
  • Table Creation DateTime
    ... Table Creation DateTime ... 2.Will the Create Date of the SQL Server user table ever be modified by any ... In my production system I can see a user table Create Date got ... does any of the SQL server operation does change the Create Date of the user ...
    (microsoft.public.sqlserver.server)
  • Re: OBJECT Level Permissions
    ... Pro SQL Server 2000 Database Design ... > There isn't a generic collection object that would allow you to GRANT EXEC ... > on all procs in a single statement. ... > However you could build a cursor that looks at sysobjects and loops though ...
    (microsoft.public.sqlserver.programming)
  • RE: Attempt to initiate a new SQL Server operation with results pending.
    ... > Subject: Re: Attempt to initiate a new SQL Server operation ... >>>initiate a new SQL Server operation with results pending. ...
    (perl.dbi.users)
  • Re: Drop Column that has a Default value
    ... This fails as the ... default value object is stored in SysObjects. ... DROP CONSTRAINT MyDefault ... If you didn't specify a name for the default, SQL Server will have ...
    (microsoft.public.sqlserver.clients)