Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Backup/Maintenance Plan

Author  Topic 

muzzettemm
Posting Yak Master

212 Posts

Posted - 2009-01-07 : 11:37:41
Hi guys, I want to get our database away from bAckup Exec adn I want SQL server to do the backing up. I did some research on backups but I just want to get confirmation from the DB Gurus on what I amd doing is ok.

The database are set for SIMPLE recovery because we not that interested in Point In Time since we are not updating on a daily basis.
I want to set up a MAINTENANCE PLAN for
twice a week on Friday Full backup
and three times a week differentials

would that be a good plan or no??

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-01-07 : 12:17:04
That sounds like a good plan.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

muzzettemm
Posting Yak Master

212 Posts

Posted - 2009-01-07 : 12:42:56
Really cool thank yoiu Tkizer, I have a quick question silly but. The actual SQL Database reside in the MSSQL\Data Folder correct???
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-01-07 : 12:44:12
It just depends on where you put them. We put split our MDFs into a Data mount point and then the LDFs go into a Log mount point. Everyone's system could be different.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

muzzettemm
Posting Yak Master

212 Posts

Posted - 2009-01-07 : 13:07:24
Ok so your saying that you have the MDF and the LDF in different folders?? correct
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-01-07 : 13:39:21
Yes we do that for performance reasons. We put our backups in a different location and then also the system databases are in yet another location. All of these are on mount points pointing to different LUNs. If you the different locations aren't separated at the hardware layer, then there really is no benefit to splitting them up.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

muzzettemm
Posting Yak Master

212 Posts

Posted - 2009-01-07 : 13:52:27
I would like to do that, we have a drive that has enough room on it to store the LDF and I would like to place them there if I can. I'm not sure how to implement that, never done it?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-01-07 : 13:53:16
If the database already exists, then you just need to detach it, copy the LDF to the desired location, and then reattach the database making sure to specify the new location of the LDF file.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

muzzettemm
Posting Yak Master

212 Posts

Posted - 2009-01-07 : 16:32:39
ok so after reattaching the database I run this script, hope this is correct?? After moving the LDF to the desired location

ALTER DATABASE database_name MODIFY FILE ( NAME = logical_name , FILENAME = 'new_path\os_file_name' )
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-01-07 : 16:47:58
If you'd like to rename the logical names too, then yes. It isn't required to do this though. The detach/move/attach is enough to move the physical file.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2009-01-07 : 16:53:07
I guess You can also use
ALter Database ..... Modify file.... to move the location of MDF or LDF file. The only thing is you need to restart SQL Service to take an effect and delete old MDF/Files.
Go to Top of Page

muzzettemm
Posting Yak Master

212 Posts

Posted - 2009-01-07 : 17:11:26
I didnt want to RENAME THE logical names, I only wanted to seperate the LDF to a diffent physical disk on the server. I just wondering If I needed to do something else aft the reattaching?? to make sure that the Databbase can find the new location of the LDF

Here is the situation, the IT person that set all this up is now gone. And I made suggestions in the past but he didnt want to do them. One of them was moving the LDF out of the same file as the MDF, what I wanting to do was copy paste them out of the file they are in and move them to a differnt file on a differnt drive. I tried doign this with one LDF file and it gave me an error message, just wanted to test it out.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-01-07 : 17:24:50
Nothing is required after you've re-attached it. It's during the attach that you tell it the locations of all of your database files, typically just one MDF and one LDF.

In order to copy the file, you must either first detach the database or stop the SQL Server service. Otherwise, the file is in use by SQL Server.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

muzzettemm
Posting Yak Master

212 Posts

Posted - 2009-01-07 : 17:54:29
Ok I see what your saying, I need to either stop the service or detach the database because SQL SERVER is using it, thats why I cant copy it over?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-01-07 : 17:55:47
Yes. Here's what I wrote when we started talking about moving the LDF:

quote:

If the database already exists, then you just need to detach it, copy the LDF to the desired location, and then reattach the database making sure to specify the new location of the LDF file.



Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

muzzettemm
Posting Yak Master

212 Posts

Posted - 2009-01-07 : 18:12:59
ok I just confirming thanks allot guys, I really appreciate your time and patience
Go to Top of Page

muzzettemm
Posting Yak Master

212 Posts

Posted - 2009-01-08 : 11:39:27
Good morning everyone, well I moved the LDF to a different folder on a different disk, detached the database then we attaching it told it where the new location is for the LDF and it gave me an error message saying that the proposed new owner is already and aliased or user in the database. Can anyone tell me what I am doing wrong cause I full access to SQL SERVER, I'm an Admin
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-01-08 : 14:53:24
You detached the database before you tried to copy it to a new location, right? Your last post indicates you copied first and then detached, which is not correct.

We'll need the exact error in order to help.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

muzzettemm
Posting Yak Master

212 Posts

Posted - 2009-01-08 : 15:07:56
yes I detached first, would not let me move to new location unless I detached first
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-01-08 : 15:52:56
What's the full error message?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

muzzettemm
Posting Yak Master

212 Posts

Posted - 2009-01-08 : 16:07:51
full error message

TITLE: Microsoft SQL Server Management Studio
------------------------------

Attach database failed for Server 'GCSQL'. (Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach+database+Server&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------

The proposed new database owner is already a user or aliased in the database. (Microsoft SQL Server, Error: 15110)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.3054&EvtSrc=MSSQLServer&EvtID=15110&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------
Go to Top of Page
    Next Page

- Advertisement -