database name and logical name

  • Thread starter Thread starter Adrian
  • Start date Start date
In what context? Where are you seeing references to "Logical Name"?

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
In what context? Where are you seeing references to "Logical Name"?

See text below for both.

Adrian.

Syntax
CREATE DATABASE database_name
[ ON
[ < filespec > [ ,...n ] ]
[ , < filegroup > [ ,...n ] ]
]
[ LOG ON { < filespec > [ ,...n ] } ]
[ COLLATE collation_name ]
[ FOR LOAD | FOR ATTACH ]

< filespec > ::=

[ PRIMARY ]
( [ NAME = logical_file_name , ]
FILENAME = 'os_file_name'
[ , SIZE = size ]
[ , MAXSIZE = { max_size | UNLIMITED } ]
[ , FILEGROWTH = growth_increment ] ) [ ,...n ]

< filegroup > ::=

FILEGROUP filegroup_name < filespec > [ ,...n ]
 
The Logical_file_name is used when creating a database via attachment. See
BOL "CREATE DATABASE (Transact SQL).

ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/29ddac46-7a0f-4151-bd94-75c1908c89f8.htm

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________

Adrian said:
See text below for both.

Adrian.

Syntax
CREATE DATABASE database_name
[ ON
[ < filespec > [ ,...n ] ]
[ , < filegroup > [ ,...n ] ]
]
[ LOG ON { < filespec > [ ,...n ] } ]
[ COLLATE collation_name ]
[ FOR LOAD | FOR ATTACH ]

< filespec > ::=

[ PRIMARY ]
( [ NAME = logical_file_name , ]
FILENAME = 'os_file_name'
[ , SIZE = size ]
[ , MAXSIZE = { max_size | UNLIMITED } ]
[ , FILEGROWTH = growth_increment ] ) [ ,...n ]

< filegroup > ::=

FILEGROUP filegroup_name < filespec > [ ,...n ]
 
The Logical_file_name is used when creating a database via attachment.
See
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/29ddac46-7a0f-4151-bd94-
75c1908c89f8.htm

We can't find
"MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/29ddac46-7a0f-4151-bd94-75c1908c8
9f8.htm"
 
In Microsoft SQL Server Management Studio Express
If one clicks om "Databases"
One can select "New Database"
There "Database Name"
and "Logical Name" has to be entered.

Could you please tell me what the difference
between these two terms is?

Adrian.
 
Adrian,

I thought that Bill had given you an answer on this.

The File name and the DataBase Name, where the first is in my idea fhysical
and the last the name you have given to your database in SQLServer Express
(use in your select string)

The last is a gues, but easy to try of course.

Cor
 
This is my question:

In Microsoft SQL Server Management Studio Express
If one clicks on "Databases"
One can select "New Database"
There "Database Name"
and "Logical Name" has to be entered.

Could you please tell me what the difference
between these two terms is?

So far the responses (for which many thanks),
have not answered my query in a way that
I can comprehend.

Adrian
 
William (Bill) Vaughn said:
The Logical_file_name is used when creating a database via attachment. See
BOL "CREATE DATABASE (Transact SQL).
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/29ddac46-7a0f-4151-bd94-
75c1908c89f8.htm

Bill,

Your reference is to others with similar questions. That does not answer my
query.
However, many thanks.

This is my question:

In Microsoft SQL Server Management Studio Express
If one clicks on "Databases"
One can select "New Database"
There "Database Name"
and "Logical Name" has to be entered.

Could you please tell me what the difference
between these two terms is?

Adrian.
 
Ok, sorry for the confusion.
The "Logical Name" in this case is the filename header (before the .mdf
extension). Generally, the database name is the same as the logical name as
"MyDatabase" is stored in "MyDatabase.MDF" and "MyDatabase.LDF" (log file).
However, if you want to obfuscate the database name to protect or hide it,
you can set the logical name to another value. I do this sometimes when I
replace or upgrade databases.
In 99% of the cases you don't need to change the Logical Name--leave it to
match the Database Name.

hth

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
Many thanks.
Adrian.

William (Bill) Vaughn said:
Ok, sorry for the confusion.
The "Logical Name" in this case is the filename header (before the .mdf
extension). Generally, the database name is the same as the logical name as
"MyDatabase" is stored in "MyDatabase.MDF" and "MyDatabase.LDF" (log file).
However, if you want to obfuscate the database name to protect or hide it,
you can set the logical name to another value. I do this sometimes when I
replace or upgrade databases.
In 99% of the cases you don't need to change the Logical Name--leave it to
match the Database Name.

hth

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
Back
Top