I was wondering, is it possible to find out the date when database was
created, using T-SQL?
I know sp_helpdb returns created date, but it's char(11) type and not much
use because of different regional settings.
Thanks in advance,
Martin.Hi Martin,
I think that if you take a look into sysdatabases allocated in Master you'll
obtain that information.
Regards,
--
Current location: Alicante (ES)
"Martin H." wrote:
> I was wondering, is it possible to find out the date when database was
> created, using T-SQL?
> I know sp_helpdb returns created date, but it's char(11) type and not much
> use because of different regional settings.
> Thanks in advance,
> Martin.|||What version of SQL Server? In 2005, you can use below:
SELECT create_date FROM sys.databases
WHERE name = 'pubs'
In 2000, use sysdatabases in master instead.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Martin H." <MartinH@.discussions.microsoft.com> wrote in message
news:8183038A-E73E-4866-A1B9-70723FC573E5@.microsoft.com...
>I was wondering, is it possible to find out the date when database was
> created, using T-SQL?
> I know sp_helpdb returns created date, but it's char(11) type and not much
> use because of different regional settings.
> Thanks in advance,
> Martin.|||hi Tibor,
In sql25k sysdatabases is allocated in user database or in master as it
customary?
--
Current location: Alicante (ES)
"Tibor Karaszi" wrote:
> What version of SQL Server? In 2005, you can use below:
> SELECT create_date FROM sys.databases
> WHERE name = 'pubs'
> In 2000, use sysdatabases in master instead.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Martin H." <MartinH@.discussions.microsoft.com> wrote in message
> news:8183038A-E73E-4866-A1B9-70723FC573E5@.microsoft.com...
>
>|||Eh, my bad, i dont know how i missed so obvious solution.
Thanks for your fast responses,
Martin.
No comments:
Post a Comment