Wednesday, March 28, 2012
Latest modification time of a table
either others or myself)?
TIAUnfoortunately, the only way to do this is to write code, (a trigger,
probbaly) that would record, (somewhere) the current datetime whenever
someone updates inserts or deletes a record in the table. If that is not
being done, then you'reout of luck for past changes, but you can implement
something like this for future changes, if you wanted...
"Krygim" wrote:
> Is there any way to get the latest modification time of a table (modified
by
> either others or myself)?
> TIA
>
>
Monday, March 26, 2012
LastNonEmpty + Time PrevMember don't aggregate correctly
I'm using the Account Intelligence and when I have a balance account modified with a mdx script in cube calculation using the Time prevmember it don't aggregates correctly. I think that it's a solver order problem.
I have a account dimension like that:
Balance (balance account)
Asset (balance account)
Computers (balance account)
Result (flow account)
Computers Investments (flow account)
In the cube calculation I have these formula:
Computers = (Computers, Time.Currentmember.Prevmember) + Computer Investments;
When I query these data I receive these:
2007 Jan Fev Mar
Balance 0 100 50 0
Asset 0 100 50 0
Computers 150 100 150 150
Result 150 100 50 0
Computers Investments 150 100 50 0
It's not aggregatin the (Computers, Time.Currentmember.Prevmember) in account hierarchy, any Idea why is that?
I'm using SQL Server 2005 Enterprise SP1.
I was using the follow Time Hierarchy:
Year
Friday, March 23, 2012
Last Update date/time
Does SQL Server 2000 store somewhere the date/time that a table was last
modified? How about when the data in the table was last updated?
How can I view this information if so?
Thanks in advance,
Mike> Does SQL Server 2000 store somewhere the date/time that a table was last
> modified? How about when the data in the table was last updated?
No and no.
Your options:
- auditing software, e.g. Entegra from www.lumigent.com
- setting up your own triggers
- profiler
- reading the log after the fact
--
This is my signature. It is a general reminder.
Please post DDL, sample data and desired results.
See http://www.aspfaq.com/5006 for info.|||You could use a TIMESTAMP attribute, but this has been turned into a table
modification version number in stead of the old DATE/TIME value once
supplied. It can tell you if a row has been modified before or after other
rows though.
Sincerely,
Anthony Thomas
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:eWRWXgtNFHA.3716@.TK2MSFTNGP14.phx.gbl...
> Does SQL Server 2000 store somewhere the date/time that a table was last
> modified? How about when the data in the table was last updated?
No and no.
Your options:
- auditing software, e.g. Entegra from www.lumigent.com
- setting up your own triggers
- profiler
- reading the log after the fact
--
This is my signature. It is a general reminder.
Please post DDL, sample data and desired results.
See http://www.aspfaq.com/5006 for info.sql
Wednesday, March 21, 2012
Last Saved/modified date of Stored Procedures
Is there any way to find the "Last Saved Date" or "Last Modified Date" for a
SQL Stored Procedure? I have only found "Create Date" in SQL Enterprise
Manager.
Are Stored Procedures ever saved as files on the hard drive? If they are,
then maybe I could find the last saved date using Windows Explorer on the
SQL Server.
Any ideas for finding the Stored Procedure "Lst Saved Date", that don't
involve installing any software (that's not an option in this case)?
HI,
SQL Server will not save the modied date and time of any objects (Tables,
Views, procedures, triggers...).
Thanks
Hari
MCDBA
"J Baird" <jill[dot]baird[at]lmco[dot]com> wrote in message
news:eDjZlO$GEHA.3472@.TK2MSFTNGP11.phx.gbl...
> I'm not sure if this is the right newsgroup for this, but I took a
guess...
> Is there any way to find the "Last Saved Date" or "Last Modified Date" for
a
> SQL Stored Procedure? I have only found "Create Date" in SQL Enterprise
> Manager.
> Are Stored Procedures ever saved as files on the hard drive? If they are,
> then maybe I could find the last saved date using Windows Explorer on the
> SQL Server.
> Any ideas for finding the Stored Procedure "Lst Saved Date", that don't
> involve installing any software (that's not an option in this case)?
>
|||And in addition, no stored procedures aren't saved as files
on the hard drive - not unless you write scripts for the
stored procedures modifications and save those (which isn't
necessarily a bad idea). But SQL Server doesn't do anything
like that "behind the scenes".
If you want a new create date every time you modify a stored
procedure, you need to do a drop procedure and create
procedure instead of an alter procedure.
-Sue
On Tue, 6 Apr 2004 12:24:27 -0400, "J Baird"
<jill[dot]baird[at]lmco[dot]com> wrote:
>I'm not sure if this is the right newsgroup for this, but I took a guess...
>Is there any way to find the "Last Saved Date" or "Last Modified Date" for a
>SQL Stored Procedure? I have only found "Create Date" in SQL Enterprise
>Manager.
>Are Stored Procedures ever saved as files on the hard drive? If they are,
>then maybe I could find the last saved date using Windows Explorer on the
>SQL Server.
>Any ideas for finding the Stored Procedure "Lst Saved Date", that don't
>involve installing any software (that's not an option in this case)?
>
|||No there isn't. The only way currently to tell is if the sp was actually
dropped and recreated and then you could use the created date. Altering a
sp does not change this date.
Andrew J. Kelly SQL MVP
"J Baird" <jill[dot]baird[at]lmco[dot]com> wrote in message
news:eDjZlO$GEHA.3472@.TK2MSFTNGP11.phx.gbl...
> I'm not sure if this is the right newsgroup for this, but I took a
guess...
> Is there any way to find the "Last Saved Date" or "Last Modified Date" for
a
> SQL Stored Procedure? I have only found "Create Date" in SQL Enterprise
> Manager.
> Are Stored Procedures ever saved as files on the hard drive? If they are,
> then maybe I could find the last saved date using Windows Explorer on the
> SQL Server.
> Any ideas for finding the Stored Procedure "Lst Saved Date", that don't
> involve installing any software (that's not an option in this case)?
>
Monday, March 19, 2012
Last Modified to Store Procedure
Hello everyone,
I have store procedure that was created on 9/15/2005. It went through some modificiations since then. How can I find out when was the last updated or last two update on this object?
Thanks
select modify_date from sys.objects
where name = '<object_name>'
Thanks
|||Thanks Zoya.
It workout perfectly
Tom
Last Modified Field
UPDATE s
SET LastModified = getdate()
FROM secUser s
join inserted i on s.UID = i.UID
Any suggestions would be appreciated.
Thanks,
Nate BaxleyIn this case, the best choice is instead of update trigger.
Good luck!
Last Modified Date of the Database Object ?
In order to get a version control.
I would like to get the last modified date of the Store Procedure, Table De
finition
I find the the [sysobjects] Table ONLY contains a Create Date.
How can i find it.
Do SQL Server remember the [ALTER] and [RECOMPILE] time of these objects
Thank you very much
EricLunCurrent versions of SQL Server do not track modifications to objects, only
creation. You will have to track these yourself, or use a third party
product to do so. Your version control strategy, by the way, should not
rely on a feature of the product. In other words, if you were using version
control tools, you should have alter scripts stored in your source control
tool, without having to look at the database (other than to verify that what
is deployed exists in source control, or vice versa).
http://www.aspfaq.com/2495
Yukon will offer DDL triggers, but that's several months away, at least.
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"EricLun >" <eric_klyuen@.yahoo.com.hk <no spam pls> wrote in message
news:DCE9AA09-6AF7-4BFD-A576-6D730BD4D79B@.microsoft.com...
quote:
> Dear All,
> In order to get a version control.
> I would like to get the last modified date of the Store Procedure, Table
Definition
quote:|||Thank you very much form your help.
> I find the the [sysobjects] Table ONLY contains a Create Date.
> How can i find it.
> Do SQL Server remember the [ALTER] and [RECOMPILE] time of these objects
> Thank you very much
> EricLun
Last Modified Date of the Database Object ?
In order to get a version control.
I would like to get the last modified date of the Store Procedure, Table Definition
I find the the [sysobjects] Table ONLY contains a Create Date.
How can i find it.
Do SQL Server remember the [ALTER] and [RECOMPILE] time of these objects
Thank you very much
EricLunCurrent versions of SQL Server do not track modifications to objects, only
creation. You will have to track these yourself, or use a third party
product to do so. Your version control strategy, by the way, should not
rely on a feature of the product. In other words, if you were using version
control tools, you should have alter scripts stored in your source control
tool, without having to look at the database (other than to verify that what
is deployed exists in source control, or vice versa).
http://www.aspfaq.com/2495
Yukon will offer DDL triggers, but that's several months away, at least.
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"EricLun >" <eric_klyuen@.yahoo.com.hk <no spam pls> wrote in message
news:DCE9AA09-6AF7-4BFD-A576-6D730BD4D79B@.microsoft.com...
> Dear All,
> In order to get a version control.
> I would like to get the last modified date of the Store Procedure, Table
Definition
> I find the the [sysobjects] Table ONLY contains a Create Date.
> How can i find it.
> Do SQL Server remember the [ALTER] and [RECOMPILE] time of these objects
> Thank you very much
> EricLun|||Thank you very much form your help.
Last modified date of a view
> How to get the date a view was last modified? (As opposed to created)
Alas this information is not available in SQL Server. There is a column
schema_ver in sysobjects which appears to be incremented by 16 each time you
alter the view, but that is as close as you get.
--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||"Erland Sommarskog" <sommar@.algonet.se> wrote in message
news:Xns94464E4FE2E5Yazorman@.127.0.0.1...
> Trev@.Work (bouncer@.localhost) writes:
> > How to get the date a view was last modified? (As opposed to created)
> Alas this information is not available in SQL Server. There is a column
> schema_ver in sysobjects which appears to be incremented by 16 each time
you
> alter the view, but that is as close as you get.
That may help, thanks.
Last modified date of a stored procedure
I only can find the the creation date in the sysobjects table.To my knowledge SQL Server does not maintain changes to stored procedures, only the last version and compilation date.
Last Modified Date
purged frequently. I am trying to determine which tables are truly in use
versus those tables that are not being used at all. Where or how might I
obtain the last date/time a table was modifed?
--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200510/1Robert,
You would need to have had Profiler or some third-party auditing tool
running to determine this. Another option would be to use some extra
auditing code in the tables or use triggers. C2 is probably overkill for
something like this.
Read these:
http://www.microsoft.com/technet/security/prodtech/sqlserver/sql2kaud.mspx
and
http://www.akadia.com/services/sqlsrv_table_auditing.html
HTH
Jerry
"Robert R via SQLMonster.com" <u3288@.uwe> wrote in message
news:55d4d8776aa3c@.uwe...
>I have a number of tables in a database that have 0 records. Some tables
>are
> purged frequently. I am trying to determine which tables are truly in use
> versus those tables that are not being used at all. Where or how might I
> obtain the last date/time a table was modifed?
>
> --
> Message posted via SQLMonster.com
> http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200510/1
Last Modified Date
purged frequently. I am trying to determine which tables are truly in use
versus those tables that are not being used at all. Where or how might I
obtain the last date/time a table was modifed?
Message posted via droptable.com
http://www.droptable.com/Uwe/Forum...server/200510/1Robert,
You would need to have had Profiler or some third-party auditing tool
running to determine this. Another option would be to use some extra
auditing code in the tables or use triggers. C2 is probably overkill for
something like this.
Read these:
http://www.microsoft.com/technet/se...r/sql2kaud.mspx
and
http://www.akadia.com/services/sqls...e_auditing.html
HTH
Jerry
"Robert R via droptable.com" <u3288@.uwe> wrote in message
news:55d4d8776aa3c@.uwe...
>I have a number of tables in a database that have 0 records. Some tables
>are
> purged frequently. I am trying to determine which tables are truly in use
> versus those tables that are not being used at all. Where or how might I
> obtain the last date/time a table was modifed?
>
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forum...server/200510/1
Last Modified Date
purged frequently. I am trying to determine which tables are truly in use
versus those tables that are not being used at all. Where or how might I
obtain the last date/time a table was modifed?
Message posted via droptable.com
http://www.droptable.com/Uwe/Forums...erver/200510/1
Robert,
You would need to have had Profiler or some third-party auditing tool
running to determine this. Another option would be to use some extra
auditing code in the tables or use triggers. C2 is probably overkill for
something like this.
Read these:
http://www.microsoft.com/technet/sec.../sql2kaud.mspx
and
http://www.akadia.com/services/sqlsr..._auditing.html
HTH
Jerry
"Robert R via droptable.com" <u3288@.uwe> wrote in message
news:55d4d8776aa3c@.uwe...
>I have a number of tables in a database that have 0 records. Some tables
>are
> purged frequently. I am trying to determine which tables are truly in use
> versus those tables that are not being used at all. Where or how might I
> obtain the last date/time a table was modifed?
>
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forums...erver/200510/1
Monday, March 12, 2012
Last Date Used
data base when last accessed, updated or modified. Does anyone know of
a tool that performs this function?
Ernie
A Plan without Action is a DayDream
Action without a Plan is a Nightmare
*** Sent via Developersdex http://www.codecomments.com ***
Hi,
SQL Server will not store this information. For doing this you need to
enable the profiler, store the output into a table and then do the
analysis manually to get the report.
Thanks
Hari
SQL Server MVP
"Ernie" <nospan@.devdex.com> wrote in message
news:OUTJ%23INUFHA.584@.TK2MSFTNGP15.phx.gbl...
> I am trying to generate a report listing data base and tables within the
> data base when last accessed, updated or modified. Does anyone know of
> a tool that performs this function?
> Ernie
> A Plan without Action is a DayDream
> Action without a Plan is a Nightmare
> *** Sent via Developersdex http://www.codecomments.com ***