Posts tagged ‘2008’

Exam 70-448 Study Guide Part 6

This is a collection of links to free articles that may help in studying for

Exam 70 448  -Microsoft SQL Server 2008, Business Intelligence Development and Maintenance

I have broken this up into 6 posts based on the major areas of skills being measured taken from the Microsoft Learning page at

http://www.microsoft.com/learning/en/us/exam.aspx?id=70-448

Final part is :

Configuring, Deploying, and Maintaining SSRS – which accounts for 13 % of the total skils measured

http://msdn.microsoft.com/en-us/library/ms143724%28v=sql.100%29.aspx

 

 

Exam 70-448 Study Guide Part 5

This is a collection of links to free articles that may help in studying for

Exam 70 448  -Microsoft SQL Server 2008, Business Intelligence Development and Maintenance

I have broken this up into 6 posts based on the major areas of skills being measured taken from the Microsoft Learning page at

http://www.microsoft.com/learning/en/us/exam.aspx?id=70-448

Fifth up is :

Implementing an SSRS Solution – which accounts for 17 % of the total skils measured

  • Create an SSRS report by using an SSAS data source.
    This objective may include but is not limited to:

 

 

Exam 70-448 Study Guide Part 4

This is a collection of links to free articles that may help in studying for

Exam 70 448  -Microsoft SQL Server 2008, Business Intelligence Development and Maintenance

I have broken this up into 6 posts based on the major areas of skills being measured taken from the Microsoft Learning page at

http://www.microsoft.com/learning/en/us/exam.aspx?id=70-448

Fourth up is :

Configuring, Deploying, and Maintaining SSAS - which accounts for 17 % of the total skils measured

 

Exam 70-448 Study Guide Part 3

This is a collection of links to free articles that may help in studying for

Exam 70 448  -Microsoft SQL Server 2008, Business Intelligence Development and Maintenance

I have broken this up into 6 posts based on the major areas of skills being measured taken from the Microsoft Learning page at

http://www.microsoft.com/learning/en/us/exam.aspx?id=70-448

Third up is :

Implementing an SSAS Solution– which accounts for 21 % of the total skils measured

 

Exam 70-448 Study Guide Part 2

This is a collection of links to free articles that may help in studying for

Exam 70 448  -Microsoft SQL Server 2008, Business Intelligence Development and Maintenance

I have broken this up into 6 posts based on the major areas of skills being measured taken from the Microsoft Learning page at

http://www.microsoft.com/learning/en/us/exam.aspx?id=70-448

2nd up is :

Configuring, Deploying, and Maintaining SSIS – which accounts for 15 % of the total skils measured

 

Exam 70-448 Study Guide Part 1

This is a collection of links to free articles that may help in studying for

Exam 70 448  -Microsoft SQL Server 2008, Business Intelligence Development and Maintenance

I have broken this up into 6 posts based on the major areas of skills being measured taken from the Microsoft Learning page at

http://www.microsoft.com/learning/en/us/exam.aspx?id=70-448

First up is :

Implementing an SSIS Solution – which accounts for 17 % of the total skils measured

 

 

SSIS syncing databases between like servers

SSIS package to Sync databases between “like” environments, for instance production and test or acceptance.

This package was created in VS2008 and may have functionality only available in 2008 but will work against SQL2005 servers

There is some reliance that the environments will be the same – drive letters, file locations. Users are not synced as part of this package as generally these will be static (hopefully you are using groups) The job uses the admin UNC paths so the package needs to be run with administrative credentials of both servers or shares will need to be created with the appropriate permissions.

  1. The package first queries msdb on the source server and retrieves the paths of the last full backups.
  2. It passes the database name, path and full unc path into a foreach loop container.
  3. The file system task copies the backup to the path defined in the FullDestPath variable
  4. An execute SQL task sets the database (if it exists) to single user
  5. An execute SQL task restores the database using the full admin unc path of step 3 – This could be changed to a share to allow the process to run with less privileges
  6. The loop completes this for all non system or reportserver databases (this is defined in the sql script in step 2)
  7. Success email is sent on completion
  8. There is also an On error event handler at the root of the package that emails any package failure

Package Overview

  1. Parameters

  2. Retrieve Database name and last full backup Path

    1. Create an Execute T-SQL Statement task  against your Source server (msdb database)
  1. With a full result set to an Object data type – here I have used rowset1
  2. Use the SQL statement below,
WITH    BACKUPS
   AS (
 SELECT
    a.Server
    ,a.database_name
    ,B.physical_device_name
  FROM
  (
  SELECT
     CONVERT(NVARCHAR(MAX), SERVERPROPERTY('Servername')) AS Server
     ,msdb.dbo.backupset.database_name
     ,MAX(msdb.dbo.backupset.backup_finish_dateAS last_db_backup_date
   FROM
     msdb.dbo.backupmediafamily
     INNER JOIN msdb.dbo.backupset
     ON msdb.dbo.backupmediafamily.media_set_id msdb.dbo.backupset.media_set_id
   WHERE
     msdb..backupset.type 'D'
    AND msdb.dbo.backupset.database_name NOT IN (
    'Master''msdb''model''reportserver',
    'reportservertempdb' )
   GROUP BY
     msdb.dbo.backupset.database_name
  AS A
    LEFT JOIN (
  SELECT
     CONVERT(CHAR(100), SERVERPROPERTY('Servername')) AS Server
     ,msdb.dbo.backupset.database_name
     ,msdb.dbo.backupset.backup_finish_date
     ,msdb.dbo.backupmediafamily.physical_device_name
   FROM
     msdb.dbo.backupmediafamily
     INNER JOIN msdb.dbo.backupset
     ON msdb.dbo.backupmediafamily.media_set_id msdb.dbo.backupset.media_set_id
   WHERE
     msdb..backupset.type 'D'
  AS B
    ON A.[server] B.[server]
   AND A.[database_name] B.[database_name]
   AND A.[last_db_backup_date] B.[backup_finish_date]
 )
SELECT
   [database_name]
   ,[physical_device_name] AS databasePath
   ,'\\' [Server] '\' REPLACE([physical_device_name]':''$'AS FullSourcePath
 FROM
   [BACKUPS]

   
  1. Set your result set
  1. Use a ForEach Loop Container

    1. Set the enumerator to Foreach ADO Enumerator with your object source as your object variable .

    1. Map your variables

  1. Add a File System Task

    1. Configure with your source and destination variable and a Copy File operation

  1. Create T-SQL Statement Task against your destination server (master database)

DECLARE @databaseName VARCHAR(50)
SET @databaseName = ?
IF  EXISTS
(SELECT name FROM sys.databases WHERE name @databaseName)
EXEC('ALTER DATABASE ' @databaseName +  ' SET SINGLE_USER WITH ROLLBACK IMMEDIATE')
  1. Map your parameter like this

  1. Create T-SQL Statement Task against your destination server (master database)

DECLARE @databaseName VARCHAR(50)
DECLARE @FullDestPath VARCHAR(MAX)
    SET @databasename = ?
    SET @FullDestPath = ?
EXEC(
        'RESTORE DATABASE ' @databaseName ' FROM DISK =
N''' +  @FullDestPath '''WITH RECOVERY, FILE = 1, NOUNLOAD, REPLACE, STATS = 10')
GO
  1. Map your parameters like this

  1. Add a Send Mail  task using the following expressions

  1. On the even Handlers tab

  1. Create an onError handler at the root of the package

  • Add a Send mail task with the following expressions

  1. I also create a config file to allow the package to be used in different locations without editing the package itself
    1. databaseName – value
    2. DestPath – value ( this is either a share or UNC – it does NOT contain the server name – it uses the DestServer variable so it should be in the format “C$\sql\backups” or “mybackupshare”
    3. DestServer – value
    4. SMTPFailureTo – value
    5. SMTPFrom – value
    6. SMTPServer – value
    7. SMTPSuccessTo – value
    8. SourceServer – value

SQL 2008 Reporting services – ReportServerStorageException: An error occurred within the report server database. This may be due to a connection failure, timeout or low disk condition within the database.

Had some strange error accessing the history tab and some of the other tabs of some scheduled reports in SQL 2008 SP1.

With a misleading error ”   ReportServerStorageException: An error occurred within the report server database.  This may be due to a connection failure, timeout or low disk condition within the database.”

I at one time restored these databases after a server reinstall from a failed SP1 upgrade. Everything worked for the most part but these odd errors on some reports kept happening.

This error pointed me in the right direction when expanding the schedules tab in SSMS connected with Reporting services

EXECUTE permission denied on object ‘xp_sqlagent_notify’, database ‘mssqlsystemresource’, schema ‘sys’.

To resolve this ensure the rsexecrole exists in Master, MSDB, ReportServer & ReportServerTempDB

then run the following script

USE master
GO
GRANT EXECUTE ON master.dbo.xp_sqlagent_notify TO RSExecRole
GO
GRANT EXECUTE ON master.dbo.xp_sqlagent_enum_jobs TO RSExecRole
GO
GRANT EXECUTE ON master.dbo.xp_sqlagent_is_starting TO RSExecRole
GO

USE msdb
GO
GRANT EXECUTE ON msdb.dbo.sp_help_category TO RSExecRole
GO
GRANT EXECUTE ON msdb.dbo.sp_add_category TO RSExecRole
GO
GRANT EXECUTE ON msdb.dbo.sp_add_job TO RSExecRole
GO
GRANT EXECUTE ON msdb.dbo.sp_add_jobserver TO RSExecRole
GO
GRANT EXECUTE ON msdb.dbo.sp_add_jobstep TO RSExecRole
GO
GRANT EXECUTE ON msdb.dbo.sp_add_jobschedule TO RSExecRole
GO
GRANT EXECUTE ON msdb.dbo.sp_help_job TO RSExecRole
GO
GRANT EXECUTE ON msdb.dbo.sp_delete_job TO RSExecRole
GO
GRANT EXECUTE ON msdb.dbo.sp_help_jobschedule TO RSExecRole
GO
GRANT EXECUTE ON msdb.dbo.sp_verify_job_identifiers TO RSExecRole
GO
GRANT SELECT ON msdb.dbo.sysjobs TO RSExecRole
GO
GRANT SELECT ON msdb.dbo.syscategories TO RSExecRole
GO

sql 2008 Books

I don’t feel competent enough for full reviews but here are my high level view’s of some of the current SQL 2008 books on the market that I have read. (all links go to Amazon)

First though, about myself. I come from a system engineering background not a programming background so I’m sure I bias in that direction

The first 2008 The first 2008 book I read was Itzik Ben-gan’s Microsoft® SQL Server® 2008 T-SQL Fundamentals -I really enjoy Itzik’s books and this is no disapointment, some books miss a basic learning fundamental of not building on previous lessons. This is definately not the case. A great book, an enjoyable read, great as a reference to. I definately reccomend

The next book I was Professional Microsoft SQL Server 2008 Administration by by Brian Knight (Author), Ketan Patel (Author), Wayne Snyder (Author), Ross LoForte (Author), Steven Wort (Author)

This has to be one of the best SQL server books I have read. A great read, goes into a good depth. I have bookmarks all through this book and find myself constantly refering back to it. A must have in my opinion.

I haven’t gone into much detail and my opinion doesn’t really count for anything, but here you are my two cents.

I am currently reading Microsoft SQL Server 2008 Management and Administration – then I have SQL Server Forensic Analysis on my shelf, not to mention the books I have preordered from amazon :-)