Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

SQL Management

Posted on 2014-10-03
7
648 Views
Last Modified: 2014-10-16
I'm not very familiar with SQL therefore I apologize for my ignorance. I'm looking through a server and I'm trying to figure out hot to shrink mdf and ldf files. The problem is that I can't find the databases related to those files. The server has a weird setup with SQL 2005 and 2008 installed. I found one instance of SQL Management Studio Express(version 10.0.5520) but it doesn't have that database. I'm actually looking for the SharePoint database so I can shrink it.

Any help would be appreciated.
0
Comment
Question by:Alan Dala
  • 3
  • 2
  • 2
7 Comments
 
LVL 23

Assisted Solution

by:Thomas Grassi
Thomas Grassi earned 250 total points
ID: 40360781
Goto central administration for sharepoint

then go to the application management tab  then select content databases

that will show you the sql server and database name
0
 
LVL 25

Assisted Solution

by:jogos
jogos earned 250 total points
ID: 40361176
If you are not familiar with sql please take time to have some background on what you want to do
http://www.straightpathsql.com/archives/2009/01/dont-touch-that-shrink-button/
http://www.straightpathsql.com/archives/2009/01/shrinking-is-a-popular-topic/

And having read that. Witch database files do you want to shrink (data/log, fro, which db), how you want to do that (shrink/truncate), do you know possible consequences of that shrink ?  And answer the question why is that file to large, how it became so and how long will it take after the shrink before it will grow again.
0
 
LVL 23

Assisted Solution

by:Thomas Grassi
Thomas Grassi earned 250 total points
ID: 40361275
How many sql instances you have?

Is SQl running on only one server?

Is SharePoint on the same server as SQL?

On the server that is running sql by default it resides in this folder C:\Program Files\Microsoft SQL Server

You will see folders

80
90
100

Then instance name folders

you will find your databases there
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:Alan Dala
ID: 40362850
Thank you for your answers!

Since this is a SBS 2011 server, it came with SharePoint already installed. Although not in use, the Sharepoint database keeps growing, filling up the server. I don't want to just delete the .mdf and ldf files since I heard it can cause other issues in the server(true?). I was looking for a way to shrink the database but when I open Management Studio, I don't see the database. I see just the system databases ( master, model, etc)
0
 
LVL 23

Expert Comment

by:Thomas Grassi
ID: 40362862
This article will help you move he databases

By default they are located in c:\program files\microsoft SQL server\mssql$sharepoint\data


Support.microsoft.com/kb/843580

You can move the databases to a larger drive
0
 

Author Comment

by:Alan Dala
ID: 40363839
Thank you all for your responses.

I don't want to move the databases. I just want to shrink the ldf file since it's running out of control. We don't even use that instance of SharePoint. I don't want to just delete the file cause I'm not sure if the server needs it for something else. For now I found this Microsoft tool that shrinks the SharePoint files. It was pretty effective in lowering the size considerably. It's not exactly how I wanted to do this but at least it took care of the problem for now.

http://support.microsoft.com/kb/2000544
0
 
LVL 25

Accepted Solution

by:
jogos earned 250 total points
ID: 40366791
"We don't even use that instance of SharePoint"
And you probably don't do a transaction log backup of that instance.  The growing database will be in FULL recovery model and then logfile will full up (and eventualy grow) until the next transactionlog backup is taken so the space can be freed.

http://msdn.microsoft.com/en-us/library/ms189275.aspx

And don't try to just delete a database file
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question