Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MS SQL Server






SuperbHosting.net & Arvixe.com have generously sponsored dedicated servers and web hosting to ensure a reliable and scalable dedicated hosting solution for BigResource.com.







How To Get DateBase Table Last Modified Date ?


Hi


View Complete Forum Thread with Replies
Sponsored Links:

Related Messages:
Table's Last Modified Date
Does anyone know how to get a table's 'last modified date' in SQL 7 ?
Sysobjects contains the 'create date', but I can't find a 'last modified date' anywhere......

View Replies !   View Related
Last Modified Date Of The Table
Hi,
 
  How to find out the Last Modified (Structure) in the SQL Table?.  Is there any query please let me know.
 
Regards,
S.Balavenkatesh

View Replies !   View Related
Table Last Modified Date/time?
I'm curious if there is a quick way to query the date/time a table was lastmodified? I appreciate any tips or suggestions provided!TIA - Rob

View Replies !   View Related
Table , Column Created, Modified Date In Sql Server 2000 Or 2005
 

Hi
 
Any one please tell me is there any possible way to identify the table modified date.
 
I have checked the table created date from sysobjects or by right click properties. my requirement is to identify the exact date of table modification and column creation,alter dates.
Is there any such provision in sql server 2000 or 2005 , My application is in sql server 2000.
 
I need to confirm this because some database structure modification has affected my application and causing dataloss i need to check with the date of structural change of table and lost data date
can any one help

View Replies !   View Related
Can &"Date Modified&" Col Be Automatically Updated W/o Trigger For Each Table?
Hello,
I am using SQL Server 2005 and ASP.NET 2.0. We have a very simple content management system where we have to keep track of date last modified for each row in all of our content tables. I know there's a "timestamp" datatype that is used for replication scenarios, but is there anything similar that I can use to set up a date_modified column for each of my content tables that will automatically update with GETDATE() whenever anything in a given row is updated?
Or do I have to create a date_modified column of smalldatetime datatype and write a trigger on update for EVERY single table of content that I have in the database? It seems there should be an easier way to do this than to write 20 triggers for my 20 content tables.
Thanks!

View Replies !   View Related
Modified Date
I am taking a "complete backup" of my production db every day using Backupagent of Arcserver 2000. But the Modified Date of .mdf and .ldf files show an older date. Is it normal?
Thanks
Wilson

View Replies !   View Related
Modified Date
Is there a way to see the last modified date on the Table structure or a stored Procedure in SQL Server 2000?

Thx

View Replies !   View Related
Last Modified Date Of A View
How to get the date a view was last modified? (As opposed to created)

View Replies !   View Related
Get File Modified Date
Hi,

the ssis package loops through a folder using a foreach loop container and imports the data inside each .csv file into the database.

Now I would like to add the functionality to first check the modified date of the .csv file. If it is NOT today's date then the package should fail or go to error.

Any thoughts how to do this please?

Thanks

View Replies !   View Related
Get Modified Date Of File
Hi,
the ssis package loops through a folder using a foreach loop container and imports the data inside each .csv file into the database.
Now I would like to add the functionality to first check the modified date of the .csv file. If it is NOT today's date then the package should fail or go to error.
Any thoughts how to do this please?
Thanks

View Replies !   View Related
File And Date Modified
Hello all,

I was just thinking about a situation which I have been tasked with in that I have a package that is scheduled to run once a day which will import data from a flat file.  The data does not have any distinguishing time that can be used to see whether or not it is beyond a last imported time. 

 

I was wondering, is there a way to access the date modified of the file?  If so I could simply append this time to a table which keeps track of all of the files and the modified dates which I have ever imported for this task.

View Replies !   View Related
Modified Date For Stored Procedures
In SQL Server is there a way to know when a procedure was lastmodified? I only see the "Create Date" column on the EnterpriseManager.Thanks Experts!

View Replies !   View Related
Win Date Modified Field On MDF Files
I'm an Oracle DBA and just getting used to MS Sqlserver. I noticed that the windows explorer "date modified" field for my database files ( .MDF files ) doesn't change much even though there is activity going on. Sometimes it doesn't change for a week.

Is this the expected behavior? Could it be that no data is changing in my database? ( I find that hard to believe)

Thanks for any insights.

View Replies !   View Related
SSIS Package Modified Date
Hi,
 
Is there a way to find out when an SSIS package was modified?
 
Thanks,
Siva.

View Replies !   View Related
File - Date Modified Attribute
I am looking to create an SSIS package to import text files into an SQL table. I'd like to import the 'date modified' attribute from the text file into one of the columns as well as the data within the text file.

 

I'm thinking an ActiveX task and variable currently, just wondered if anyone had any other thoughts on how this could be achieved.

 

Thanks

View Replies !   View Related
Finding Last Updated/modified Date
 

Hi,
I am using SQL Server 2000 and have the following questions:
 
1. How do I know the last updated (data) date using system objects or any other method?
2. How do I know the last modified date of a table using system objects or any other method?
3. How do I know when a table is last accessed

 
Any help is appreciated
 
Thanks for your time and help in advance
 
Kumar

View Replies !   View Related
Modified Date On Data File
Why is it that, even though the database is modified daily, the modified date on the data file is not updated?
Thanks.

View Replies !   View Related
Updating Modified/updated Date Column?
If your tables contain created and modified/updated dates what is the best practice for these?

1. Should you use UTC dates?
2. Do you use a default for the creation date (I assume yes)?
3. Should you create a trigger to handle the last update date? Or do you update the column directly in your stored procedures that modify data?

Also, as an aside if you store the user who created/updated the record do you store a foreign key reference to the user table or do you store the username as a varchar? Of course I know you'd normally store the fk, but I wasn't sure if the "logging" nature of the column suggests storing a string value.

View Replies !   View Related
Sql Database File Last Modified Date And Attribute Question
I have a database that is actively being used and updated.  When I look at the last modified date of the mdf file, it shows as a couple of weeks ago date and the transaction log file .ldf file shows a couple of days ago.  wonder if the database is constantly updated and changed, should it show the currently date instead.
Also, the attribte of mdf file show A as archive. what does it mean?
Thanks

View Replies !   View Related
Table Modified
Hi all,
Sql server 7

Is there anyway to findout if list of tables that has been modified after august 2003 in a database.

Waiting for ur reply.

TIA
Adil

View Replies !   View Related
How To Get Modified Time Of A Table
Hello All,I would like to get last modified timestamp for a table. Is there any way toget that information using any commands?Thanks in Advance,Muthu.

View Replies !   View Related
List Of Modified Table ?
Hi Everybody,

i am it sutck when i am writing this sql in sqlserver2005

my requirement is to list all the table name and along with their filed name if some one modified (table definition ) for a  specifc date range ? 

is there any way to get these information in sql server 2005 ?

 

regards

sujithf

View Replies !   View Related
SQL Script To Find When Table Last Modified
 I am looking for two sql scripts,1. How can i check when a tables structure was last modified? 2. How can i find the structure differences between two databases that were created the same but changed over time individualy?Looking for sql scripts to do this. Any help on either would be great.Thanks 

View Replies !   View Related
Indexes Update When Table Is Modified
Hello again,

Two Short questions this time,

I have a table with several indexes, currently most of them are very narrow (one column), and the question is, when I modify the table by updating a record, does all the indexes are calculated again?? Even if the modified field isn't indexed??? Or the server is smart and knows what indexes to calculate if any.

Second question, can I give to a query a low priority(In dynamic SQL), for example when I don't want my query to exploit too many system resources so it won't interfere the main system ?


Inon.

View Replies !   View Related
Data/Table Last Accessed/Modified
Is anyone aware of a method of determining when a table was last modified or accessed?

Some of our databases have tables that I am sure are not being used and I would like to generate a list of tables that have not been accessed or modified for some period of time.

I looked for a system procedure but didn't see anything that satisfied my need.

Currently I rename suspect tables and wait for someone or some process to gripe, but I don't care for that method for obvious reasons.

Thanks!

View Replies !   View Related
How To Show Last Time TABLE Was MODIFIED?
Hi all,

What is the best way to show when a table was last MODIFIED?

Thanks,
Stan

View Replies !   View Related
Check Whether The Database Table Has Been Modified
hello everybody,


i have one problem, I want to check the database table modified or not for every five minutes , how can check? please help me


Senthil

View Replies !   View Related
Restore Datebase
Hy,
I´ve a litel question.
I restored a Database with the Enterprice Manager. The database has a snapshotreplication configuried.
The restor of the database are correct.
But at this time, in the Enterprice Manager at the database it stand <DBNAME> (loading). I don´t what is this. I´ve got some more databases restored. But i´ve nerver seen this before.
Can some one tell me what is this? Or what must I do???

Thanks

Manfred

View Replies !   View Related
I Want To Know How To Use ADO.net Connect Remote Datebase
Im the new in ASP.net.
I find no way to connect remote datebase(sql server 2000).
Everybody who have ways help me.
Thank you!

View Replies !   View Related
Search For Text In Datebase
I have a samll problem in my select statement. my database filed is sendingDate as dateTime datatype
I have form that accpet date as text
i need to search for this text in my datebase. can any body help me to write a select statement that search for the text filed in my datebase.

Expamle
Textbox.text="11/07/2004"

SendingDate in the Database = 2004-07-11 00.00.00.000

please help me on that soon.

View Replies !   View Related
Restoring Datebase (Structure Only)
hi noob here to ask a question.
I am trying to restore a database to a new box, but I only want to restore the tables, sp, diagram... everyththing but the data. Is it possible?

View Replies !   View Related
Datebase Roles Problem.
OK this is going to sound like a very easy question but for the life of me its not working.

I have got a login called "Sales" and it is binded to a user called "sales"

The sales user has of course got the public role for my database.

I have created a Role on the database called "Sales Role" and given all the needed permissions to all the tables in the database.

As soon as i give the user the new role and then go to the securables area and look at the tables and hit the "Effective Privileges" button there is nothing listed....

If i take off the "Sales Role" role from the user and go back and look at the "Effective Privileges" it is filled with the privileges the public role has given it.

Any one no why as soon as i give the user my role (which has got privileges set for every table) the user does not have any effective rights on any table?

View Replies !   View Related
Internet-Provider For MSDE-Datebase?
Hi all,

does someone know an Internet Provider for MSDE database?

Regards

Leonid Pavlov

View Replies !   View Related
Is There A Way To Change Logical And Physical Datebase Filenames?
A database was set up as a test database and then the database name changed but the logical and physical filenames still have test in their name - obviously not a good idea. I have tried to change the physical file name but get the error message that the physical file name cannot be changed once the database has been created. I have also tried detaching the database and renaming the mdf and ldf files but these could not be re-attached so had to revert back to the original names.

View Replies !   View Related
Views Containing &&"SELECT *&&" Do Not Recompile When Table Is Modified
If I have a view such as: SELECT T.* FROM T
When I add a column to table T the view is not updated to reflect that change.
Furthermore, if there are other columns after the * in the view (for example SELECT T.*, GETDATE() as "My Date" FROM T) the last columns will contain incorrect data.

Is there a work around for this?  An "auto-recompile when tables are modified" kind of option?

Thanks
Nick

PS: This is the script I used for testing:

create table tt (
    test1 int primary key,
    test2 int)
go
insert into tt (test1, test2) values (1,2)
go
create view vw_tt as select *, getdate() as "My Date" from tt
go
select * from vw_tt
go
create view vw_tt2 as select * from tt
go
alter table tt add test3 int
go
select * from vw_tt
select * from vw_tt2
select * from tt
drop table tt
drop view vw_tt
drop view vw_tt2

View Replies !   View Related
Help Needed Little Urgent---how To Convert The String Date To Standard Date Format In SQL Table
Using DTS package in 2000 version, I am dumping TXT file contents into SQL Table,

I have one column having date in format YYYYMMDD(20070929) and corresponding column in SQL is datetime, but it fails on data type mismatch.

I have no choice of making date column in SQL to string or Varchar etc,

is there any way to make that date column in SQL to convert the value upon transformation from  format (YYYYMMDD) to M/DD/YYYY (9/29/2007).

many many thanks,

View Replies !   View Related
Extract Date,month, Year From The Date Getting From Sql Table
Hello All,
i have three textboxes in a page and i want fill those textboxes  with the date, month,year respectively.....
i have a datecreated column in discount table in a mm/dd/yy format ...how to extract the date, month, year from this format and put the value in textboxes..?
Any help..
Thanks..
Anne

View Replies !   View Related
How To Populate Fact Table With Date Id From Date Dimension
can someone help me with th best way to look up a date in date dimension and populate the date id in fact.
in the source date is dd/mm/yyyy
and in date dimension columns are date id , year , quarter , month, day

View Replies !   View Related
How To Archiv Table To Another Table With Unique Number For All Rows Once + Date
need help
how to archiv table to another table with unique number for all rows once + date time (not the second only day time +minute)
i need whan i insert to the another table add 2 more fields (unique number      ,         date_time )
 
this is the table 1 i select from
ID      fname      new_date      val_holiday
----------------------------------------------------

111   aaaa         15/03/2008       1
111   aaaa         16/03/2008       1
111   aaaa         18/03/2008       1
111   aaaa         19/03/2008       1
111   aaaa         20/03/2008       1
111   aaaa         21/03/2008       1
 
222  bbb            02/05/2008       3
222  bbb            03/05/2008       3
222  bbb            04/05/2008       3
222  bbb            05/05/2008       3
222  bbb            06/05/2008       3
222  bbb            07/05/2008       3
222  bbb            08/05/2008       3
222  bbb            09/05/2008       3
 
333  ccc            03/04/2008       4
333  ccc            04/04/2008       4
 
this is the table 2 i insert into
----------------------------------
ID      fname      new_date      val_holiday     unique number               date_time
--------------------------------------------------------------------------------------------------------------------

111   aaaa         15/03/2008       1                     666                           15/04/2008 17:03
111   aaaa         16/03/2008       1                    666                             15/04/2008 17:03
111   aaaa         18/03/2008       1
111   aaaa         19/03/2008       1                    666                             15/04/2008 17:03
111   aaaa         20/03/2008       1                    666                             15/04/2008 17:03
111   aaaa         21/03/2008       1                    666                            15/04/2008 17:03
 
222  bbb            02/05/2008       3                    666                             15/04/2008 17:03
222  bbb            03/05/2008       3
222  bbb            04/05/2008       3                   666                             15/04/2008 17:03
222  bbb            05/05/2008       3                   666                              15/04/2008 17:03
222  bbb            06/05/2008       3                  666                              15/04/2008 17:03
222  bbb            07/05/2008       3                  666                               15/04/2008 17:03
222  bbb            08/05/2008       3                  666                              15/04/2008 17:03
222  bbb            09/05/2008       3                  666                            15/04/2008 17:03
 
333  ccc            03/04/2008       4                666                               15/04/2008 17:03
333  ccc            04/04/2008       4               666                              15/04/2008 17:03
 
for evry archiv table to another table (insert) i need to get a unique number + date time (not the second only day time +minute)
 
next insert ......
ID      fname      new_date      val_holiday     unique number               date_time
--------------------------------------------------------------------------------------------------------------------

111   aaaa         15/03/2008       1                     667                           15/04/2008 17:15
111   aaaa         16/03/2008       1                    667                            15/04/2008 17:15
111   aaaa         18/03/2008       1
111   aaaa         19/03/2008       1                    667                            15/04/2008 17:15

.........................
.....................................................................667                            15/04/2008 17:15                 

 
next insert ......
ID      fname      new_date      val_holiday     unique number               date_time
--------------------------------------------------------------------------------------------------------------------

111   aaaa         15/03/2008       1                     668                           15/04/2008 08:15
111   aaaa         16/03/2008       1                    668                            15/04/2008 08:15
111   aaaa         18/03/2008       1
111   aaaa         19/03/2008       1                    668                            15/04/2008 08:15

.........................
.....................................................................668                            15/04/2008 08:15       

 
 
TNX

View Replies !   View Related
Update Table 1 To Table 2 Depending Date Time &#043; ID
need help please on update only if .

i need to update only the field "val_holiday " (in table B from table A)

and olso to check on table B the "ID" + "new_date" only if exist

and update the field "val_holiday " (in table B)

and at the end of update change the field "field_check_update_if _ok" from 0 to 1
only the row that update in table B


select from table A

update table B

WHERE ..........................HOW ?




----------------------------------------------------------------- table A

ID fname new_date val_holiday field_check_update_if _ok

---------------------------------------------------------------------------------------------------

111 aaaa 15/03/2008 999 0

111 aaaa 16/03/2008 888 0

111 aaaa 18/03/2008 77 0

111 aaaa 19/03/2008 9 0

111 aaaa 20/03/2008 111 0

111 aaaa 21/03/2008 12 0



222 bbb 02/05/2008 15 0

222 bbb 03/05/2008 16 0

222 bbb 04/05/2008 9 0

222 bbb 05/05/2008 3 0

222 bbb 06/05/2008 90 0

222 bbb 07/05/2008 3 0

222 bbb 08/05/2008 3 0

222 bbb 09/05/2008 3 0



333 ccc 03/04/2008 4 0

333 ccc 04/04/2008 4 0



----------------------------------------------------------------- table B

ID fname new_date val_holiday

----------------------------------------------------

111 aaaa 15/03/2008 1

111 aaaa 16/03/2008 1

111 aaaa 18/03/2008 1

111 aaaa 19/03/2008 1

111 aaaa 20/03/2008 1

111 aaaa 21/03/2008 1



222 bbb 02/05/2008 3

222 bbb 03/05/2008 3

222 bbb 04/05/2008 3

222 bbb 05/05/2008 3

222 bbb 06/05/2008 3

222 bbb 07/05/2008 3

222 bbb 08/05/2008 3

222 bbb 09/05/2008 3



333 ccc 03/04/2008 4

333 ccc 04/04/2008 4

------------------------------------------------------------------------------

TNX for the help and for all

View Replies !   View Related
Update Table A To Table B Depending Date Time + ID
need help please on  update only if .
i need to update only the field "val_holiday " (in table B from table A)
and olso  to check on table B the "ID" + "new_date" only if exist
and update the field "val_holiday " (in table B)


and at the end of update change the field  "field_check_update_if _ok"  from 0 to 1
only the row that update in table B
 



Code Snippet
select from table A
update table B
WHERE ..........................HOW ?
 
 


-----------------------------------------------------------------   table A
ID      fname      new_date      val_holiday     field_check_update_if _ok
---------------------------------------------------------------------------------------------------

111   aaaa         15/03/2008       999                      0
111   aaaa         16/03/2008       888                      0
111   aaaa         18/03/2008       77                        0
111   aaaa         19/03/2008       9                          0  
111   aaaa         20/03/2008       111                       0
111   aaaa         21/03/2008       12                        0
 
222  bbb            02/05/2008       15                        0
222  bbb            03/05/2008       16                        0
222  bbb            04/05/2008       9                          0
222  bbb            05/05/2008       3                          0
222  bbb            06/05/2008      90                         0
222  bbb            07/05/2008       3                          0
222  bbb            08/05/2008       3                          0
222  bbb            09/05/2008       3                          0
 
333  ccc            03/04/2008       4                          0
333  ccc            04/04/2008       4                          0
 

-----------------------------------------------------------------   table B
ID      fname      new_date      val_holiday
----------------------------------------------------

111   aaaa         15/03/2008       1
111   aaaa         16/03/2008       1
111   aaaa         18/03/2008       1
111   aaaa         19/03/2008       1
111   aaaa         20/03/2008       1
111   aaaa         21/03/2008       1
 
222  bbb            02/05/2008       3
222  bbb            03/05/2008       3
222  bbb            04/05/2008       3
222  bbb            05/05/2008       3
222  bbb            06/05/2008       3
222  bbb            07/05/2008       3
222  bbb            08/05/2008       3
222  bbb            09/05/2008       3
 
333  ccc            03/04/2008       4
333  ccc            04/04/2008       4
------------------------------------------------------------------------------
TNX for the help and for all

View Replies !   View Related
Last Modified Row
Is there any way for me to return the row that was last entered? If so, how do I go about accomplishing this?

For example,

Column1-Plant NameColumn2-Creation DateColumn3-Comments
Bayport 12305/24/01 2:51 AMAirflow became unstable
Bayport 12305/24/01 4:00 AM
Bayport 12305/24/01 5:36 AMNo events
Bayport 12305/24/01 1:00 PM
Bayport 12305/26/01 2:45 PMNo events
Bayport 12305/26/01 3:12 PMStarted liquifier 25% LIN
Bayport 405/24/01 2:51 AMSwung liquifier 0% to LIN
Bayport 405/26/01 5:45 AM
Bayport 405/26/01 5:15 PMLiquifuer @ 25% LIN
Coatesville05/24/01 9:32 AM
Coatesville05/26/01 4:25 PMNo events

If I were to query against 5/26, I would want my result to return as:
Bayport 123 5/26/01 3:12 PM (because this was the last row entered on the 26th) Started liquifier 25% LIN.
Bayport 4 5/26/01 5:15 PM (because this was the last row entered on the 26th) Liquifier @ 35% LIN.
Coatesville 5/26/01 4:25 PM No events.

View Replies !   View Related
How To Know What Schema Was Modified
Hello,Is there a way in MSSQL server to find all the objects in the databasebased on the modified date rather than the created date.Thanks in advanceKumu

View Replies !   View Related
SP Last Modified DateTime
Does anyone know how to get stored procedure or for that matter any other object last modified time?

View Replies !   View Related
How 2 Find Modified Sps
dear friends,

iam new to ssql server.i want to find the modified date of stored procedures. can any one help me in this

View Replies !   View Related
Modified Bigtables.sql
Here's an updated version of bigtables.sql that also displays the ratio of index size to data size and the percentage of unused space per table. I've found the index to data ratio particularly helpful for finding and fixing over-indexing.

Cheers
-b

/**************************************************************************************
*
* BigTables.sql
* Bill Graziano (SQLTeam.com)
* graz@sqlteam.com
* v1.11
*
**************************************************************************************/

declare @idint
declare @typecharacter(2)
declare@pagesint
declare @dbname sysname
declare @dbsize dec(15,0)
declare @bytesperpagedec(15,0)
declare @pagesperMBdec(15,0)


create table #spt_space
(
objidint null,
rowsint null,
reserveddec(15) null,
datadec(15) null,
indexpdec(15) null,
unuseddec(15) null
)

set nocount on

-- Create a cursor to loop through the user tables
declare c_tables cursor for
selectid
fromsysobjects
wherextype = 'U'

open c_tables

fetch next from c_tables
into @id

while @@fetch_status = 0
begin

/* Code from sp_spaceused */
insert into #spt_space (objid, reserved)
select objid = @id, sum(reserved)
from sysindexes
where indid in (0, 1, 255)
and id = @id

select @pages = sum(dpages)
from sysindexes
where indid < 2
and id = @id
select @pages = @pages + isnull(sum(used), 0)
from sysindexes
where indid = 255
and id = @id
update #spt_space
set data = @pages
where objid = @id


/* index: sum(used) where indid in (0, 1, 255) - data */
update #spt_space
set indexp = (select sum(used)
from sysindexes
where indid in (0, 1, 255)
and id = @id)
- data
where objid = @id

/* unused: sum(reserved) - sum(used) where indid in (0, 1, 255) */
update #spt_space
set unused = reserved
- (select sum(used)
from sysindexes
where indid in (0, 1, 255)
and id = @id)
where objid = @id

update #spt_space
set rows = i.rows
from sysindexes i
where i.indid < 2
and i.id = @id
and objid = @id

fetch next from c_tables
into @id
end


select top 25
Table_Name = (select left(name,25) from sysobjects where id = objid),
rows = convert(char(11), rows),
reserved_KB = ltrim(str(reserved * d.low / 1024.,15,0) + ' ' + 'KB'),
data_KB = ltrim(str(data * d.low / 1024.,15,0) + ' ' + 'KB'),
index_size_KB = ltrim(str(indexp * d.low / 1024.,15,0) + ' ' + 'KB'),
unused_KB = ltrim(str(unused * d.low / 1024.,15,0) + ' ' + 'KB'),
idx_data_ratio = ltrim(str(indexp*100 /data) + '%'),
unused_pct = ltrim(str(unused * 100 /reserved) + '%')

from #spt_space, master.dbo.spt_values d
where d.number = 1
and d.type = 'E'
order by reserved desc

drop table #spt_space
close c_tables
deallocate c_tables

Edited by graz to add code tags around the code.

View Replies !   View Related

Copyright © 2005-08 www.BigResource.com, All rights reserved