Link to home
Start Free TrialLog in
Avatar of grwallace
grwallace

asked on

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!!
Avatar of Deepak Chauhan
Deepak Chauhan
Flag of India image

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
SOLUTION
Avatar of Deepak Chauhan
Deepak Chauhan
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of grwallace
grwallace

ASKER

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!
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.
I tried that - and I get the message :- A network or instance-specific error occurred - blah blah
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.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Now cooking with gas!
The main issue was the inability to connect to the database, and EvilKnievel's last post fixed this :-)
thanks guys!