Category Archives: powershell

sharepoint-content-database-1920x1080

content database in sharepoint

content database in sharepoint

A content database in sharepoint is not the database server itself but container for all the content for a single web application.

manage-content-databases-1277x640
content database in sharepoint

You can have only one content database for one web application however, you can separate content for multiple websites into multiple content databases for a site collection. You can also use a single content database for multiple site collections, keeping in mind that the site collection or collections represent a single web app.

we can run the powershell command as below to get quick details however can get from “Central Admin -> Application Management”  under “View all Site Collections”.

Get-SPContentDatabase
Get-SPContentDatabase-985x390
Get-SPContentDatabase-1898x653
Get-SPContentDatabase-1896x636

Isolation and sharing are expressed as the difference between one site collection using one database and numerous site collections sharing a database. The number of site collections using a database is also a scaling and performance issue. If you are deploying site collections with a high workload attached and greater expectancy for growth, make sure to use fewer site collections per database. You can also plan your content database strategy by adding databases to site collections as they grow or associate specific site collections only with specific content databases. The latter approach lets you isolate a database serving particular site collections from all the other databases and thus isolate the content it contains.

boundaries and limits content databases

There can be 500 content databases per farm at max. With 200GB data per content database and 100TB of data per farm. 60 million items including documents and list items. Number of site collections per content database recommended to 5,000. However, up to 10,000 site collections are supported.2500 non-Personal site collections and 7500 Personal Sites or 10000 Personal Sites alone. find in details from Microsoft Doc Link.

content database for each site collection powershell

We can run below powershell command to know which content database your site collection attached to.

$site = Get-SPSite "http://win2016:37344/sites/SPmcse"
write-host $site.WebApplication.ContentDatabases

or

$url="http://win2016:37344/sites/SPmcse"
(Get-SPSite $url).ContentDatabase.name
Get-SPContentDatabase-1920x1303
Get-SPContentDatabase-1048x480
Advertisements
Service-Applications-in-SharePoint-1920x1080

Service Applications in SharePoint

Service Applications in SharePoint

Service Applications in SharePoint are associated with web applications, and specific services are typically deployed as needed in a particular farm. Only deployed services are referred to as service applications. This is a huge advantage in terms of conserving resources and optimizing performance. For instance, a specific web application can be configured to use only the services it needs. The number of service applications that exist is vast, and, as third-party vendors can create their own services for SharePoint Server. A list of services includes the following:

You can set up a single service application to be shared among multiple web applications or deploy multiple instances of the same service across a farm and, in some cases, across multiple farms. Also, there is no limitation regarding the number of services that can be deployed in any single farm. A typical planning scenario requires that you either set up services to share across multiple web applications or isolate an individual service to one or a limited number of web applications. We can publish below service applications across the farm.

  • Business Data Connectivity
  • Machine Translation
  • Managed Metadata
  • User Profile
  • Search
  • Secure Store

Navigate to “Central Admin -> Application Management ->Manage Service Applications” and click on “New” from ribbon to see the list of service applications available.

Service-Applications-in-SharePoint-1300x674

you can use powershell command to get the list of  service applications

Get-SPServiceApplication | Format-Table -wrap
Service Applications in SharePoint
Get-SPServiceApplication
Get-SPServiceApplication -Identity 48fbecaa-71e4-4f1d-bdfe-bdcbc17fa061 | Format-Table -wrap
Get-SPServiceApplication-1324x186

sharepoint services 2016

For every service application there is a service associated with it which you can from central admin by navigating to “Central Admin -> Application Management -> Manage Services on Server”.

manage-services-on-server-1273x441
services-on-server-1324x870

Alternatively you can use the powershell command as below

Get-SPServiceInstance | Format-Table -wrap
Get-SPServiceInstance-873x1099
Get-SPServiceInstance | Where {$_.Status -eq "Online"} | Format-Table -wrap
Get-SPServiceInstance-formt-1154x933

Similarly we can start the service instance by running the below command.

Start-SPServiceInstance e63962e4-e1ea-4b83-a9cc-df51683e85f3
logging-1920x1080

log management open source

log management open source

In this article we will discuss about log management open source. How to manage log using powershell. Below are points we will check using powershell.

  • Check what are the diagnostic provider
  • How to disable or enable event log provider
  • ULS log settings or sharepoint 2016 logs location
  • Change ULS log settings or sharepoint 2016 logs location
  • How to find ULS logging level
  • Set ULS log verbose

Check what are the diagnostic provider

we can use the powershell cmdlet “Get-SPDiagnosticsProvider” to check what are the diagnostic provider.

log-management_1589x611

How to disable or enable event log provider

We can run the below to command to disable event log provider that is “job-diagnostics-event-log-provider” provider.

Get-SPDiagnosticsProvider job-diagnostics-event-log-provider | Set-SPDiagnosticsProvider -Enable:$false
Get-SPDiagnosticsProvider job-diagnostics-event-log-provider
job-diagnostics-event-log-provider-1581x277

We can run the below to command to enable event log provider that is “job-diagnostics-event-log-provider” provider

Get-SPDiagnosticsProvider job-diagnostics-event-log-provider | Set-SPDiagnosticsProvider -Enable:$true
Get-SPDiagnosticsProvider job-diagnostics-event-log-provider
enable-job-diagnostics-event-log-provider-1577x268

ULS log settings or sharepoint 2016 logs location

We can run the command “Get-SPDiagnosticConfig” to get ULS  logging settings

Get-SPDiagnosticConfig
Get-SPDiagnosticConfig-1315x687

Change ULS log settings or sharepoint 2016 logs location

we can run the command “Set-SPDiagnosticConfig” to Change ULS log settings or sharepoint 2016 logs location.

PS C:\> Set-SPDiagnosticConfig -DaysToKeepLogs 7 -LogLocation "E:\Logs" -EventLogFloodProtectionEnabled
PS C:\> Get-SPDiagnosticConfig
change-sharepoint-2016-logs-location-1317x712
diagnostic-logging-1255x665

How to find ULS logging level

We can run the command “Get-SPLogLevel” to find ULS logging level.

Get-SPLogLevel -identity "eApproval:*", General, audit, "Business Data"
Get-SPLogLevel-1314x534

Set ULS log verbose

we can set ULS log Verbose and categories by using “Set-SPLogLevel

Set-SPLogLevel -TraceSeverity verbose -EventSeverity verbose -Identity "eApproval:*", General, audit, "Business Data"
Get-SPLogLevel -identity "eApproval:*", General, audit, "Business Data"
Set-SPLogLevel-1317x625

Create new log file

we can create a new log file by running the command below.

New-SPLogFile
new-splogfile-1316x108