Shrink Database Log

I am trying to run the following script to shrink down our log file.  

Use AIRT
GO
backup log AIRT with truncate_only
GO
DBCC SHRINKFILE (GPSAIRTLog, EMPTYFILE)

and I receive the following error.

Could not locate file 'GPSAIRTLog' for database 'AIRT' in sys.database_files. The file either does not exist, or was dropped.

I have ran the following script to check the files

select * from sys.database_files

These are my results.......
1      9BB88248-A693-4BA1-BA06-477541ACF1EE      0      ROWS      1      GPSAIRTDat.mdf      D:\GPdata\GPSAIRTDat.mdf      0      ONLINE      353896      -1      20      0      0      0      1      0      NULL      NULL      NULL      NULL      5439000036835400237      4E169688-AE76-41D2-AD6F-F8C991C19F24      2008-11-13 16:22:43.027      NULL      NULL      NULL      NULL      NULL
2      D43F4590-0428-42A8-8F89-8FB46D8E697C      1      LOG      0      GPSAIRTLog.ldf      D:\GPdata\GPSAIRTLog.ldf      0      ONLINE      6330824      268435456      25      0      0      0      1      0      NULL      NULL      NULL      NULL      NULL      NULL      NULL      NULL      NULL      NULL      NULL      NULL

Im stumped.

LVL 1
Dynamics_GirlAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Daniel WilsonCommented:
Your logical name includes the .MDF or .LDF -- which is unusual.  Please try:

DBCC SHRINKFILE (GPSAIRTLog.log, EMPTYFILE)

Open in new window

0
Dynamics_GirlAuthor Commented:
No Go
It says

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near '.'.
0
Dynamics_GirlAuthor Commented:
I tried this and if gives me the same error

Use AIRT
GO
backup log AIRT with truncate_only
GO
DBCC SHRINKFILE ('GPSAIRTLog.log', EMPTYFILE)
0
The Five Tenets of the Most Secure Backup

Data loss can hit a business in any number of ways. In reality, companies should expect to lose data at some point. The challenge is having a plan to recover from such an event.

Daniel WilsonCommented:
what about

DBCC SHRINKFILE ([GPSAIRTLog.log], EMPTYFILE)

Open in new window

0
Dynamics_GirlAuthor Commented:
Use AIRT
GO
backup log AIRT with truncate_only
GO
DBCC SHRINKFILE ('GPSAIRTLog.ldf', EMPTYFILE)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
grayeCommented:
Now that  you've successfully shrunk the log file, you might consider reading the following article on how to use periodic log backups to prevent  this from happenign again.....
http://home.hot.rr.com/graye/Articles/SQL_LogMaintenance.htm 
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.