Solved

SQL Management

Posted on 2014-10-03
7
636 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

Author Comment

by:Alan Dala
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
"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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Join & Write a Comment

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

762 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now