Solved

SQL Management

Posted on 2014-10-03
7
651 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
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 

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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Suggested Solutions

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how the fundamental information of how to create a table.

685 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