﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2005 / Backups  / Could not locate file 'SAML' for database 'SAML' in sys.database_files / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Fri, 24 May 2013 04:08:47 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Could not locate file 'SAML' for database 'SAML' in sys.database_files</title><link>http://www.sqlservercentral.com/Forums/Topic1353215-357-1.aspx</link><description>disregard previous post - use quotes worked.THANK YOU.</description><pubDate>Tue, 25 Sep 2012 11:03:27 GMT</pubDate><dc:creator>jasons-837104</dc:creator></item><item><title>RE: Could not locate file 'SAML' for database 'SAML' in sys.database_files</title><link>http://www.sqlservercentral.com/Forums/Topic1353215-357-1.aspx</link><description>tried:USE SAML;GODBCC ShrinkFile("SPGSAMLLog.ldf", 3000)returned:Msg 8985, Level 16, State 1, Line 1Could not locate file 'SPGSAMLLog.ldf' for database 'SAML' in sys.database_files. The file either does not exist, or was dropped. UGH</description><pubDate>Tue, 25 Sep 2012 11:00:20 GMT</pubDate><dc:creator>jasons-837104</dc:creator></item><item><title>RE: Could not locate file 'SAML' for database 'SAML' in sys.database_files</title><link>http://www.sqlservercentral.com/Forums/Topic1353215-357-1.aspx</link><description>Use quotes.</description><pubDate>Tue, 25 Sep 2012 10:22:11 GMT</pubDate><dc:creator>GilaMonster</dc:creator></item><item><title>RE: Could not locate file 'SAML' for database 'SAML' in sys.database_files</title><link>http://www.sqlservercentral.com/Forums/Topic1353215-357-1.aspx</link><description>ran this: SELECT name FROM sys.master_files WHERE database_id = db_id() AND type = 1it returned: SPGSAMLLog.ldftried:USE SAML;GODBCC ShrinkFile(SPGSAMLLog.ldf, 3000)it returned:Msg 102, Level 15, State 1, Line 1Incorrect syntax near '.'.</description><pubDate>Tue, 25 Sep 2012 09:20:51 GMT</pubDate><dc:creator>jasons-837104</dc:creator></item><item><title>RE: Could not locate file 'SAML' for database 'SAML' in sys.database_files</title><link>http://www.sqlservercentral.com/Forums/Topic1353215-357-1.aspx</link><description>Are you sure that query returned the logical name, not the physical? If so, then you need to use what it returned (ie 'SPGSAMLLog.ldf') in the shrink command.</description><pubDate>Mon, 24 Sep 2012 14:01:42 GMT</pubDate><dc:creator>GilaMonster</dc:creator></item><item><title>RE: Could not locate file 'SAML' for database 'SAML' in sys.database_files</title><link>http://www.sqlservercentral.com/Forums/Topic1353215-357-1.aspx</link><description>Thanks for responding. I'm back on this...I ran: SELECT [name] AS logical_file FROM sys.database_files dfIt returned:logical_fileSPGSAMLDat.mdfSPGSAMLLog.ldfUSE SAML;GODBCC ShrinkFile(SPGSAMLLog_log, 3000)Msg 8985, Level 16, State 1, Line 1Could not locate file 'SPGSAMLLog_log' for database 'SAML' in sys.database_files. The file either does not exist, or was dropped.</description><pubDate>Mon, 24 Sep 2012 13:01:09 GMT</pubDate><dc:creator>jasons-837104</dc:creator></item><item><title>RE: Could not locate file 'SAML' for database 'SAML' in sys.database_files</title><link>http://www.sqlservercentral.com/Forums/Topic1353215-357-1.aspx</link><description>No, that's the physical name of the file. You need the logical name for shrink. It's the name column in sys.database_files.p.s. Why are you shrinking the log?</description><pubDate>Sun, 02 Sep 2012 10:10:05 GMT</pubDate><dc:creator>GilaMonster</dc:creator></item><item><title>Could not locate file 'SAML' for database 'SAML' in sys.database_files</title><link>http://www.sqlservercentral.com/Forums/Topic1353215-357-1.aspx</link><description>Good Morning -I know this topic has been beaten to death over the years but I can't shrink a large log file. I have run this:USE SAML;GODBCC ShrinkFile(SAML_log, 3000)It returned: Msg 8985, Level 16, State 1, Line 1Could not locate file 'SAML_log' for database 'SAML' in sys.database_files. The file either does not exist, or was dropped.I ran: select [name], type_desc, Physical_name from sys.master_files where database_id = DB_ID('SAML')It returned: SPGSAMLLog.ldfI ran: SELECT df.name FROM sys.database_files AS df WHERE df.type_desc = 'log'It returned: SPGSAMLLog.ldfLogical name is SPGSAMLLog.ldf - correct?I ran:I have run this:USE SAML;GODBCC ShrinkFile(SPGSAMLLog_log, 3000)It returned: It returned: Msg 8985, Level 16, State 1, Line 1Could not locate file 'SPGSAMLLog_log' for database 'SAML' in sys.database_files. The file either does not exist, or was dropped.I tried many different variations of 'SPGSAMLLog' with the same results.What am I doing wrong?Thanks for any help.</description><pubDate>Sun, 02 Sep 2012 07:14:50 GMT</pubDate><dc:creator>jasons-837104</dc:creator></item></channel></rss>