?
Solved

SQL Management

Posted on 2014-10-03
7
Medium Priority
?
684 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
[X]
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
  • 3
  • 2
  • 2
7 Comments
 
LVL 23

Assisted Solution

by:Thomas Grassi
Thomas Grassi earned 1000 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 1000 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 1000 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

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 1000 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Suggested Courses

764 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