Tuesday, March 20, 2012
changes to sp's
it, it retains the original date. Is there any way of finding out the most
recent modification date of an sp inside sql server 2000?
Thanks for any help.
Bernie Yaeger> Is there any way of finding out the most recent modification date of an sp
> inside sql server 2000?
No.
You should be using a source control softwware for that.
Roji. P. Thomas
Net Asset Management
http://toponewithties.blogspot.com
"Bernie Yaeger" <berniey@.optonline.net> wrote in message
news:u05XzeFrFHA.2996@.tk2msftngp13.phx.gbl...
> If I create a new sp in EM I have the date of creation; however, if I
> modify it, it retains the original date. Is there any way of finding out
> the most recent modification date of an sp inside sql server 2000?
> Thanks for any help.
> Bernie Yaeger
>|||you can explore the sql server transaction logs
how ever its not an easy thing to do
you can however use the lumigent log explorer
or apex sql log
Jose de Jesus Jr. Mcp,Mcdba
Data Architect
Sykes Asia (Manila philippines)
MCP #2324787
"Bernie Yaeger" wrote:
> If I create a new sp in EM I have the date of creation; however, if I modi
fy
> it, it retains the original date. Is there any way of finding out the mos
t
> recent modification date of an sp inside sql server 2000?
> Thanks for any help.
> Bernie Yaeger
>
>|||If you are deciplined about the use of comments in the SP header, then that
is easy to tell what has been done. If you checking your scripts into Visual
Source Safe, then you can generate scripts from the current database to a
local folder and do a fiel comparison against what is in the VSS project.
Also, you can use a file comparison tool like like WinMerge to perform the
file comparisons against folders that contain different versions of scripts.
You can configure to list only scripts and individual lines that are
different.
http://groups.google.com/group/micr...f9cfe0c46abfa76
"Bernie Yaeger" <berniey@.optonline.net> wrote in message
news:u05XzeFrFHA.2996@.tk2msftngp13.phx.gbl...
> If I create a new sp in EM I have the date of creation; however, if I
> modify it, it retains the original date. Is there any way of finding out
> the most recent modification date of an sp inside sql server 2000?
> Thanks for any help.
> Bernie Yaeger
>
Friday, February 10, 2012
Change Logical Name in Script
wanted to script the creation and restore. I've done the creation with
no problems, but on the restore, the logical names (of the original
data) are all over the place and were historically wrong.
So, when I use the script below... I've had to work out the Logical
name for the data and the log file and alter the script accordingly.
Creation
----
Create Database MyDatabase ON (NAME = MyDatabase_data, FileName =
'D:\Database\MSSQL\Data\MyDatabase.mdf') LOG ON (NAME = MyDatabase_log,
FileName = 'D:\Database\MSSQL\Data\MyDatabase.ldf') COLLATE
SQL_Latin1_General_CP1_CI_AS
Restore
----
RESTORE FILELISTONLY
from disk =
'D:\Database\MSSQL\BACKUP\2006-08-07\MyDatabase_db_200608072100.BAK'
restore database MyDatabase
from disk =
'D:\Database\MSSQL\BACKUP\2006-08-07\MyDatabase_db_200608072100.BAK'
with REPLACE,
MOVE 'SomeOtherRubbish_Data' TO
'D:\Database\MSSQL\Data\MyDatabase.mdf',
MOVE 'SomeOtherRubbish_Log' TO
'D:\Database\MSSQL\Data\MyDatabase.ldf'
go
When I then look at the properties of the database, it shows the old
convention which I don't want.
So, even though I've been neat creating the database, it gets
overwritten with the odl rubbish name. How can I change the logical
name so that I can have a nice and neat naming convention ?
Oh, Yes I know I added the collation when creating the database, but
that's another thing that we need to address at some point.
Thanks in advanceRyan (ryanofford@.hotmail.com) writes:
Quote:
Originally Posted by
I'm trying to restore about 70 databases onto a new SQL server and
wanted to script the creation and restore. I've done the creation with
no problems, but on the restore, the logical names (of the original
data) are all over the place and were historically wrong.
If I understand this correctly, you first run CREATE DATABASE for a
database, and then RESTORE for the same database for you. I've bad news
for you: the script for CREATE DATABASE was in vein. RESTORE will create
the database if it does not exist. And if it exists, it will throw the
old one away.
Quote:
Originally Posted by
So, even though I've been neat creating the database, it gets
overwritten with the odl rubbish name. How can I change the logical
name so that I can have a nice and neat naming convention ?
ALTER DATBASE db MODIFY FILE oldname NAME = oldname, NEWNAME = newname
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Thanks Erland. I'll give it a try. No major issue on not using the
create script, but thanks for the advice on that.
Ryan
Erland Sommarskog wrote:
Quote:
Originally Posted by
Ryan (ryanofford@.hotmail.com) writes:
Quote:
Originally Posted by
I'm trying to restore about 70 databases onto a new SQL server and
wanted to script the creation and restore. I've done the creation with
no problems, but on the restore, the logical names (of the original
data) are all over the place and were historically wrong.
>
If I understand this correctly, you first run CREATE DATABASE for a
database, and then RESTORE for the same database for you. I've bad news
for you: the script for CREATE DATABASE was in vein. RESTORE will create
the database if it does not exist. And if it exists, it will throw the
old one away.
>
Quote:
Originally Posted by
So, even though I've been neat creating the database, it gets
overwritten with the odl rubbish name. How can I change the logical
name so that I can have a nice and neat naming convention ?
>
ALTER DATBASE db MODIFY FILE oldname NAME = oldname, NEWNAME = newname
>
>
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
>
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx