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


ADVERTISEMENT

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

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

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

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

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

SQL Server 2008 :: How To Update The Database Physical File Location In Master Database

Mar 8, 2015

I had to to relocate the database log file and I issued an Alter database command but by mistake I put a space in the file name as below. The space is at the beginning file name. Now I am unable get the database loaded to SQL Server. The database has 2 replications configured, so deleting and re-attaching the database means the replication needs to be re-configured. Is there an alternative way to issue a command to update the database FILENAME ? Not sure if this can be edited in master database (sys files).

ALTER DATABASE [User_DB]
MODIFY FILE (NAME = User_DB_log, FILENAME = 'I:SQLLogs User_DB_log.ldf')
GO

View 1 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

Difference In Logical And Physical DB Schemas

Sep 12, 2005

What is the difference between the logical database schema and the physical database schema?

Thanks!

View 4 Replies View Related

Physical Vs. Logical Disk Queue Length

Jun 16, 2003

Does anyone have any recommendation on whether it's better to monitor the average queue lenght for physical or logical drives? What about for a RAID set?

Just wondering,

thanks

View 6 Replies View Related

Is There A Way To Change Logical And Physical Datebase Filenames?

Aug 23, 2006

A database was set up as a test database and then the database name changed but the logical and physical filenames still have test in their name - obviously not a good idea. I have tried to change the physical file name but get the error message that the physical file name cannot be changed once the database has been created. I have also tried detaching the database and renaming the mdf and ldf files but these could not be re-attached so had to revert back to the original names.

View 2 Replies View Related

SQL 2012 :: Difference Between Logical And Physical Join?

Jul 9, 2014

What is the difference between Logical Join and Physical Join and there Types?

View 6 Replies View Related

Analysis :: Cube Extracting Data From Physical Or Logical Star Schema?

Oct 22, 2015

We have an OLTP database and operational reporting is carried out on a replica server / database. We have plans to build a new data warehouse and an analysis services cube.

Question 1:Should a cube be designed to extract data from a physical star schema rather than a logical one (3NF relational (ODS?) using a data source view to derive the star)? I'm guessing for performance it's better to pull data from similar structures (physical facts and dimensions as required by analysis services) but is the difference significant?

Question 2:Depending on the answer to q1, is it bad practice to ETL data from a staging database (replica > staging) directly to a star schema (multiple data sources and cleansing / business rules required)? Or should it be processed from staging to an ods and only then to a star schema (physical or logical). I still don't know if an ODS is required but I guess the consideration for this decision is whether the business would require  daily operational (or ad hoc) reporting on the consolidated data sources (without needing historical DW functionality).

View 2 Replies View Related

Transferring 3 Databases From Both Express 2005 And Standard To New Physical Server

Mar 25, 2015

I am trying to figure out the best method for transferring SQL 2005 databases from 2 different physical servers to a new server running windows server 2008 64bit.I own a fully registered copy of Microsoft SQL 2005 32bit Standard Edition. However all of my SQL databases together are only 4GB in size thereby making 2008 SQL Express an option.

Here is the breakdown of the servers:

1) (Old Server1) Windows 2003 Server 32bit - SQL Express 2005 32bit
2) (Old Server2) Windows 2003 Server 32bit - SQL Server 2005 32bit Standard
3) (New Server) Windows 2008 Server 64bit - (Not sure which version to install)

**The objective is to migrate 2 SQL databases from Old Server1 and 1 SQL database from Old Server 2 to the New Server. What version should I install on the new server??? Do I go with 2008 express or install the 2005 Standard Edition?

Pending your response to which version to install, what are the correct steps to migrate (which I have never done before) the databases from both of these servers to the new server? I think this particular situation is unique in that I am transferring from both SQL Express and Standard from 2 different physical servers to a 2008 server that is 64bit.

View 3 Replies View Related

SQL Server 2008 :: Error Renaming Logical Filename

Feb 27, 2015

I have a SQL Server 2008 R2 Cluster. I have moved a file to another drive by adding a new file on the drive, doing a shrinkfile with emptyfile. I have removed the old file and when I try to rename the new file to the old files old name, I get an error.

ALTER DATABASE mydb REMOVE FILE myfilename
Msg 5009, Level 16, State 9, Line 1
One or more files listed in the statement could not be found or could not be initialized.

ALTER DATABASE mydb
modify FILE ( NAME = temp_filename
, NEWNAME = myfilename
)
Msg 1828, Level 16, State 3, Line 4

The logical file name "myfilename" is already in use. Choose a different name.

I have completed a failover, thinking the name was being held in cache. I've also renamed to something completely different then tried to rename to the old filename.

View 9 Replies View Related

How To Get The List Of Names Of The Databases Of A Server Using OleDbConnection In C#.......?

Mar 13, 2008

I want to get the names of the databases of the server using OleDbConnection in c# which i have to add in to a combobox.....the same task i achieved using SqlConnection where in there is a Class SqlClientCollectionNames...the code is as followsusing (SqlConnection connection =new SqlConnection("Data Source=server;User ID=username;Password=passwd")) {                connection.Open();                DataTable myData = connection.GetSchema(SqlClientMetaDataCollectionNames.Databases);                foreach (DataRow row in myData.Rows)                   comboBox1.Items.Add(row[0]);               connection.Close();}   but the same i did for OleDbConnection it is not working using (OleDbConnection connection =new OleDbConnection("Provider=SQLOLEDB;Data Source=server;User ID=username;Password=passwd"))
 {
                connection.Open();
                DataTable myData = connection.GetSchema(SqlClientMetaDataCollectionNames.Databases);//no such method Databases  present in OleDb namespace
                               foreach (DataRow row in myData.Rows)
                   comboBox1.Items.Add(row[0]);
               connection.Close();
}    is there any other way to do this using OleDbConnection........??Please help 

View 2 Replies View Related

Transact SQL :: How To Get All Databases Names With Its Owners In Server Instance

Jul 23, 2013

I want to get all databases with it's owner Name ,I think I need to join following script result with sys.databases or sys.sysdatabases.I want a result set  like this:

DatabaseName    db_Owner

master                  sa
pubs                     valia
pubs                     eli
pubs                    maryam
AdentureWork      eli

this script get all owners of the database that is in use:

Use DatabaseName
GO

SELECT  members.name MemberName, roles.name RoleName,roles.type_desc,members.type_desc

View 10 Replies View Related

Logical Modeling Vs Physical Modeling

Nov 5, 2006

Can someone please explain this statement: At the logical level where there can be any number of entities in a relationship while physically you define relationships between two tables.

thx,

Kat

View 1 Replies View Related

SQL Server 2008 :: Search Any Of Two Names From String

Jun 20, 2015

DECLARE @search VARCHAR(10);
SET @search = 'dog,COW';
WITH T(C)
AS
(
SELECT 'Cat,Dog,Sparrow,Trout,Cow,Seahorse'
UNION ALL
SELECT 'Cat,Dog,Sparrow,Trout,Cow,Seahorse'
)
SELECT *
FROM T
WHERE C LIKE '%' + @search + '%'

I have a string in a cell 'Cat,Dog,Sparrow,Trout,Cow,Seahorse'

I want to search any of the two names from the string.

Search string:'cat,cow'
Result:no result (not working),[size="7"][/size]
Search string:'cat,dog'
result :given string(working fine )

View 2 Replies View Related

SQL Server 2008 :: XML Process To Read Element Names

Mar 9, 2015

I was given a 2 GB XML file without an XSD. I need to find the element names. I know how to do that using openxml but it takes forever on a file this large. Is there a faster way to do it using xquery?

View 0 Replies View Related

DB Engine :: Does It Affect Database Integrity Of 2 Databases Have Same Logical Name In Instance

Aug 13, 2015

In our production we have a database by name MyDb.The application team wanted another database by the name MyDbOld which contains the data of Mydb 1 month old. So I created a database MyDbOld in other instance(test) and restored MyDbOld from the one month backup of MyDb in production server. In test instance I backed MyDbOld as MyDbOld.bak...

In the production instance I created a new DB by the name MyDbOld and restored the MyDbOld in the production from the backup of MyDbold.bak in the test instance. Now I have 2 databases in the production instance ie MyDb and 2)MyDbOld. However I find the logical names of both the databases to be the same although the database name and the physical file name to be different.My questions are-:

1) Does it in any manner affect the integrity of the 2 databases if the 2 databases are in the same instance and have the same logical name?
2) Would the dml or data retrieval operations in the 2 databases have any conflict in any manner what so ever?
3) Having a unique database name, and unique file names for the physical files for any database in an instance what is the purpose and significance of additionally having a logical name for a database?
4) Which I could restore a database from the backup of another database in the same instance and at the same time change the logical and physical name of the files to correspond to the new database.

View 3 Replies View Related

.mdf File In Virtual Directory And Physical Folder, Which One Should I Attach To Sql Server Management Studio Express

Jun 26, 2007

I have a an asp.net application running under IIS. this application is using two folders, the virtual directory under C:Inetpubwwwroot and the application phisical folder at C:.
I want to manage this applications .mdf database using microsoft sql server management studio express(iam running sql express with advanced services) which means i have to attach the database to Ms sql server managemet studio express tool.
What i dont know is if i should attach the .mdf file in the physical folder's App_Data folder at C:myapplicationFolderApp_data or the .mdf file in the virtual directory under C:InetpubwwwrootMyapplicationFolderApp_Data
I dont know which of the two i should attach. Where exactly is the running database, the .mdf file in the physical folder or the .mdf file in the virtual directory under wwwroot.

View 3 Replies View Related

SQL Server 2008 :: Query To Looking For Cases Of Period Difference In Legal Names

Jun 9, 2015

How to write a Query for multiple legal names that have the same CARE Number (same address) with difference of one Legal Name having a period in the name versus the other legal name that doesn't.

For example: Looking for cases of two of the same legal name one set off by period

All Season Equipment Ltd.
All Season Equipment Ltd

West End Housing, Inc.
West End Housing, Inc

Wellings, Norman L.
Wellings, Norman L

North Texas Boats, LLC
North Texas Boats, L.L.C.

Oktibbeha County Cooperative (A.A.L.)
Oktibbeha County Cooperative (AAL)

S & R Turf & Irrigation Equipment, L.L.C
S & R Turf & Irrigation Equipment, L.L.C.

Burke Equipment Company; Burke Equipment-Seaford, Inc.; Newark Kubota, Inc.
Burke Equipment Company
Burke Equipment-Seaford, Inc.

Pleasant Valley Outdoor Power, L.L.C.
Pleasant Valley Outdoor Power, LLC

J & D Lawn and Tractor Sales, Inc.
J&D Lawn & Tractor Sales, Inc"

View 2 Replies View Related

SQL Server 2008 :: How To Delete Tables In Database Whose Table Names Match A Criteria

Jul 22, 2015

The database has approx. 2500 temporary tables. The temp tables match a pattern such as APTMP... I tried deleting the tables in SSMS with the statement, Delete from Information_Schema.tables where substring(table_name,1,5) = 'APTMP' This returns the error message"Ad hoc updates to system catalogs are not allowed".

What is the correct way to delete a group of tables whose name match a pattern from within SSMS?

View 9 Replies View Related

Cannot Attach Mdf: Create File Encountered Operating System Error 5 While Attempting To Open The Physical File...

Sep 5, 2006

I have used the copy database wizard, but I realized I had forgotten to shrink the transaction log file. So I canceled the wizard. My database, detached by the wizard, has now disappeared. The mdf file is still there, but when I try to attach it manually I get the "create file encountered operating system error 5 while attempting to open the physical file..." error.

Any way I can recover it?

Thanks.

View 4 Replies View Related

Dynamically Pass Table Names And File Names To IS Package

Mar 1, 2015

I am designing a package to export staging tables into a flat file.The names of the tables will be: TableAStaging_YYYYMM and TableBStaging_YYYYMM. As you can see the names of the tables will be changing each month.

The flat files will have similar naming: C:MyPathFlatFileTableAStaging__YYYYMM and C:MyPathFlatFileTableAStaging__YYYYMM.I want to run the package as an sql job in two steps, one for each table.I need to dynamically pass the table names and file names (together with the path) to the IS package.

View 1 Replies View Related

Unable To Open The Physical Mdf File Or Log File Because It Is Being Used By Another Process

Dec 4, 2007


Unable to open the physical mdf file or log file because it is being used by another process

I am trying to write a Windows Application using ASP.NET 2.0, C#2005 EXPRESS, and SQL 2005 EXPRESS.

I had followed the introductory video to create a connection to the Database using Windows Authentication, and use the wizard to create a dataset and checking all the tables in the database.

After that I dragged a table from the data source created from the above process. The Details Grid so created is able to perform update, delete and addition of records.

But when I went back to the database at my PC I wasnt able to connect to the database. And if I opened the database first and then load the windows application and perform some database operations and went back to the physical database I wasnt able to open the tables in the database.

The error message is that the physical database connection cannot open the .mdf file or log file because another process is using the database. I guess it refers to the Windows Application.

Is this normal? Will it have any implications after the application is deployed? I suppose that there isnt a scenario where a Windows application and a physical process will access the database at the same time.

Will appreciate some feedback and advice on this scenario and whether it is a problem.

Thanks and regards

OldStd

View 7 Replies View Related

SQL Server 2008 :: Grant Access To All Databases

Nov 18, 2010

I have around 600 databases in my server, a user need select access of all the databases. will i have to go one by one in all the dbs and create that user and give datareader role to him. or is thr any shorter way to do so????

View 8 Replies View Related

SQL Server 2008 :: Shrink System Databases

Apr 28, 2015

I have some questions :

1.Is it OK to shrink Master, model ? the transaction log for those databases are full .
2.Is it OK to set the Recovery model of Database MODEL as SIMPLE ? at the moment it is in FULL recovery model and the transaction log is Full too

View 1 Replies View Related

SQL Server 2008 :: Script To Find A Value In All Databases?

Aug 4, 2015

Script to find a value in all databases ? for example I want to find a value contain word “ SQL” in all databases so I will get the information in which database and which table it exists.

My script is only for finding a value in one database.

View 8 Replies View Related

SQL Server 2008 :: Enabling TDE On Databases Which Are Used For Log Shipping

Sep 15, 2015

I have log shipping enabled on databases(primary and secondary) and works fine. I need to implement TDE on the database. I have experience on implementing TDE on databases which are not used for log-shipping.

What are the steps needed to setup TDE which are involved with log-shipping.

View 0 Replies View Related

SQL Server 2008 :: How To Migrate Huge Databases

Sep 27, 2015

I would like to migrate around 15 databases in production server to the new production server. The biggest database is 80 GB .

Wondering is there any fastest way to do that with very low downtime ?

What I can think about is shrink databases files and perform attach – detach .

View 8 Replies View Related

SQL Server 2008 :: Paths Not Well Defined For Databases

Oct 29, 2015

What are the potential risks of keeping data , log , tempdb backups etc in the same drive although in different folders ?

View 4 Replies View Related







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