Showing posts with label SQL. Show all posts
Showing posts with label SQL. Show all posts

Tuesday, 12 January 2016

Installing Configuration Manager - precreate the database

System Center Configuration Manager landing page

It's common knowledge among ConfigMgr administrators that you should precreate the SQL database before installing System Center Configuration Manager. The reason is very straightforward. If you don't, the ConfigMgr installation will create the database for you and it will use the default settings with a single database file. This is not optimal for most sites.

Kent Agerlund (@agerlund) has done some good work in this area.

http://blog.coretech.dk/kea/system-center-2012-configuration-manager-sql-recommendations/ 

In his blog post Kent explains how to design your SQL installation for a ConfigMgr site. He includes a link to a sizing calculator where you can work out how many database files you should have and what size they should be.

So, once you've worked out what you need, how do you precreate the database?

Microsoft provide a publicly available script for this. You can download it from Coretech's site

Extract the .rar file and open the .sql file with Notepad. There are a couple of changes to make


Add your proposed site code between the quotes (I've added P01 here). Change the bit = from 0 to 1. 0 is for testing and 1 allows you to create the database.


Scroll down to see some other options you can change (# of database files, file sizes, autogrowth settings). The defaults will be OK for many sites. Save the file after you make your changes.


Now open SQL Management Studio.. Select File > Open > File.


Browse to the .sql file and select.


Select "Execute" to create the custom database .


Database has been created.


See the custom settings.

Ref: Coretech System Center 2012 Configuration Manager SQL recommendations


Friday, 8 May 2015

Analyse your ConfigMgr data with Microsoft Power BI

Back to main menu

We can now take information from our ConfigMgr databases and analyse the data using the might of Microsoft Power BI. This announcement was made by Brad Anderson last week and he seemed pretty excited about it.

You can read the post here Getting Started with SCCM & Power BI

What is Power BI (Business Intelligence)?

"Microsoft Power BI is a collection of online services and features that enables you to find and visualize data, share discoveries, and collaborate in intuitive new ways. There are two experiences now available for Power BI: the current experience, generally referred to as Power BI for Office 365, and a new experience for Power BI, currently offered as a Public Preview." (Microsoft quote).

Let's have a look at the "new" Power BI. Brad's blog contains instructions but it took me a little while to get this working. However it's really cool and worth the effort.

The first thing you have to do is download the "Getting Started with SCCM and Power BI Workbook".

It's just an Excel spreadsheet containing pre-built queries and views. All we should have to do is configure the data source. Save it locally and open the spreadsheet.


Configure the data source (Server & database names required). The instructions then described clicking on the "Power Query" tab.


I didn't have that so I had to download Microsoft Power Query for Excel


Make sure you get the right version. The architecture of your OS doesn't matter. What is your version of Office?


Install Power Query for Excel.


 Now the Power Query tab is available. Select "Show Pane".


See the pre-configured Workbook queries on the right hand side of the workbook. Right click "Configuration Manager" and click "Refresh".


As it's the first time I'm running this I am prompted for credentials to connect to the database.


Click to Run the query.

  
Oops. That didn't look too good......


....nor this. This baffled me for a while as I know that the account I used was Sysadmin on the SQL instance. However eventually I had a brainwave. I ran Excel as Administrator and then opened the workbook. Success (although I don't know why I had to do this).


I was prompted to configure a Privacy Level.See here for full details of Privacy Levels.


Queries ran successfully. Cool. If you're following along save the Excel file. Now navigate to the Power BI site www.PowerBI.com


 Log in with your Office 365 credentials.


Click "Get Data".


Select Excel Workbook and "Connect".


Navigate and connect to the saved file......


.....and here we go. Data Analytics at our fingertips (without any serious work).


Click to Edit the Report.



See that you can simply manipulate Fields and Filters. You can also move views around as required. This is seriously cool and a very good starting point. There are 4 pre-configured Compliance sections - Mobile Device, Endpoint, Malware and Software Updates.




Tuesday, 29 October 2013

ConfigMgr & SQL - some tips

Back to main menu

This blog shares some tips on how to implement SQL for ConfigMgr 2012. There are some important decisions to be made regarding SQL and they will provide the foundation for a successful ConfigMgr deployment which can easily be managed.


Local V Remote

I've seen this question asked in the Config Mgr Technet Forums many times - should I install local or remote SQL server?

Microsoft don't care. They will support both. Most ConfigMgr Admins will choose local. As long as you just use the database for Config Mgr, the license is free, so there is no additional cost.


Database Management & Security
If the ConfigMgr server is suitably resourced there can be a performance gain using a local SQL installation. However this is not the main reason to choose local SQL. The main reason is control over the database. In a larger organisation dedicated Database Administrators (DBAs) manage the SQL environment. They can have very rigid rules, in particular when considering database security.

When we are installing Config Mgr 2012 with a remote SQL server it is a required that the installation account and the Config Mgr computer account are both Local Administrator and SQL Sysadmin on the remote server. If you are deploying to a remote SQL Cluster this needs to be done on both nodes. These permissions need to be maintained after the installation. ConfigMgr needs to be able to manage and manipulate the database for successful operation. DBAs often have a problem with this.

Performance
There are, of course, some obvious performance benefits with local installations

  • not sharing with resource intensive applications
  • no network latency

Collation
Config Mgr 2012 requires a specific database collation - SQL_Latin1_General_CP1_CI_AS. ConfigMgr Setup will not continue if the collation is different, which can sometimes be the case for existing SQL installations.


Random SQL tips

  • The only SQL features needed for ConfigMgr are the Database Engine and SSRS (if server is to be your reporting server also)
  • As mentioned above database collation must be SQL_Latin1_General_CP1_CI_AS
  • High Availability - ConfigMgr does not support SQL 2012 AlwaysOn
  • It is not supported to manually edit the SCCM db
  • Don't forget to configure SQL Maintenance tasks - backups and re-indexing
  • Manually configure SQL memory usage - minimum 8GB 
  • ConfigMgr 2012 shares information between sites by SQL Replication
  • A secondary site must use a locally installed SQL instance on the Secondary Site server. The default is to install SQL express on the OS partition. Just like the other site hierarchy servers, the Secondary Site server will replicate to its assigned Primary Site server, by default, on port 4022.
  • WSUS requires its own DB. The DB can be co-located on an instance that hosts the CAS or PS server.
  • The MDT DB is a small DB with light requirements. It can be co-located with other ConfigMgr DB’s like the PS and the WSUS.
  • ConfigMgr 2012 does not use a dedicated Data Warehouse. It runs its reports from the standard ConfigMgr DB.


Disk Design

Best practice implementations of SQL follow this model for presentation of disks:

Operating System, Program Files
Database
Logs 
TempDB
SQL Backup


Sizing Considerations (Disk Space, RAM etc)

There is an excellent guide here


Improved Performance Tips

Use RAID 10 configuration for high speed performance of Database and Logs drives

Consider running reports via browser rather than ConfigMgr console

  • less resources consumed on ConfigMgr server
  • reports can be run quicker
  • don't need to give unneccessary access to the ConfigMgr console

Wednesday, 14 August 2013

SQL Server version numbers

I have to research this every time I need it so I thought I'd make the information easy to find.


 
RTM
SP1
SP2
SP3
SP4
SQL Server 2012
 
11.00.2100.60
11.00.3000
 
 
 
    SQL Server 2008 R2
    
10.50.1600.1
10.50.2500
10.50.4000
 
 
SQL Server 2008
    
10.00.1600.22
10.00.2531
10.00.4000
10.00.5500
 
SQL Server 2005
    
9.00.1399.06
9.00.2047
9.00.3042
9.00.4035
9.00.5000
SQL Server 2000
    
8.00.194
8.00.384
8.00.532
8.00.760
8.00.2039
SQL Server 7.0
    
7.00.623
7.00.699
7.00.842
7.00.961
7.00.1063