Shrink the Sharepoint_config logfile

I have a sharepoint log file which has used up nearly all of the space on my c: drive of a SPS2008 server.
If I try to shrink it using :-

DBCC SHRINKFILE (C:\Windows\SYSMSI\SSEE\MSSQL.2005\MSSQL\DataSharePoint_Config_29c26fca-17b8-48c1-9704-b869932abcb6_log.LDF, 5)

I get :-
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'C:'.


and if I add delimiters

DBCC SHRINKFILE ("C:\Windows\SYSMSI\SSEE\MSSQL.2005\MSSQL\DataSharePoint_Config_29c26fca-17b8-48c1-9704-b869932abcb6_log.LDF", 5)

I get :-

Msg 8985, Level 16, State 1, Line 1
Could not locate file 'C:\Windows\SYSMSI\SSEE\MSSQL.2005\MSSQL\DataSharePoint_Config_29c26fca-17b8-48c1-9704-b869932abcb6_log.LDF' for database 'master' in sys.database_files. The file either does not exist, or was dropped.


I am running this as a new query in SSMS

If I try to connect directly to the database using SSMS I can see MICROSOFT##SSEE ok, but I can't connect to it!!
grwallaceAsked:
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.

Deepak ChauhanSQL Server DBACommented:
you can not shrink the database file this way.

"DBCC SHRINKFILE ("C:\Windows\SYSMSI\SSEE\MSSQL.2005\MSSQL\DataSharePoint_Config_29c26fca-17b8-48c1-9704-b869932abcb6_log.LDF", 5)"

dbcc shrinkfile () command only accept logical file name or file ID not physical file name.

DBCC shrinkfile(<logical file name> , size)
or
DBCC shrinkfile (2, 5)

you have to connect sql server through SSMS tool and then check the logical file name or id
Deepak ChauhanSQL Server DBACommented:
use <database name>

go

DBCC shrinkfile(<logical file name> , size)
or
DBCC shrinkfile (2, 5)
grwallaceAuthor Commented:
I can't seem to connect to the SQl Serve instance to do this - and I can't see an instance for it in services either!
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

EvilKnievelCommented:
Can you try to login to <servername>\##SSEE  using management studio? From there you can use the gui to shrink the log file if you're not comfortable with queries.
grwallaceAuthor Commented:
I tried that - and I get the message :- A network or instance-specific error occurred - blah blah
grwallaceAuthor Commented:
And I tried :-

se DataSharePoint_Config
DBCC SHRINKFILE(2, 5)

and got:-

Msg 911, Level 16, State 1, Line 1
Database 'DataSharePoint_Config' does not exist. Make sure that the name is entered correctly.
EvilKnievelCommented:
Did you also try to connect like this:?

\\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query

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
grwallaceAuthor Commented:
Now cooking with gas!
The main issue was the inability to connect to the database, and EvilKnievel's last post fixed this :-)
thanks guys!
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.