يجب أن نسخت بانتظام وتقليص قواعد بيانات المحتوى الخاصة بي من خلال SQL؟

sharepoint.stackexchange https://sharepoint.stackexchange.com//questions/39673

سؤال

لقد كنت أتفق مع مساحة القرص الصلب على بيئة SharePoint 2010 (مع SQL 2008) لفترة من الوقت وقد اكتشفت مؤخرا بعض الأشياء التي أعتقد أنها قد تساعد.

هل يجب أن أقوم بتشغيل نسخة احتياطية لسجل المعاملات بانتظام ثم تقلص قواعد بيانات المحتوى الخاصة بي؟هل سيساعد ذلك في زيادة مساحة القرص القابلة للاستخدام؟هل أحتاج إلى تهديد تشغيل النسخ الاحتياطية؟

أنا لست DBA (من الواضح) لكنني أعرف شيئا واحدا أو شيئين حول SQL، لذا شكرا جزيلا لإبقاء هذا في الاعتبار تفسيراتك.:)

هل كانت مفيدة؟

المحلول

You should be backing up and truncating your TLOGS. If you have not been doing that, than yes, do a backup, truncate, and shrink will restore space. To keep that space however, you will need to set growth limits on your database and log files. Microsoft has a paper on "best practices" with SQL maintenance:

http://technet.microsoft.com/en-us/library/cc262731.aspx

While I recomend you run thru that whitepaper, I suggest you look at bigger drives to support your installation, they are cheap, and it is worth the front loaded effort to make that swap rather than chasing down a few MB here and there.

نصائح أخرى

First thing you should do is choose the appropriate recovery model for your databases.

If you need point in time restore, go for the FULL recovery model. The price you have to pay is to make regular log backups or your logfile will grow indefinitely. Taking a full backup does not stop them from growing. If you use mirroring or log shipping, you also need to be in the FULL recovery model. So you need to take full (or differential) & logs backups.

If you don't need point in time restores - go with the SIMPLE recovery model. SQL Server will automatically manage your transaction log files and reuse them so they don't grow as big. Full (or differential) backups will do just fine in this case.

Shrinking database files should only be done in very specific circumstances (NEVER automatically or as part of a maintenance plan) because they cause horrible fragmentation of your databases. A good candidate is the situation where you just moved a large site collection to another content database and you leave your original database with 80% of unused space for example. Database files grow, that's what they do.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى sharepoint.stackexchange
scroll top