Showing posts with label logical. Show all posts
Showing posts with label logical. Show all posts

Thursday, March 22, 2012

Changing a db's logical file name

Good day all,
Does anyone have any ideas on how I can change the Logical File Name from
'IA_Dev_Data' to 'BDOpp_Data' for a database? If the graphic isn't visible,
I'm referring to the logical name in the File Name field on the General Tab
when viewing a database's properties in EM. We're running SQL 7.
Any and all contributions are greatly appreciated ...
Regards TJHi,
In SQL 2000 you can use
Alter Database YourDB
Modify File
(Name = CurrentFileName,
Newname = NewFileName)
There is no supported proper way to do this on SQL Server 7
Thanks
Hari
MCDBA
"TJ" <nospam@.nowhere.com> wrote in message
news:ubyxRbW2DHA.2868@.TK2MSFTNGP09.phx.gbl...
quote:

> Good day all,
> Does anyone have any ideas on how I can change the Logical File Name from
> 'IA_Dev_Data' to 'BDOpp_Data' for a database? If the graphic isn't

visible,
quote:

> I'm referring to the logical name in the File Name field on the General

Tab
quote:

> when viewing a database's properties in EM. We're running SQL 7.
>
>
>
> --
> Any and all contributions are greatly appreciated ...
> Regards TJ
>
>
>
>
|||Thanks so much Hari. Have a good one!
"Hari" <hari_prasad_k@.hotmail.com> wrote in message
news:ueHdzbY2DHA.2604@.TK2MSFTNGP09.phx.gbl...
quote:

> Hi,
> In SQL 2000 you can use
> Alter Database YourDB
> Modify File
> (Name = CurrentFileName,
> Newname = NewFileName)
> There is no supported proper way to do this on SQL Server 7
>
> Thanks
> Hari
> MCDBA
> "TJ" <nospam@.nowhere.com> wrote in message
> news:ubyxRbW2DHA.2868@.TK2MSFTNGP09.phx.gbl...
from[QUOTE]
> visible,
> Tab
>
|||Will this cause any problems by not changing the name? When is this name
used?
"TJ" <nospam@.nowhere.com> wrote in message
news:uLXLuQe2DHA.1744@.TK2MSFTNGP12.phx.gbl...
quote:

> Thanks so much Hari. Have a good one!
> "Hari" <hari_prasad_k@.hotmail.com> wrote in message
> news:ueHdzbY2DHA.2604@.TK2MSFTNGP09.phx.gbl...
> from
General[QUOTE]
>

Changing a db's logical file name

Good day all,
Does anyone have any ideas on how I can change the Logical File Name from
'IA_Dev_Data' to 'BDOpp_Data' for a database? If the graphic isn't visible,
I'm referring to the logical name in the File Name field on the General Tab
when viewing a database's properties in EM. We're running SQL 7.
--
Any and all contributions are greatly appreciated ...
Regards TJHi,
In SQL 2000 you can use
Alter Database YourDB
Modify File
(Name = CurrentFileName,
Newname = NewFileName)
There is no supported proper way to do this on SQL Server 7
Thanks
Hari
MCDBA
"TJ" <nospam@.nowhere.com> wrote in message
news:ubyxRbW2DHA.2868@.TK2MSFTNGP09.phx.gbl...
> Good day all,
> Does anyone have any ideas on how I can change the Logical File Name from
> 'IA_Dev_Data' to 'BDOpp_Data' for a database? If the graphic isn't
visible,
> I'm referring to the logical name in the File Name field on the General
Tab
> when viewing a database's properties in EM. We're running SQL 7.
>
>
>
> --
> Any and all contributions are greatly appreciated ...
> Regards TJ
>
>
>
>|||Thanks so much Hari. Have a good one!
"Hari" <hari_prasad_k@.hotmail.com> wrote in message
news:ueHdzbY2DHA.2604@.TK2MSFTNGP09.phx.gbl...
> Hi,
> In SQL 2000 you can use
> Alter Database YourDB
> Modify File
> (Name = CurrentFileName,
> Newname = NewFileName)
> There is no supported proper way to do this on SQL Server 7
>
> Thanks
> Hari
> MCDBA
> "TJ" <nospam@.nowhere.com> wrote in message
> news:ubyxRbW2DHA.2868@.TK2MSFTNGP09.phx.gbl...
> > Good day all,
> >
> > Does anyone have any ideas on how I can change the Logical File Name
from
> > 'IA_Dev_Data' to 'BDOpp_Data' for a database? If the graphic isn't
> visible,
> > I'm referring to the logical name in the File Name field on the General
> Tab
> > when viewing a database's properties in EM. We're running SQL 7.
> >
> >
> >
> >
> >
> >
> > --
> > Any and all contributions are greatly appreciated ...
> > Regards TJ
> >
> >
> >
> >
> >
> >
> >
>|||Will this cause any problems by not changing the name? When is this name
used?
"TJ" <nospam@.nowhere.com> wrote in message
news:uLXLuQe2DHA.1744@.TK2MSFTNGP12.phx.gbl...
> Thanks so much Hari. Have a good one!
> "Hari" <hari_prasad_k@.hotmail.com> wrote in message
> news:ueHdzbY2DHA.2604@.TK2MSFTNGP09.phx.gbl...
> > Hi,
> >
> > In SQL 2000 you can use
> >
> > Alter Database YourDB
> > Modify File
> > (Name = CurrentFileName,
> > Newname = NewFileName)
> >
> > There is no supported proper way to do this on SQL Server 7
> >
> >
> >
> > Thanks
> > Hari
> > MCDBA
> >
> > "TJ" <nospam@.nowhere.com> wrote in message
> > news:ubyxRbW2DHA.2868@.TK2MSFTNGP09.phx.gbl...
> > > Good day all,
> > >
> > > Does anyone have any ideas on how I can change the Logical File Name
> from
> > > 'IA_Dev_Data' to 'BDOpp_Data' for a database? If the graphic isn't
> > visible,
> > > I'm referring to the logical name in the File Name field on the
General
> > Tab
> > > when viewing a database's properties in EM. We're running SQL 7.
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > Any and all contributions are greatly appreciated ...
> > > Regards TJ
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
>

Changing a db logical file name

Good day all,
Does anyone have any ideas on how I can change the Logical File Name from 'I
A_Dev_Data' to 'BDOpp_Data' for a database? If the graphic isn't visible, I'
m referring to the Logical name in the File name file on the General Tab whe
n viewing a database's properties in EM. We're running SQL 7.
--
Any and all contributions are greatly appreciated ...
Regards TJHi TJ,
Thank you for using MSDN Newsgroup! It's my pleasure to assist you with
your issue.
From your information, you are running SQL 7 and want to change the logical
file name of a database, right?
Based on my experience, it is possible to change the physical file name by
using sp_detach_db and sp_attatch_db. But for logical file name, there is
no way to change that now.
In SQL Server 2000, it could be possible, which is described in the
following article:
http://support.microsoft.com/?id=814576
Hope this helps! If you still have questions on this issue, please feel
free to post new message here and I am ready to help!
Best regards
Baisong Wei
Microsoft Online Support
----
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only. Thanks.|||Thanks so much Baisong. Have a good one!
"Baisong Wei[MSFT]" <v-baiwei@.online.microsoft.com> wrote in message
news:YR7WMSb2DHA.2900@.cpmsftngxa07.phx.gbl...
quote:

> Hi TJ,
> Thank you for using MSDN Newsgroup! It's my pleasure to assist you with
> your issue.
> From your information, you are running SQL 7 and want to change the

logical
quote:

> file name of a database, right?
> Based on my experience, it is possible to change the physical file name by
> using sp_detach_db and sp_attatch_db. But for logical file name, there is
> no way to change that now.
> In SQL Server 2000, it could be possible, which is described in the
> following article:
> http://support.microsoft.com/?id=814576
> Hope this helps! If you still have questions on this issue, please feel
> free to post new message here and I am ready to help!
> Best regards
> Baisong Wei
> Microsoft Online Support
> ----
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
> Please reply to newsgroups only. Thanks.
>
>
sql

Changing a db logical file name

This is a multi-part message in MIME format.
--=_NextPart_000_0017_01C3D93B.E53A31C0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Good day all,
Does anyone have any ideas on how I can change the Logical File Name = from 'IA_Dev_Data' to 'BDOpp_Data' for a database? If the graphic isn't = visible, I'm referring to the Logical name in the File name file on the = General Tab when viewing a database's properties in EM. We're running = SQL 7.
-- Any and all contributions are greatly appreciated ...
Regards TJ
--=_NextPart_000_0017_01C3D93B.E53A31C0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&
Good day all,
Does anyone have any ideas on how I can change the Logical File Name = from 'IA_Dev_Data' to 'BDOpp_Data' for a database? If the graphic isn't = visible, I'm referring to the Logical name in the File name file on the General Tab = when viewing a database's properties in EM. We're running SQL 7.

-- Any and all contributions are = greatly appreciated ...Regards TJ


--=_NextPart_000_0017_01C3D93B.E53A31C0--Hi TJ,
Thank you for using MSDN Newsgroup! It's my pleasure to assist you with
your issue.
From your information, you are running SQL 7 and want to change the logical
file name of a database, right?
Based on my experience, it is possible to change the physical file name by
using sp_detach_db and sp_attatch_db. But for logical file name, there is
no way to change that now.
In SQL Server 2000, it could be possible, which is described in the
following article:
http://support.microsoft.com/?id=814576
Hope this helps! If you still have questions on this issue, please feel
free to post new message here and I am ready to help!
Best regards
Baisong Wei
Microsoft Online Support
----
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only. Thanks.|||Thanks so much Baisong. Have a good one!
"Baisong Wei[MSFT]" <v-baiwei@.online.microsoft.com> wrote in message
news:YR7WMSb2DHA.2900@.cpmsftngxa07.phx.gbl...
> Hi TJ,
> Thank you for using MSDN Newsgroup! It's my pleasure to assist you with
> your issue.
> From your information, you are running SQL 7 and want to change the
logical
> file name of a database, right?
> Based on my experience, it is possible to change the physical file name by
> using sp_detach_db and sp_attatch_db. But for logical file name, there is
> no way to change that now.
> In SQL Server 2000, it could be possible, which is described in the
> following article:
> http://support.microsoft.com/?id=814576
> Hope this helps! If you still have questions on this issue, please feel
> free to post new message here and I am ready to help!
> Best regards
> Baisong Wei
> Microsoft Online Support
> ----
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
> Please reply to newsgroups only. Thanks.
>
>

Wednesday, March 7, 2012

Change the logical name....

How to change the logical name of the database?
SQL2K.
Thanks,
Harry
exec sp_renamedb
<http://msdn.microsoft.com/library/en...ra-rz_3yle.asp>
'OldName', 'NewName'
*mike hodgson*
blog: http://sqlnerd.blogspot.com
HarrySmith wrote:

>How to change the logical name of the database?
>SQL2K.
>Thanks,
>Harry
>
>
|||Hi Harry,
U can use sp_password for change of password
use sp_changedbowner for change of db owner
from
doller
|||U can also use ep_renamedb
for user rename
from
doller
|||U can also use sp_renamedb
for user rename
from
doller
|||U can also use sp_renamedb
for user rename
from
doller
|||Hi,
Looks like Harry asked to change the logical file name. For that you have to
ALTER DATABASE command.
Command is:-
ALTER DATABASE <DBNAME> modify file (NAME = 'old_MDF_NAME', NEWNAME =
'NEW_MDF_NAME')
do the same for LDF file as well.
Note:
We can not change the logical file name in SQL 7. The command will only work
in SQL 2000.
THnaks
Hari
SQL Server MVP
"HarrySmith" <HarrySmith_56@.hotmail.com> wrote in message
news:%2304iYpBtFHA.2348@.tk2msftngp13.phx.gbl...
> How to change the logical name of the database?
> SQL2K.
> Thanks,
> Harry
>
|||Yes. Hari's solution is the right one for my requirement. I did not try
other postings.
Thanks,
Harry
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:%23Fob8BCtFHA.3080@.TK2MSFTNGP15.phx.gbl...
> Hi,
>
> Looks like Harry asked to change the logical file name. For that you have
to
> ALTER DATABASE command.
> Command is:-
> ALTER DATABASE <DBNAME> modify file (NAME = 'old_MDF_NAME', NEWNAME =
> 'NEW_MDF_NAME')
>
> do the same for LDF file as well.
>
> Note:
> We can not change the logical file name in SQL 7. The command will only
work
> in SQL 2000.
> THnaks
> Hari
> SQL Server MVP
> "HarrySmith" <HarrySmith_56@.hotmail.com> wrote in message
> news:%2304iYpBtFHA.2348@.tk2msftngp13.phx.gbl...
>

Change the logical name....

How to change the logical name of the database?
SQL2K.
Thanks,
HarryThis is a multi-part message in MIME format.
--070401030300090800000309
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
exec sp_renamedb
<http://msdn.microsoft.com/library/en-us/tsqlref/ts_sp_ra-rz_3yle.asp>
'OldName', 'NewName'
--
*mike hodgson*
blog: http://sqlnerd.blogspot.com
HarrySmith wrote:
>How to change the logical name of the database?
>SQL2K.
>Thanks,
>Harry
>
>
--070401030300090800000309
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>exec <a
href="http://links.10026.com/?link=sp_renamedb</a>">http://msdn.microsoft.com/library/en-us/tsqlref/ts_sp_ra-rz_3yle.asp">sp_renamedb</a>
'OldName', 'NewName'</tt><br>
<div class="moz-signature">
<title></title>
<meta http-equiv="Content-Type" content="text/html; ">
<p><span lang="en-au"><font face="Tahoma" size="2">--<br>
</font></span> <b><span lang="en-au"><font face="Tahoma" size="2">mike
hodgson</font></span></b><span lang="en-au"><br>
<font face="Tahoma" size="2">blog:</font><font face="Tahoma" size="2"> <a
href="http://links.10026.com/?link=http://sqlnerd.blogspot.com</a></font></span>">http://sqlnerd.blogspot.com">http://sqlnerd.blogspot.com</a></font></span>
</p>
</div>
<br>
<br>
HarrySmith wrote:
<blockquote cite="mid%2304iYpBtFHA.2348@.tk2msftngp13.phx.gbl"
type="cite">
<pre wrap="">How to change the logical name of the database?
SQL2K.
Thanks,
Harry
</pre>
</blockquote>
</body>
</html>
--070401030300090800000309--|||Hi Harry,
U can use sp_password for change of password
use sp_changedbowner for change of db owner
from
doller|||U can also use ep_renamedb
for user rename
from
doller|||U can also use sp_renamedb
for user rename
from
doller|||U can also use sp_renamedb
for user rename
from
doller|||Hi,
Looks like Harry asked to change the logical file name. For that you have to
ALTER DATABASE command.
Command is:-
ALTER DATABASE <DBNAME> modify file (NAME = 'old_MDF_NAME', NEWNAME ='NEW_MDF_NAME')
do the same for LDF file as well.
Note:
We can not change the logical file name in SQL 7. The command will only work
in SQL 2000.
THnaks
Hari
SQL Server MVP
"HarrySmith" <HarrySmith_56@.hotmail.com> wrote in message
news:%2304iYpBtFHA.2348@.tk2msftngp13.phx.gbl...
> How to change the logical name of the database?
> SQL2K.
> Thanks,
> Harry
>|||Yes. Hari's solution is the right one for my requirement. I did not try
other postings.
Thanks,
Harry
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:%23Fob8BCtFHA.3080@.TK2MSFTNGP15.phx.gbl...
> Hi,
>
> Looks like Harry asked to change the logical file name. For that you have
to
> ALTER DATABASE command.
> Command is:-
> ALTER DATABASE <DBNAME> modify file (NAME = 'old_MDF_NAME', NEWNAME => 'NEW_MDF_NAME')
>
> do the same for LDF file as well.
>
> Note:
> We can not change the logical file name in SQL 7. The command will only
work
> in SQL 2000.
> THnaks
> Hari
> SQL Server MVP
> "HarrySmith" <HarrySmith_56@.hotmail.com> wrote in message
> news:%2304iYpBtFHA.2348@.tk2msftngp13.phx.gbl...
> > How to change the logical name of the database?
> > SQL2K.
> > Thanks,
> > Harry
> >
> >
>

Change the logical name....

How to change the logical name of the database?
SQL2K.
Thanks,
Harryexec sp_renamedb
<http://msdn.microsoft.com/library/e..._ra-rz_3yle.asp>
'OldName', 'NewName'
*mike hodgson*
blog: http://sqlnerd.blogspot.com
HarrySmith wrote:

>How to change the logical name of the database?
>SQL2K.
>Thanks,
>Harry
>
>|||Hi Harry,
U can use sp_password for change of password
use sp_changedbowner for change of db owner
from
doller|||U can also use ep_renamedb
for user rename
from
doller|||U can also use sp_renamedb
for user rename
from
doller|||U can also use sp_renamedb
for user rename
from
doller|||Hi,
Looks like Harry asked to change the logical file name. For that you have to
ALTER DATABASE command.
Command is:-
ALTER DATABASE <DBNAME> modify file (NAME = 'old_MDF_NAME', NEWNAME =
'NEW_MDF_NAME')
do the same for LDF file as well.
Note:
We can not change the logical file name in SQL 7. The command will only work
in SQL 2000.
THnaks
Hari
SQL Server MVP
"HarrySmith" <HarrySmith_56@.hotmail.com> wrote in message
news:%2304iYpBtFHA.2348@.tk2msftngp13.phx.gbl...
> How to change the logical name of the database?
> SQL2K.
> Thanks,
> Harry
>|||Yes. Hari's solution is the right one for my requirement. I did not try
other postings.
Thanks,
Harry
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:%23Fob8BCtFHA.3080@.TK2MSFTNGP15.phx.gbl...
> Hi,
>
> Looks like Harry asked to change the logical file name. For that you have
to
> ALTER DATABASE command.
> Command is:-
> ALTER DATABASE <DBNAME> modify file (NAME = 'old_MDF_NAME', NEWNAME =
> 'NEW_MDF_NAME')
>
> do the same for LDF file as well.
>
> Note:
> We can not change the logical file name in SQL 7. The command will only
work
> in SQL 2000.
> THnaks
> Hari
> SQL Server MVP
> "HarrySmith" <HarrySmith_56@.hotmail.com> wrote in message
> news:%2304iYpBtFHA.2348@.tk2msftngp13.phx.gbl...
>

Friday, February 10, 2012

Change Logical Name of Db and Log file

Hi,

Is there an option (stored procedure) or whatever to change to logical name
of the databasefile and the database log file ?

Arno de Jong, The Netherlands.Hi

Use the ALTER DATABASE command and use the NEWNAME option.

http://msdn.microsoft.com/library/d...asp?frame=true

John

"A.M. de Jong" <arnojo@.wxs.nl> wrote in message
news:bn5e5h$hls$1@.reader11.wxs.nl...
> Hi,
> Is there an option (stored procedure) or whatever to change to logical
name
> of the databasefile and the database log file ?
> Arno de Jong, The Netherlands.

Change Logical Name in Script

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.

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

Change Logical File Name during Restore Database

When I attempt to restore a SQL Server 2000 database
SAPProd backup to SAPConv, it works fine.
However, if I change the "Logical File Name" from
SAPProd_Data to SAPConv_Data & SAPProd_Log to SAPConv_Log,
I get an error message saying
"Logical file SAPConv_Data is not part of database
SAPConv ... ".
I just wonder is it possible for me to change the logical
file name during restore database. Besides, I would like
to know when will we use the Logical File Name.
ThanksYou can't change the logical file name when you do the restore, though you
can change the physical file name. That said, once you have restored the
database, you can use ALTER DATABASE to change the logical file name. You
use the logical file name for various ALTER DATABASE commands as well as
DBCC SHRINKFILE.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
.
"Peter" <anonymous@.discussions.microsoft.com> wrote in message
news:20aee01c45981$75d62c00$a501280a@.phx.gbl...
When I attempt to restore a SQL Server 2000 database
SAPProd backup to SAPConv, it works fine.
However, if I change the "Logical File Name" from
SAPProd_Data to SAPConv_Data & SAPProd_Log to SAPConv_Log,
I get an error message saying
"Logical file SAPConv_Data is not part of database
SAPConv ... ".
I just wonder is it possible for me to change the logical
file name during restore database. Besides, I would like
to know when will we use the Logical File Name.
Thanks|||Thank you for your reply.
I would like to know is there any problem if 2 databases
carry the same "Logical File Name" ?
Thanks
>--Original Message--
>You can't change the logical file name when you do the
restore, though you
>can change the physical file name. That said, once you
have restored the
>database, you can use ALTER DATABASE to change the
logical file name. You
>use the logical file name for various ALTER DATABASE
commands as well as
>DBCC SHRINKFILE.
>--
> Tom
>----
>Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
>SQL Server MVP
>Columnist, SQL Server Professional
>Toronto, ON Canada
>www.pinnaclepublishing.com/sql
>..
>"Peter" <anonymous@.discussions.microsoft.com> wrote in
message
>news:20aee01c45981$75d62c00$a501280a@.phx.gbl...
>When I attempt to restore a SQL Server 2000 database
>SAPProd backup to SAPConv, it works fine.
>However, if I change the "Logical File Name" from
>SAPProd_Data to SAPConv_Data & SAPProd_Log to SAPConv_Log,
>I get an error message saying
>"Logical file SAPConv_Data is not part of database
>SAPConv ... ".
>I just wonder is it possible for me to change the logical
>file name during restore database. Besides, I would like
>to know when will we use the Logical File Name.
>Thanks
>.
>|||Hi,
No issues at all. You can have same logical name for 2 or more databases.
You can even have the same physical names for 2 database sprovided the
physical files are kept in different
folders
--
Thanks
Hari
MCDBA
"Peter" <anonymous@.discussions.microsoft.com> wrote in message
news:20bed01c45987$d431b160$a401280a@.phx.gbl...
> Thank you for your reply.
> I would like to know is there any problem if 2 databases
> carry the same "Logical File Name" ?
> Thanks
> >--Original Message--
> >You can't change the logical file name when you do the
> restore, though you
> >can change the physical file name. That said, once you
> have restored the
> >database, you can use ALTER DATABASE to change the
> logical file name. You
> >use the logical file name for various ALTER DATABASE
> commands as well as
> >DBCC SHRINKFILE.
> >
> >--
> > Tom
> >
> >----
> >Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> >SQL Server MVP
> >Columnist, SQL Server Professional
> >Toronto, ON Canada
> >www.pinnaclepublishing.com/sql
> >..
> >"Peter" <anonymous@.discussions.microsoft.com> wrote in
> message
> >news:20aee01c45981$75d62c00$a501280a@.phx.gbl...
> >When I attempt to restore a SQL Server 2000 database
> >SAPProd backup to SAPConv, it works fine.
> >
> >However, if I change the "Logical File Name" from
> >SAPProd_Data to SAPConv_Data & SAPProd_Log to SAPConv_Log,
> >I get an error message saying
> >"Logical file SAPConv_Data is not part of database
> >SAPConv ... ".
> >
> >I just wonder is it possible for me to change the logical
> >file name during restore database. Besides, I would like
> >to know when will we use the Logical File Name.
> >
> >Thanks
> >
> >.
> >

Change Logical File Name during Restore Database

When I attempt to restore a SQL Server 2000 database
SAPProd backup to SAPConv, it works fine.
However, if I change the "Logical File Name" from
SAPProd_Data to SAPConv_Data & SAPProd_Log to SAPConv_Log,
I get an error message saying
"Logical file SAPConv_Data is not part of database
SAPConv ... ".
I just wonder is it possible for me to change the logical
file name during restore database. Besides, I would like
to know when will we use the Logical File Name.
Thanks
You can't change the logical file name when you do the restore, though you
can change the physical file name. That said, once you have restored the
database, you can use ALTER DATABASE to change the logical file name. You
use the logical file name for various ALTER DATABASE commands as well as
DBCC SHRINKFILE.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
..
"Peter" <anonymous@.discussions.microsoft.com> wrote in message
news:20aee01c45981$75d62c00$a501280a@.phx.gbl...
When I attempt to restore a SQL Server 2000 database
SAPProd backup to SAPConv, it works fine.
However, if I change the "Logical File Name" from
SAPProd_Data to SAPConv_Data & SAPProd_Log to SAPConv_Log,
I get an error message saying
"Logical file SAPConv_Data is not part of database
SAPConv ... ".
I just wonder is it possible for me to change the logical
file name during restore database. Besides, I would like
to know when will we use the Logical File Name.
Thanks
|||Thank you for your reply.
I would like to know is there any problem if 2 databases
carry the same "Logical File Name" ?
Thanks

>--Original Message--
>You can't change the logical file name when you do the
restore, though you
>can change the physical file name. That said, once you
have restored the
>database, you can use ALTER DATABASE to change the
logical file name. You
>use the logical file name for various ALTER DATABASE
commands as well as
>DBCC SHRINKFILE.
>--
> Tom
>----
>Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
>SQL Server MVP
>Columnist, SQL Server Professional
>Toronto, ON Canada
>www.pinnaclepublishing.com/sql
>..
>"Peter" <anonymous@.discussions.microsoft.com> wrote in
message
>news:20aee01c45981$75d62c00$a501280a@.phx.gbl...
>When I attempt to restore a SQL Server 2000 database
>SAPProd backup to SAPConv, it works fine.
>However, if I change the "Logical File Name" from
>SAPProd_Data to SAPConv_Data & SAPProd_Log to SAPConv_Log,
>I get an error message saying
>"Logical file SAPConv_Data is not part of database
>SAPConv ... ".
>I just wonder is it possible for me to change the logical
>file name during restore database. Besides, I would like
>to know when will we use the Logical File Name.
>Thanks
>.
>
|||Hi,
No issues at all. You can have same logical name for 2 or more databases.
You can even have the same physical names for 2 database sprovided the
physical files are kept in different
folders
Thanks
Hari
MCDBA
"Peter" <anonymous@.discussions.microsoft.com> wrote in message
news:20bed01c45987$d431b160$a401280a@.phx.gbl...[vbcol=seagreen]
> Thank you for your reply.
> I would like to know is there any problem if 2 databases
> carry the same "Logical File Name" ?
> Thanks
> restore, though you
> have restored the
> logical file name. You
> commands as well as
> message

Change Logical File Name during Restore Database

When I attempt to restore a SQL Server 2000 database
SAPProd backup to SAPConv, it works fine.
However, if I change the "Logical File Name" from
SAPProd_Data to SAPConv_Data & SAPProd_Log to SAPConv_Log,
I get an error message saying
"Logical file SAPConv_Data is not part of database
SAPConv ... ".
I just wonder is it possible for me to change the logical
file name during restore database. Besides, I would like
to know when will we use the Logical File Name.
ThanksYou can't change the logical file name when you do the restore, though you
can change the physical file name. That said, once you have restored the
database, you can use ALTER DATABASE to change the logical file name. You
use the logical file name for various ALTER DATABASE commands as well as
DBCC SHRINKFILE.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
.
"Peter" <anonymous@.discussions.microsoft.com> wrote in message
news:20aee01c45981$75d62c00$a501280a@.phx
.gbl...
When I attempt to restore a SQL Server 2000 database
SAPProd backup to SAPConv, it works fine.
However, if I change the "Logical File Name" from
SAPProd_Data to SAPConv_Data & SAPProd_Log to SAPConv_Log,
I get an error message saying
"Logical file SAPConv_Data is not part of database
SAPConv ... ".
I just wonder is it possible for me to change the logical
file name during restore database. Besides, I would like
to know when will we use the Logical File Name.
Thanks|||Thank you for your reply.
I would like to know is there any problem if 2 databases
carry the same "Logical File Name" ?
Thanks

>--Original Message--
>You can't change the logical file name when you do the
restore, though you
>can change the physical file name. That said, once you
have restored the
>database, you can use ALTER DATABASE to change the
logical file name. You
>use the logical file name for various ALTER DATABASE
commands as well as
>DBCC SHRINKFILE.
>--
> Tom
>----
>Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
>SQL Server MVP
>Columnist, SQL Server Professional
>Toronto, ON Canada
>www.pinnaclepublishing.com/sql
>..
>"Peter" <anonymous@.discussions.microsoft.com> wrote in
message
> news:20aee01c45981$75d62c00$a501280a@.phx
.gbl...
>When I attempt to restore a SQL Server 2000 database
>SAPProd backup to SAPConv, it works fine.
>However, if I change the "Logical File Name" from
>SAPProd_Data to SAPConv_Data & SAPProd_Log to SAPConv_Log,
>I get an error message saying
>"Logical file SAPConv_Data is not part of database
>SAPConv ... ".
>I just wonder is it possible for me to change the logical
>file name during restore database. Besides, I would like
>to know when will we use the Logical File Name.
>Thanks
>.
>|||Hi,
No issues at all. You can have same logical name for 2 or more databases.
You can even have the same physical names for 2 database sprovided the
physical files are kept in different
folders
Thanks
Hari
MCDBA
"Peter" <anonymous@.discussions.microsoft.com> wrote in message
news:20bed01c45987$d431b160$a401280a@.phx
.gbl...[vbcol=seagreen]
> Thank you for your reply.
> I would like to know is there any problem if 2 databases
> carry the same "Logical File Name" ?
> Thanks
>
> restore, though you
> have restored the
> logical file name. You
> commands as well as
> message

Change Logical File Name Containing a Hyphen

I'm running SQL Server 2000. I have a DB with a logical file name containing
a hyphen. When trying to change the size of the db and log files by running
the following SQL statement it throws an error stating the file name is not
listed in sysfiles:
-- Modify db file size and max size
alter database DB_NAME_DS
MODIFY FILE
(
NAME = [DB_NAME-DS_DATA],
SIZE = 50MB,
MAXSIZE = 100MB,
FILEGROWTH = 50MB
)
-- Modify log file size and max size
alter database DB_NAME_DS
MODIFY FILE
(
NAME = [DB_NAME-DS_Log],
SIZE = 50MB,
MAXSIZE = 100MB,
FILEGROWTH = 50MB
)
GO
I've verified the logical file names using SP_HELPDB. When the DB was
created I did not specify any logical file names. SQL Server assigned them
automatically and put the hyphens in. What is causing the problem with the
SQL command and how can I get around this problem.
Thanks for any help!
Please post result of following:
sp_helpfile
"Skippy, DOT DBA" wrote:

> I'm running SQL Server 2000. I have a DB with a logical file name containing
> a hyphen. When trying to change the size of the db and log files by running
> the following SQL statement it throws an error stating the file name is not
> listed in sysfiles:
> -- Modify db file size and max size
> alter database DB_NAME_DS
> MODIFY FILE
> (
> NAME = [DB_NAME-DS_DATA],
> SIZE = 50MB,
> MAXSIZE = 100MB,
> FILEGROWTH = 50MB
> )
> -- Modify log file size and max size
> alter database DB_NAME_DS
> MODIFY FILE
> (
> NAME = [DB_NAME-DS_Log],
> SIZE = 50MB,
> MAXSIZE = 100MB,
> FILEGROWTH = 50MB
> )
> GO
> I've verified the logical file names using SP_HELPDB. When the DB was
> created I did not specify any logical file names. SQL Server assigned them
> automatically and put the hyphens in. What is causing the problem with the
> SQL command and how can I get around this problem.
> Thanks for any help!
|||SP_HELPFILE results:
DB_NAME-DS_Data
1<drive
letter>:\data\DB_NAME-DS_Data.MDF
PRIMARY32896 KBUnlimited10%data only
DB_NAME-DS_Log
2<drive
letter>:\Logs\DB_NAME-DS_Log.LDF
NULL102400 KBUnlimited25600 KBlog only
"Absar Ahmad" wrote:
[vbcol=seagreen]
> Please post result of following:
> sp_helpfile
> "Skippy, DOT DBA" wrote:

Change Logical File Name Containing a Hyphen

I'm running SQL Server 2000. I have a DB with a logical file name containin
g
a hyphen. When trying to change the size of the db and log files by running
the following SQL statement it throws an error stating the file name is not
listed in sysfiles:
-- Modify db file size and max size
alter database DB_NAME_DS
MODIFY FILE
(
NAME = [DB_NAME-DS_DATA],
SIZE = 50MB,
MAXSIZE = 100MB,
FILEGROWTH = 50MB
)
-- Modify log file size and max size
alter database DB_NAME_DS
MODIFY FILE
(
NAME = [DB_NAME-DS_Log],
SIZE = 50MB,
MAXSIZE = 100MB,
FILEGROWTH = 50MB
)
GO
I've verified the logical file names using SP_HELPDB. When the DB was
created I did not specify any logical file names. SQL Server assigned them
automatically and put the hyphens in. What is causing the problem with the
SQL command and how can I get around this problem.
Thanks for any help!Please post result of following:
sp_helpfile
"Skippy, DOT DBA" wrote:

> I'm running SQL Server 2000. I have a DB with a logical file name contain
ing
> a hyphen. When trying to change the size of the db and log files by runni
ng
> the following SQL statement it throws an error stating the file name is no
t
> listed in sysfiles:
> -- Modify db file size and max size
> alter database DB_NAME_DS
> MODIFY FILE
> (
> NAME = [DB_NAME-DS_DATA],
> SIZE = 50MB,
> MAXSIZE = 100MB,
> FILEGROWTH = 50MB
> )
> -- Modify log file size and max size
> alter database DB_NAME_DS
> MODIFY FILE
> (
> NAME = [DB_NAME-DS_Log],
> SIZE = 50MB,
> MAXSIZE = 100MB,
> FILEGROWTH = 50MB
> )
> GO
> I've verified the logical file names using SP_HELPDB. When the DB was
> created I did not specify any logical file names. SQL Server assigned the
m
> automatically and put the hyphens in. What is causing the problem with th
e
> SQL command and how can I get around this problem.
> Thanks for any help!|||SP_HELPFILE results:
DB_NAME-DS_Data
1 <drive
letter>:\data\DB_NAME-DS_Data.MDF
PRIMARY 32896 KB Unlimited 10% data only
DB_NAME-DS_Log
2 <drive
letter>:\Logs\DB_NAME-DS_Log.LDF
NULL 102400 KB Unlimited 25600 KB log only
"Absar Ahmad" wrote:
[vbcol=seagreen]
> Please post result of following:
> sp_helpfile
> "Skippy, DOT DBA" wrote:
>