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


ADVERTISEMENT

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

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

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

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

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

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

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

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

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

Integration Services :: Move Multiple Files Based On File Names Listed In A Spreadsheet / File?

May 27, 2015

I need to move specific files from a server to another server on a monthly basis.  There are hundreds of files that are in the source directory and I need to move approximately 40 of those to the destination server.  I would like to easily add or delete the file list as needed.  I have seen where several variables were created for for each file name (and one for the path) and the ForEach Loop would go through them.  With 40 or more I was thinking that I could make a connection to an Excel spreadsheet or text file with a record for each file name and read in and and move to the next record and make that value become the content of a "FileName" variable.  Then if I wanted to add another file name I could just add another record to spreadsheet/text file or remove and the package would handle automatically....

View 10 Replies View Related

How To: Variable File Names When Exporting A Report To A File Share

Jan 19, 2007

I'm exporting reports daily to a file share and I need to rename the reports with a pseudo time stamp.

Example: I have a report named "Disk Usage" and when I export (using a data-driven subscription) I want to rename it "Disk Usage - (Jan07)" - or something to that effect.

Can anybody tell me how to accomplish this.

View 1 Replies View Related

.mdf And .LDF File Names

Jan 2, 2008

Hi All,

I am using query analyzer to execute my sqls .

I want to take out .mdf and .LDF files and put it in another machine .
But there is no .mdf or .LDF file with prefix as my database name . I think the file name might be something else .
Please help me in finding out the .mdf and .LDF of a particular database .

Thanks ,
Sushi

View 6 Replies View Related

Get File Names - How To Do This

Jan 2, 2008

Hi,

Every day I ftp a zip file. Inside the zip file are 4 text files. Every day the names of the 4 files are different, so I can't know beforehand what the names are.

I am wondering what is the best (most efficient) way for me to get the file names inside variables? Should I use a script task? Or is there another way to do this?

Thanks

View 3 Replies View Related

How To Search File Names? Help!

May 29, 2002

Hi ALL!
Our application needs to search for exact match of file names (which will be 70 characters in length) in a table which has thousands of file names in its file_name field. What is the best way to this? Shall we index the table on file_name column? Or any othe way, as the application will do this search several times all day. Any ideas are appreciated.
Thanks.
KSN.

View 1 Replies View Related

Backup File Names Truncating

Apr 18, 2002

I'm performing a full backup of a database, and the file name that I am creating for the backup is truncating. This keeps happening and can't figure out why.

I have a stored proc that I run:

CREATE PROC usp_Backup_old_srvra_to_srvrb

AS

DECLARE @DOW varchar(10),
@Filelocation varchar(50)


--Get Day of Week and set backup file name
SET @DOW = DATENAME(dw,GETDATE())
SET @FileLocation = 'SERVERAE$MSSQL7BACKUP'+ @DOW + '__old_BKUP_SRVR_0418_0800.bak'

BACKUP DATABASE TEST
TO DISK = @FileLocation
WITH INIT,
STATS
RETURN (0)


The backup file that was created ended up being:

THURSDAY__old_BKUP_SR

Any idea why it didn't pick up the whole file name that I wanted?

View 2 Replies View Related

Can DTS Import Varying File Names?

Oct 5, 2000

I receive several TXT files daily that need to update information in SQL Server databases. The process requires that all TXT files be appended to a master file and also update individual files' information based on the TXT file name. For example:

File TABLE1_x_ddmmyy.TXT (ddmmyy = date, x = "O" or "B") is to be appended to the master file and also update SQL table "TABLE1" by setting a flag for those records in the table that match a unique key that is provided in the TABLE1.TXT file.

In VFP, I had the following process in place:
a) open the TXT file.
b) read its file name and open the corresponding VFP file
c) update the VFP file based on the key provided in TXT
d) append the key to the master file.
e) repeat c-d for next record in TXT
f) repeat c-e for next TXT file

Using the same process with ADO takes a considerable time since I am processing one line at a time.

Is there any way to do this using a DTS package of some sort? How can I read the TXT file names in SQL Server?

Thank you.

View 3 Replies View Related

File Names With Rowcounts Using DOS Command

Mar 26, 2015

I have below requirement and it needs to be addressed using sql.

There are 18 text files(file names are dynamic) and each file having different row counts in some “xyz” folder.

Here, I need to generate 19th text file which has the list of file names with row counts.

I am planning to import all of the text files into database and trying to generate 19th one.

View 1 Replies View Related

Working With Dynamic File Names

Jul 28, 2006

I am working with an ftp task which is using a file connection to send a file to a remote server. This file is going to have a dynamic name (e.g. "Orders for 2006-07-29.txt"). How can I dynamically specify the file path/name for the file connection? You can't specify a varaible through the ui.

I would imagine that you can do this through a script task but I'm not sure how to reference the connection object. any help would be greatly appreciated.

thanks,

Scott

View 3 Replies View Related

Restore Database To Different File Names

May 9, 2008

Hi SQL server experts,
I'm trying to restore from a backup file.
I need to restore the datafile and logfile to different names.
I modified the options page, changed the 'Restored As' file name.
I clicked on the General page and Clicked on the Options page again, the old values came back.
How do I handle this?
Thanks in advance.
Pingx

View 3 Replies View Related

Save Input Flat File Names.

Feb 19, 2008

Background:


I am new to SSIS.

I have a data flow task within a For Each Loop Container.

Its reading a Demilited Flat File and inserting into a DB table.
The Flat File Source reads a specified folder and picks up all files with extension .txt

Question:

How can I record and save the file names the package picks up and loads it in ?

For eg:
If I have under C:Test folder
File1.txt
File2.txt
File3.txt

And the package picks up all the files above and loads them in, is it possible to read the file name its processing ?
I have a need to read these file names ( in this example File1,File2,File3 ) and store them in a DB table.

Appreciate your help.
Thanks in advance.
AkB

View 4 Replies View Related

.dbf File Import (duplicate Field Names)

Mar 27, 2006

I am importing a file creating by an application which exports the file into .dbf format.  Very unfortunately, this .dbf file can have fields with IDENTICAL column_names.  Utilizing ActiveX, I create an ado connection to the .dbf file using a visual foxpro drver.  However, and not unexpectantly, I can not do the 'select *' from the file if there are duplicate names.

Can anyone make recommendations here that might help?

Oh, this is SQL200 in case that impacts what you might advise!!!!

View 2 Replies View Related

SSIS Runs Out Of Temp File Names

Apr 24, 2007

Hi,



A collegue of mine is having some issues. I hope someone can help
















Hi all,

This is my first call for technical assistance so go easy on me.

I'm having a problem in one of my SSIS packages. In brief, the process involves copying the rows from an untyped table to a typed table. There are about 45,000 rows in this table and during the copy ("OLE DB source" to "OLE DB destination") the process appears to hang for about 5 minutes eventually crashing with a "The buffer manager could not get a temporary file name. The call to GetTempFileName failed."

After several attempts using all the trace info I could master this is the order of events with some interesting numbers and facts:

1. The SSIS package goes swifty through "Validation", "Prepare for Execution" and "Execution" in less than 1 second, with "Execute phase is beginning" being the last message on the "Progress tab".

2. Using Performance counters I note that in the next 5 mins the values for "BLOB bytes read" slowly rises and then after a couple of mins so does ""BLOB files in use" the latter reaching a figure of 65534

3. When this figure is reached, SSIS starts creating thousands of zero-size files with the name DTS####.tmp (where #### is hex e.g. DTSB4C1.TMP) in the TEMP folder (C:Documents and Settings<username>Local SettingsTemp in my case).

4. When I started running this package there were 130 files in my TEMP folder; As soon as the combined total of files in TEMP reaches 65664 (i.e. 65534+130), SSIS starts producing the errors list which includes the one I listed above and eventually it clears the TEMP folder down to the original 130 files.

5. My conclusion (thus far) is that SSIS creates all these 1000s of tmp files but in my case hits some kind of maximum (either a folder limit or runs out of hex combinations for the file names) and then crashes.

6. The only thread I found on the internet suggested setting up an environment variable "BLOBTempStoragePath" and assigning a value of "C:Temp1;C:Temp2;C:Temp3;C:Temp4" so that SSIS can span across a number of "temporary" folders instead of the 1 default folder contained in the "TEMP" environment variable.

7. Setting the above environment variable in Windows 2000 did not work for me (tried it as both a user variable and a system environment variable). So here are the facts so far - ANY assistance will be hugely appreciated - I have no idea why all these temporary files are being generated - I have created SSIS packages handling data sets 10 times bigger than this one without these problems so I don't think it's size related.

View 3 Replies View Related

Use Of Brackets (parenthesis) In File / Folder Names In Windows

Mar 19, 2008

Hi,
On x64 versions of Windows server 2003, there is a folder called "Program Files (x86)". The use of parenthesis in this name has caused a few issues so far, particularly with connecting SQL Server 2005 to Oracle using SSIS. After several hours of searching I realized that the parenthesis was causing it, and eventually I found that the best way is to avoid creating such a name while installing the OS itself, by using winnt.sif. This would be better than renaming it and changing registry entries after the installation is done.

I realize this may not be the best question to ask of Microsoft, but why not just call it "Program Filesx86" by default so no special procedure has to be done to get around these issues? The use of parenthesis is likely to cause even more compatibility issues with other software later?

BTW I use Microsoft products regularly and love most of them

View 8 Replies View Related

Flat Files Having Only Column Names In One File And The Rows In The Other

Jun 11, 2007

Sorry if this question had already been answered previously. I was unable search the forum on this topic. How will I merge these and then configure the first row as Column names (As this helps to map to the destination column names automatically)

View 3 Replies View Related

Dynamic File Names For Raw Files Created By Conditional Expressions

Feb 26, 2007

Hello,

I have a huge table of around 6.2 billion rows in Oracle and I need to load this table to SQL Server. I am creating multiple raw files based on contact_dates in the table. I have used conditional expressions to branch out and create raw files. I need to specify static file names for each branch or I have to create multiple variables for each branch and use expressions to create file names.

My intention is to create only 1 variable and evaluate the expression based on the conditional expression description. Is this possible?

Regards

RH




View 4 Replies View Related

Exporting A Table With Changing Column Names To An Excel File

Oct 25, 2006

I'm trying to write an SSIS package that exports a table that has changing column names to an excel file. The column names change due to the fact that the table is created by a pivot daily. the only thing I'm missing is the ability to dynamically map the tables' columns to the excel destination. Is this possible?

I read in another thread that
"It is not possible to create packages or new objects within packages using SSIS."
I also read in the books online that "The input and the input columns of the Excel destination have no custom
properties." To me this means that I cannot programmatically create or remove columns in the excel destination. Please tell me I'm wrong.
So, to summarize my research so far. In writing an SSIS package, I cannot programmatically create a new excel destination object and I can't manipulate an existing one. I hope I'm wrong. Can anyone help me? (and please correct any wrong assumptions I may have stated)

View 2 Replies View Related







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