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
ADVERTISEMENT
Mar 27, 2015
If I run an ALTER DATABASE command that renames the Logical file name of a database, will I run into any unseen consequences in terms of day to day use of the database?
View 4 Replies
View Related
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
Jun 19, 2002
Hello,
Is there any way to change the logical filename of exsiting database
Thanks
Lara
View 1 Replies
View Related
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
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
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
Apr 10, 2001
Hello All,
I am facing problem with Logical File Name while restoring database. I am taking a backup of ABC database from Server1 in abc.bak file.
Then I am creating new database XYZ on Server2. Server1 and Server2 are not connected to each other in anyway, since both servers belong to different companies. Here on Server2 I want to restore backup of abc.bak on XYZ database. I select restore from Device, and on option tab I am selecting Force restore over existing database, in the below option I am specifying current Data & log file path for Move to physical file name.
But Logical file name shows ABC names, but if I tried to change those to XYZ names then restore fails. But if I keep ABC names then it works.
Is anybody knows how to over come this Logical Name issue?
Many thanks in advance….
Regards,
Santosh
View 1 Replies
View Related
Aug 12, 2015
Can two databases have same logical filenames in the same instance?
In my instance, database already exists say A.
I have to restore DB B with the same backup used for database A in the same instance.
So, once the database B is restored, A and B will have same logical fileNames.
Can I leave it as is? Or do i alter only after B is restored?
Or is there a way where I can change the logical file for B while restoring?
View 1 Replies
View Related
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
Sep 21, 2015
I'm working on creating a new version of an existing table. I want to keep the old table around, only with a different name. In looking this up I found there's a system routine named sp_rename, which looks like it will work fine.However in thinking about this I realized that the foreign key constraints defined on the table (there's 3 of them) are likely to not be renamed, correct?
If I'm correct, then I suppose I could rename the table, then drop the 3 foreign key constraints, and create them new using different names for those foreign key constraints.
View 5 Replies
View Related
Apr 19, 2008
Hi Champs,
Scenario Configuration : VB.net 2005 Code, WebService for Executing SSIS on Server, SSIS deployed on the Database Server
Problem Description : We are developing windows applicaiton in which we call webservice which was deployed on the same server where SSIS packages are deployed.
Now from Code we are passing FilePath name in variable and execute the Package. But the SSis result says that
The file name "\computernamefol1fol2fol3fol4abc.txt" specified in the connection was not valid.
More Information:
1. Full Permission are given on this network folder.
2. Package executes successfully from SSIS development solution (BIS solution)
3. Deployed packed executes successfully from the Database Server.
4. From Development pc packege executes successfully.
5. Other packages deployed on the same server executed suucessfully with same configuration and scenario.
Only this package is not executing.
-- the only differece with this package with other is -
using ".txt" extension in Flat file connection and using VB Script task
Can any one suggest the appropirate solution for this problem...
Thanks
Tarang Pandya
View 21 Replies
View Related
Mar 15, 2007
Did anyone familiar with these errors:
SQL Server detected a logical consistency-based I/O error: incorrect checksum (expected: 0x1a00d2fd; actual: 0x1a02d2fd). It occurred during a read of page (1:103329) in database ID 11 at offset 0x00000032742000 in file 'C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDATAServer02.mdf'. Additional messages in the SQL Server error log or system event log may provide more detail. This is a severe error condition that threatens database integrity and must be corrected immediately. Complete a full database c (Source: MSSQLServer, Error number: 824)
Get help: http://help/824
Thank you.
TJ_1
View 17 Replies
View Related
Sep 7, 2007
Doesn't appear you can do this.
Am I wrong?
Please tell me I am.
View 11 Replies
View Related
Jan 17, 2008
I renamed a table, and now whenever I try to insert data into the table I get this error:
Invalid object name 'dbo.OldTableName'.
For the life of me I can't find anything that uses the old name. There is a trigger and a couple indexes, but as far as I can see they all use the new name?
View 1 Replies
View Related
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
Jun 24, 2007
Hi,
I have encountered some strange output when testing an SSIS package I've been working on.
Please see this thread for background information: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1590716&SiteID=1. The previous thread was resolved and i have used the tips listed here to create a package with Data Flow Tasks that use expressions to create 'dynamic' queries.
The Data Flow tasks use two package-scope variables to determine the date range that they're operating on - this allows me to script the from / to dates (usually 'last week' range) or, in event of error, 'back date' the job easily without having to update each individual components.
However, something weird is happening - when I have two data flow tasks (DFT) in the same Sequence Container (tasks that are not 'connected' or configured to operate in a flow) only one DFT is picking up the package variable & returning the rows. The other DFT is not returning any rows & seems to be using the default value of the variables.
I have tested this by simply enabling DFT A and disabling DFT B - debugging shows only one DFT executes correctly. The same point is illustrated when I disable DFT A and enable DFT B. However, if I configure DFT A to run after DFT B then both pick up the correct variable values and return the correct row counts!!
I want Data Flow Tasks that pull data from the same remote source to be the same sequence containers so when an error occurs I can get container level transaction support.
Note:
I have thoroughly checked the 'evaluated' expressions in IDE and in Management Studio - this is an SSIS specific quirk (or me!).
Questions:
What's happening here, have I made a conceptual error of how this should work?
On the same variable topic: is there a way to set values for package level variables at execute time .e.g via command line execution / dtsexecui??
Let me know if you need any extra explaination / diagrams etc to understand this, the other (closed) thread I have listed above should provide more context for my problem
Thanks for your support!!
View 2 Replies
View Related
Aug 27, 2001
Any idea what this error is??
Thanks.
Attempt to fetch logical page (3:8360) in database 'XYZ' belongs to object '1934538212', not to object 'product'. [SQLSTATE HY000] (Error 605). The step failed.
View 1 Replies
View Related
Jun 24, 1999
We tried to restore an empty database from a backup and got:
'Load database encountered an invalid logical page number' error.
This then set the database as 'loading'
Anyone got any ideas?
We aren't exactly sure how big the first database was when the backup was done but if the new database isn't big enough to contain the backed up data, wouldn't we get a more meaningful error?
Janet
View 2 Replies
View Related
Apr 20, 2006
I am using VB with Visual Studio Express. I am new to these tools. I have SQL Server 2005 Express installed on my machine. I think that I have the right version. I am just using Express for taking classes and teaching myself on my machine.
When I follow the examples in the book, I keep getting this error when I go to my ASP.NET configuration and click on the security tab to add myself as a user.
"There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store. The following message may help in diagnosing the problem: The database filename can not contain the following 3 characters: [ (open square brace), ] (close square brace) and ' (single quote) " -- end of erro msg.
I have an apostrophe in my last name. Could that be what is causing it? Is it creating a db based on my name or something? Or do I have the wrong version of SQL Server Express installed.
Thank you for any help. I appreciate it.
--Mark
View 1 Replies
View Related
Mar 24, 2006
I want to do a bulk insert of a file located on a different machine then the SQL Server database.
machine1 and machine2 are running Windows Server 2003 Standard Edition. SQL Server v8.0 is running on machine2. Neither machine1 nor machine2 are in any domain. (These are servers at a hosting company.)
I use a UNC filename to specify the file to load. It looks something like this:
\machine1.someplace.com
eportdata
eport200602.txt
I get this error message when I attempt the bulk insert using SQL Query Analyzer:
Server: Msg 4861, Level 16, State 1, Line 1
Could not bulk insert because file '\machine1.someplace.com
eportdata
eport200602.txt' could not be opened. Operating system error code 5(Access is denied.).
The share reportdata on machine1 has READ permissions for EVERYONE. What do I need to do enable allow the database machine (machine2) to access the files on machine1?
Thank you in advance for you help.
Phil
View 10 Replies
View Related
Jan 6, 2004
I receive this error message when I try and run my DTS
package:
"Error opening datafile: The filename, directory name, or
volume label syntax is incorrect."
I set the file name property of the Text File (Source) to
a valid file, but when I run the package and it returns
the above error message, it sets the file name property
to <not displayable>.
Does anyone have any experience with such a problem? If
so please help!!! Thanks
View 1 Replies
View Related
Jan 6, 2004
I receive this error message when I try and run my DTS package:
"Error opening datafile: The filename, directory name, or volume labe syntax is incorrect."
I set the file name property of the Text File (Source) to a valid file, but when I run the package and it returns the above error message, it sets the file name property to <not displayable>.
Does anyone have any experience with such a problem? If so please help!!! Thanks
View 5 Replies
View Related
Aug 1, 2000
hi
how to rename sql server in 7.0 without reinstalling or renaming the computer name? Any help will be appriciated?
regards
ganesh
View 2 Replies
View Related
Feb 11, 2000
How do you rename a SQL server?
View 2 Replies
View Related
Mar 19, 2002
After I renamed the server. Jobs that exsisted before I renamed the server are still associated with the original server name. It has associated those jobs with the original server and assumes that the original server is the MSX server. I do not have multiple instances running on the server and do not want it that way. Is there a way to change the originating server? Or remove the MSX server?
HELP!
View 1 Replies
View Related
May 19, 1999
We need to rename our server.
Example
SERVER_A renamed to SERVER_B and
SERVER_B renamed to SERVER_A
It is easy enough to change the NT box name. Other than using sp_DropServer and sp_AddServer, is there any other changes (updates) we need to make to SQL server or any system tables???
TIA,
Chris
View 1 Replies
View Related
Sep 21, 2005
HelloI am wondering if this is able to be done and what implications there wouldbe with SQL Server.Server1 name: Production Currently running Windows NT and SQL 7instance name is ProductionServer2 name: Test Currently running Windows 2000 andSQL 2000, instance name is Test - default installationBring the Server1 offline and rename Server 2 with the name of Production.Do we have to change the instance name in SQL now on Server 2? If so can wedo this? I didn't think you could change a instance name and had toreinstall SQL.Another Question:Can you have 2 instances of SQL with the same name but reside on differentservers?ThanksSher
View 2 Replies
View Related
Oct 10, 2006
Hi all,
I have a Windows 2003 server box running SQL 2000 and BizTalk 2006. I need to change the name of the underlying server, could anyone point me in the right direction of what I would need to change in terms of SQL and BizTalk config to make it all sit happily with this?
Kind regards
Taz
View 1 Replies
View Related
Jan 18, 2007
Hi ALL,
Getting Access Denied To FileName Error When Using the Execute Sql Task (With File Connection) into a Foreach Loop Container.
Please Note :
I have a folder containing .sql files. I have to dynamically loop through the files and send them as a File connection Folder to the Execute Sql Task.
When I run this Package I am getting the follwoing error :
[Execute SQL Task] Error: An error occurred with the following error message: "Access to the path 'C:ProjectsFuzzy Lookup DataFlow ExampleScripts' is denied.".
Also I have logged in to the machine as Administrator and to Sql Server with sa.
Please help.
Thanks.
Regards,
Salil
View 1 Replies
View Related
Apr 21, 2008
Hi,
Is it possible to install SQL Server 2005 Eval on a Virtual PC 2007
client running Server 2008 Beta? Nothing says it isn't possible, it
says I need to service pack it right away, but before it gets started
it comes up with the error 'sqlcu.dll failed to load'. Anyone know
what this is all about?
Any ideas?
Any help would be appreciated.
Thanks!
View 1 Replies
View Related
Oct 10, 2001
Do I have to re-install SQL2000 if I change the Win2000 Server name.
Thanks
View 2 Replies
View Related
Oct 16, 2006
I am experiencing a big problem with my prod server.I renamed my production server as my test sever (abc) and the test server to (xyz) in sql 2000.
Now, when I connect from my test server to my prod server, it does not seem to see the new server even I put the new server name. It still sees the databases what is in the test server, not the new server databases.
How can I resolve this?
Please help. Thank you all.
View 3 Replies
View Related