What Is A Logical File?

Nov 7, 2000

In the database properties screen, there are four tabs: General, Transaction Log, Options, Permissions. In the General Tab, it lists four columns: File name, Location, Space Allocated, File Group.
The string in the File name column has a value such as MY_DATABASE_DAT, whereas the Location column has a value like D:mssql7dataMY_DATABASE.MDF.
The Location value is clearly the Windows file name. The "File name" (which I have seen called the "logical file") is a mystery to me. What is it used for? How can it be changed? Is there a problem if two different databases have the same "logical file" name?
(For example, if you do sp_detach_db, copy the file to another place and then sp_attach_db the new file to another database name, you have two different databases with the same "logical file" name.)
Much thanks to anyone who can shed light on this.

View 1 Replies


ADVERTISEMENT

Same Logical File Name For Two DB.

Jul 5, 2000

Hi everyone,
I have a database (xyz) one Machine A. On the same machine I want to create a copy of the (xyz)database with different name(xyz_1). When I restore with move option it will restore but the thing is logical file names of xyz and xyz_1 are same. I know I can change these file names by manupulating the system table.
My question is If I didn't change the logical file names of database xyz_1(new). Is there any problems or issues may arise.

Thank you,

Dindu.

View 1 Replies View Related

How To Change Logical File Name

Jan 18, 2000

I cannot find the answer to this: how do you update the logical file name for a database? Restore database "Alpha" over "Beta" specifying WITH MOVE parms allows "Alpha"'s physical files to overlay "Beta"'s, but now "Beta"'s logical file names are "Alpha_Data" and "Alpha_Log".

Updating sysfiles directly gives back a 270; "Get outta here!"

Can this not be done?

View 2 Replies View Related

Databases- Same Logical File Name

Apr 24, 2000

Hi
Every one
One thing i found out that my 2 databases in server A
Has same logical file name .
I have try to change the name but it is not allowing me to change.
I had refer BOL it says that we should have unique logical file name in a server for each database.
Question i have is does it going harm me i don't know this
if any one u know please suggest me.
Problem I already started getting is I do backup 5 small databases of 10 to 20 mb in one tape only. The 2 database which has same logical file name out
of which one is getting copied & another is not ,All other database it backup
perfecly.
But at the same time in a hard disk if i take backup of this database in a same device it works perfecly so i don't understand where the problem is
If any has any idea please suggest me
Thanks
Nirmal.

View 1 Replies View Related

Renaming Logical File Name

Mar 14, 2003

I'm moving a database (XYZtest) from the test server to the production server via sp_detach/sp_attach. I want the logical file names to be XYZ_data, rather than XYZtest_data, etc. I can easily rename the disk files, but how do I rename the logical file names?

Thanks,

Al

View 1 Replies View Related

Logical File Names

Apr 24, 2002

Hi,
Does anyone know how to change the logical file name of a database?

Appreciate any help.

Steve

View 1 Replies View Related

Change Logical Name Of Db And Log File

Jul 20, 2005

Hi,Is there an option (stored procedure) or whatever to change to logical nameof the databasefile and the database log file ?Arno de Jong, The Netherlands.

View 1 Replies View Related

Renaming A Logical Database File

Mar 9, 2000

Is there a way to rename the logical file for a database. For example, if I am moving a development database into production, I can use backup - but the backup takes the logical file names of the database and puts it into my production server. Now I have a production database with "dev_data1" for a logical file.....Can I change that name....?

Thanks!

Dean

View 3 Replies View Related

Indexes On Seperate Logical File...

Sep 22, 2000

Hi all -

Quick question... I want to move all my non-clustered indexes to their own seperate drive array. How would I accomplish this?

Do I just add the filename at the end of the statement like you do in Oracle? (EXAMPLE: CREATE INDEX IDX_Cls_Code on dbo.Class(Code) on secondary.ndf)

If this isn't correct, can someone please post the correct syntax?

Thanks!

Rich

View 1 Replies View Related

Renaming Logical File Names

Jul 23, 2005

Is there a way to rename the logical file names? I'm not talkingspecifically about the physical files, because those can be changedduring a restore, but the values immediately to the left of those inEnterprise Manager such as DBName_Data and DBName_log. EnterpriseManager lets me change them during a restore, but when I do it gives anerror. Any ideas?

View 1 Replies View Related

Cannot Shrink Log File 2 (ABC_Log) Because All Logical Log Files Are In Use....

Nov 6, 2003

A small database ABC with data only 5 mb but its log is growing everyday around 20 mb. I want to shrink its size like for other databases on daily bases.

1. backup log ABC with truncate_only
2. DBCC SHRINKDATABASE (ABC, 10)
got following error:
<<Cannot shrink log file 2 (ABC_Log) because all logical log files are in use.>>

with no_log also tried but have the same error when dbcc shrinkdatabase..
any idea?

thanks
-D

View 8 Replies View Related

Restore SQL DB With Correct Logical File Names

Feb 20, 2007

Hi,I am planning to automate a nighty restore of a DB on another servercan someone point me in the right direction with the SQL script tomodify the logical file names to the correct path and not the onescarried over with the DB??i.e the database is to be renamed on the new serverany help much appreciatedMany thanks in advance

View 14 Replies View Related

SQL Server 2008 :: Renaming Logical File Names

Apr 30, 2015

Is there any danger with renaming the LOGICAL file names behind the database?

There are a bunch of databases that were restored copies and all of them have the same logical database file name. I'm trying to get some growth data so I want the logical files to be different (prefer them to match the actual database name) so I can more easily identify them.

For instance:

database_id name type_desc name physical_name
1 DLMdb1 ROWS DLMDB1 D:dlmdb1.mdf
1 DLMdb1 LOG DLMDB1_log E:dlmdb1.ldf
2 DLMdb2 ROWS DLMDB1 D:dlmdb2.mdf
2 DLMdb2 LOG DLMDB1_log E:dlmdb2.ldf
3 DLMdb3 ROWS DLMDB1 D:dlmdb3.mdf
3 DLMdb3 LOG DLMDB1_log E:dlmdb3.ldf

Am I safe to rename the logical names? I can't think of anything that references those logical file names that I would be breaking [backups, applications].

View 3 Replies View Related

Difference Between Backing Up To A File And A Logical Backup Device?

Jun 16, 2007

What's is the between backing up a database to a file and a logical backup device?



If I point the logical backup device to a file on the filesystem, it's same as backing up to a file? isn't?



Thanks

View 1 Replies View Related

SQL Server 2008 :: Logical And Physical File Names Of All Databases

Apr 3, 2011

Is there a query or sp that I can pull all databases on the server along with their logical file names and physical file names?

View 5 Replies View Related

Logical Name

Feb 13, 2008

Hi all

We generally modify the logical name of a data file or log file from the vendor defined to our standard name. Is there any impact that you know about this? If you have 2 seperate database and accidently you have 2 same logical name .. I dont' think that will be an issue ... correct?

ALTER DATABASE XXX_UAT
MODIFY FILE (NAME = 'mdd_Data', NEWNAME = 'XXX_UAT_Data')
GO

ALTER DATABASE XXX_UAT
MODIFY FILE (NAME = 'mdd_Log', NEWNAME = 'XXX_UAT_Log')
GO

View 1 Replies View Related

Logical Name

Jul 17, 2007

Hi,I want to change the logical name of the database. My database name and.MDF has the same name, but the logical name is different. Willchanging it impact anything?--sharif

View 1 Replies View Related

SQL Select And Logical OR

May 21, 2008

I have a query. on my search page i have a number of textboxes e.g. title, subtitle, ISBN where users can enter a search string and when they click on a button the data is displayed in the gridview below.
my query seems to be bringing up the right records but with some additional records into the gridview. I have tried the same query within the SQL server management studio and it brings back two records like indicated but within my aspx page it brings back 6 additional records that have no relevance to the query. Im quite baffled as to why this is happening and i have debugged but nothing comes to light.
my code in my aspx page is as follows:
public void BindData(){String _BookID = TxtBookID.Text;String _Title = TxtTitle.Text;String _Subtitle = TxtSubtitle.Text;String _ISBN = TxtISBN.Text;String AuthorFName = TxtForename.Text;String AuthorLName = TxtSurname.Text;
SqlDataAdapter ad = new SqlDataAdapter("SELECT Book_ID, Book_ID_Internal AS [Book Internal ID], Title, Subtitle, ISBN, Edition, Publication_Date AS [Published Date] FROM Book WHERE Book_ID_Internal = '" + _BookID + "' OR Title = '" + _Title + "' OR Subtitle = '" + _Subtitle + "'", conn);DataSet ds = new DataSet();ad.Fill(ds, "Book");if (ds.Tables[0].Rows.Count == 0){//if there are no rows returned-state in the gridds.Tables[0].Rows.Add(ds.Tables[0].NewRow());GridView1.DataSource = ds;GridView1.DataBind();int columncount = GridView1.Rows[0].Cells.Count;GridView1.Rows[0].Cells.Clear();GridView1.Rows[0].Cells.Add(new TableCell());GridView1.Rows[0].Cells[0].ColumnSpan = columncount;GridView1.Rows[0].Cells[0].Font.Italic = true;GridView1.Rows[0].Cells[0].Text = "No Records Found";}else{GridView1.DataSource = ds;GridView1.DataBind();}}
if i input the same query into SQL management studio:
SELECT * FROM Book WHERE Book_ID_Internal = 'ITD 450' OR Title = 'HTML 4.0'
it returns two records which is correct.
Can anyone see where i am going wrong?
 

View 4 Replies View Related

Logical Filename

Jun 19, 2002

Hello,

Is there any way to change the logical filename of exsiting database

Thanks
Lara

View 1 Replies View Related

Logical Records

May 4, 2007

The organisation I'm working for has SQL Server 2005 merge replication up and running on 11 servers in 3 different countries.



Ocasionally we experience problems caused by rows in a logical record relationship being replicated between servers in the wrong order, i.e. an attempt is made to insert child rows before the parent. I am not able to reproduce this behaviour on my test servers.



Has anyone else experienced this problem?

View 16 Replies View Related

SQL On Logical Fields

Jun 28, 2007

We have a progress database that we use RS on. The "status" field (active/inactive) is a logical field (true/false). When doing the SQL how do I specify that I want only active records (value = true).

View 1 Replies View Related

How To Rename Logical Name For Transaction Log ?

Apr 4, 2001

How to rename logical name for transaction log ?
thanks

View 2 Replies View Related

Altering Logical Filenames

Oct 24, 2001

Pros,

I would like to change the logical filenames for a database on my test server. I know this is done with ALTER DATABASE, but I'm not sure of the exact syntax. Can anyone help?

rb

View 3 Replies View Related

Logical IO And Performance Monitor

Mar 29, 2000

Hi All,

I've been asked to trouble shoot an installation where many stored procedures are performing poorly. Upon examination I've found that the queries in these procs consume a large volume of logical IO (table scans etc). I'm trying to show that this could cause poor performance of the stored procedures as well as degredation of the server as a whole - but I cant find any suitable counters in Perfmon.

Anyone help?

Jim

View 1 Replies View Related

BACK UP DEVICE LOGICAL NAME

Sep 5, 2001

Is there any SYSTABLE or table from where I can get the backup device logical name.

Thanks,


-Rajesh

View 1 Replies View Related

A Logical Puzzle Answer Me, Is It Possible To Get

Nov 30, 2005

I have a view based on few tables okay
I have a query that gives me document details of various revisions
Now i also get the latest rev of those if i use a MAX() in my Query

Now a case where i have say

Docu Numb - Revi - Received Date

Document1 - rev0 - 10/2004
Document1 - rev1 - 11/2004
Document1 - rev2 - 12/2004
Document1 - rev3 - 01/2005
Document1 - rev4 - 02/2005
Document1 - rev5 - 03/2005
Document1 - rev6 - 04/2005
Document1 - rev7 - 05/2005


If i query for latest it gives Document1 - rev7

And if i filter for a month of 12/2004
If i query for latest it should give Document1 - rev2

Now i need to get a filter with latest as rev2,
plus i also need as a indication of actual latest as rev 7
using a query

How do i do that ...

Coz when i use filter for a month and Max then it
does not consider rev7 for that filter and skip the record
and if i try to filter only as per month .. i get a wrong info
as latest rev2 which is not a true info as per database records.


May i possibly get both ... filtered info as per specific month and
also a rev info as what is the latest for a spec document.

Just i need to know is that possible .. in SQl using a query

Any more info needed please mail me on
neeraj.jariwala@gmail.com


Life is beautiful ... When you smile ...

View 1 Replies View Related

Logical Page Errors

Jan 18, 2007

Hi,

we consistently have logical page errors on one of our SQL Servers.
The output from CHECKDB is shown below. Any ideas why this keeps happening. We recently replaced the disk thinking this would solve the problem.

DBCC results for 'TMP_tbl_Pay_Totals'.
Server: Msg 2533, Level 16, State 1, Line 1
Table error: Page (1:391469) allocated to object ID 1412968160, index ID 0 was not seen. Page may be invalid or have incorrect object ID information in its header.

AND later on

Server: Msg 2533, Level 16, State 1, Line 1
Table error: Page (1:398376) allocated to object ID 1412968160, index ID 0 was not seen. Page may be invalid or have incorrect object ID information in its header.
Server: Msg 2533, Level 16, State 1, Line 1
Table error: Page (1:398377) allocated to object ID 1412968160, index ID 0 was not seen. Page may be invalid or have incorrect object ID information in its header.
Server: Msg 2533, Level 16, State 1, Line 1
Table error: Page (1:398378) allocated to object ID 1412968160, index ID 0 was not seen. Page may be invalid or have incorrect object ID information in its header.
Server: Msg 2533, Level 16, State 1, Line 1
Table error: Page (1:398379) allocated to object ID 1412968160, index ID 0 was not seen. Page may be invalid or have incorrect object ID information in its header.
Server: Msg 2533, Level 16, State 1, Line 1
Table error: Page (1:398448) allocated to object ID 1412968160, index ID 0 was not seen. Page may be invalid or have incorrect object ID information in its header.
Server: Msg 2533, Level 16, State 1, Line 1
Table error: Page (1:398449) allocated to object ID 1412968160, index ID 0 was not seen. Page may be invalid or have incorrect object ID information in its header.
Server: Msg 2533, Level 16, State 1, Line 1
Table error: Page (1:398450) allocated to object ID 1412968160, index ID 0 was not seen. Page may be invalid or have incorrect object ID information in its header.
Server: Msg 2533, Level 16, State 1, Line 1
Table error: Page (1:398451) allocated to object ID 1412968160, index ID 0 was not seen. Page may be invalid or have incorrect object ID information in its header.
Server: Msg 2533, Level 16, State 1, Line 1
Table error: Page (1:398452) allocated to object ID 1412968160, index ID 0 was not seen. Page may be invalid or have incorrect object ID information in its header.
Server: Msg 2533, Level 16, State 1, Line 1

Final bit

CHECKDB found 0 allocation errors and 11 consistency errors in database 'ISS'.
repair_allow_data_loss is the minimum repair level for the errors found by DBCC CHECKDB (ISS ).

Any help or ideas much appreciated.

View 4 Replies View Related

******How To Select Logical Database Name*********

Jul 31, 2007

Hi how do I select the current logical database name using a select statement.

View 8 Replies View Related

Logical Scan Fragmentation

Aug 16, 2007

I have a table with 50% Logical Scan Fragmentation. [ according to Dbcc Showcontig (myTable) ]
Why after running DBCC INDEXDEFRAG (myDB,myTable) does it still sit at 50%.
Why isn't it lower?

View 7 Replies View Related

Change Logical Name In Script

Aug 9, 2006

I'm trying to restore about 70 databases onto a new SQL server andwanted to script the creation and restore. I've done the creation withno problems, but on the restore, the logical names (of the originaldata) are all over the place and were historically wrong.So, when I use the script below... I've had to work out the Logicalname for the data and the log file and alter the script accordingly.Creation------------Create Database MyDatabase ON (NAME = MyDatabase_data, FileName ='D:DatabaseMSSQLDataMyDatabase.mdf') LOG ON (NAME = MyDatabase_log,FileName = 'D:DatabaseMSSQLDataMyDatabase.ldf') COLLATESQL_Latin1_General_CP1_CI_ASRestore-----------RESTORE FILELISTONLYfrom disk ='D:DatabaseMSSQLBACKUP2006-08-07MyDatabase_db_200608072100.BAK'restore database MyDatabasefrom disk ='D:DatabaseMSSQLBACKUP2006-08-07MyDatabase_db_200608072100.BAK'with REPLACE,MOVE 'SomeOtherRubbish_Data' TO'D:DatabaseMSSQLDataMyDatabase.mdf',MOVE 'SomeOtherRubbish_Log' TO'D:DatabaseMSSQLDataMyDatabase.ldf'goWhen I then look at the properties of the database, it shows the oldconvention which I don't want.So, even though I've been neat creating the database, it getsoverwritten with the odl rubbish name. How can I change the logicalname so that I can have a nice and neat naming convention ?Oh, Yes I know I added the collation when creating the database, butthat's another thing that we need to address at some point.Thanks in advance

View 2 Replies View Related

How To Write Logical SQL Query ?

Sep 5, 2007

Hi Friends,

I have three tabels A,B,C having relation of primery & forign key, and i want to fetch data from all three.
In case if only A have the values and B & C dont have values, then also i want values.
But my simple sql statement dose not show any data, if B & C dont have values.

Any one tell me that how to fetch data from this type of Situation???????

pls

Thanks,
gs

View 3 Replies View Related

What Is Logical And Physical Database Design

May 19, 2008

hi we are in the process of developing a project and we r at the initial phase i.e. at the analysis phase and we have been discusssing on what is physical and logical database design. can any body send any links or articals on this will be hightly appreciated.

View 1 Replies View Related

Insert Trigger Logical Error

Apr 25, 2002

The many that I have spoken to all are clueless on this one. Thanks in advance for the right solution!

The insert trigger I created works fine (well, nearly fine), except that AFTER the first insert operation (ie second, third etc), it always produces the correct results BUT FOR THE PREVIOUS INSERTED ROW. It is as if there is a latency of one row in the temp table INSERTED.

I would greatly appreciate a 'why', and more importantly, a 'how to fix it' for this problem.

If you need to look at the code, a NOTEPAD file is attached.

Much appreciated

--start trigger--
create trigger UpdateAffiliateEarnings
on Orders
for insert, update
as

--declare variables
declare @ProductType varchar(15),
@AffID int,
@Earnings money,
@CurrentEarnings money,
@AffTotalEarnings money,
@AffTotalPayments money,
@AffOutstandingBalance money

--check existence of affiliateid, and for product type
select @AffID=AffID, @ProductType=Source
from Orders
where AffID IS NOT NULL

--get relevant information
if @AffID IS NOT NULL
begin
if @ProductType = 'FLOWER'
begin
select @Earnings=CONVERT(money,ChargedAmount*CommissionRa te)
from Orders o,FlowerOrder t,Commission c
where o.OrderID = t.OrderID
and t.CommissionID = c.CommissionID
and PaymentConfirmedYN='YES'
end
if @ProductType='PHONE'
begin
select @Earnings=CONVERT(money,ChargedAmount*CommissionRa te)
from Orders o,PhoneOrder t,Commission c
where o.OrderID = t.OrderID
and t.CommissionID = c.CommissionID
and PaymentConfirmedYN='YES'
end


--update Affiliate account
--get totals to update
select @CurrentEarnings=AffTotalEarnings, @AffTotalPayments=AffTotalPayments
from Affiliates
where AffID=@AffID

--calculate new totals for affiliate account
set @AffTotalEarnings=@CurrentEarnings+@Earnings
set @AffOutstandingBalance=@AffTotalEarnings-@AffTotalPayments

--update affiliate account to new totals
update Affiliates
set AffTotalEarnings=@AffTotalEarnings, AffOutstandingBalance=@AffOutstandingBalance
where AffID=@AffID

--roll back the transaction if there is an error
if @@ERROR !=0
rollback tran
end
-- end of trigger --

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved