[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 445
  • Last Modified:

Sharing Violation when using Server Management Studio Express in attempt to truncate and shrink sharepoint log file

I need to truncate and shrink a sharepoint log file it is 11 GB. I get a sharing violation in Microsoft SQL Server Management Studio Express when I try to access file.
0
UserFriendlyHHI
Asked:
UserFriendlyHHI
  • 2
2 Solutions
 
Nathan RileyFounder/CTOCommented:
did you stop the server first?  Stop the server then restart it.
0
 
Raja Jegan RSQL Server DBA & ArchitectCommented:
Is there any backup or restore process going in parallel since that might prevent Shrinking of Database Files.
0
 
UserFriendlyHHIAuthor Commented:
I ran a backup earlier, but that ran to completion.
0
 
Raja Jegan RSQL Server DBA & ArchitectCommented:
Ok.. Try running this script:

USE ur_db_name
GO
DBCC SHRINKFILE (ur_db_log_filename, 1000);
GO

where 1000 represents 1000MB or 1 GB to be the size of your Log file.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now