Wednesday, June 26, 2013

Permission denided on sp_send_dbmail

I’ve come across this issue where an dbmail task failed inside ssis

After troubleshooting, it turns out the credentails inside the connection manager was not in the msdb db and not a member of databasemailuserRole

Detailed info below:

Link: http://msdn.microsoft.com/en-us/library/ms188719(v=sql.105).aspx

This topic describes how to troubleshoot an error message stating that the user attempting to send Database Mail does not have permission to execute sp_send_dbmail.

The error text is:

EXECUTE permission denied on object 'sp_send_dbmail', 
database 'msdb', schema 'dbo'.

To send Database mail, users must be a user in the msdb database and a member of the DatabaseMailUserRole database role in the msdb database. To add msdb users or groups to this role use SQL Server Management Studio or execute the following statement for the user or role that needs to send Database Mail.

EXEC msdb.dbo.sp_addrolemember @rolename = 'DatabaseMailUserRole'
    ,@membername = '<user or role name>';
GO
 
 

Monday, June 24, 2013

SSIS package template

SSIS package template

http://www.mssqltips.com/sqlservertip/2841/creating-ssis-package-templates-for-reusability/

 

Once you are done with creating the basic structure of the package and have added the common components, you need to save a copy of this package at the following locations based on the version of SQL Server you are using:

For SQL Server 2005
<<Installation drive>>:\Program Files (x86)\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\ProjectItems\DataTransformationProject\DataTransformationItems

OR

<<Installation drive>>:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\ProjectItems\DataTransformationProject\DataTransformationItems

For SQL Server 2008

<<Installation drive>>:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\ProjectItems\DataTransformationProject\DataTransformationItems

OR
<<Installation drive>>:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\ProjectItems\DataTransformationProject\DataTransformationItems

save a copy of this package at the following location based on version of SQL Server you are using

For SQL Server 2012
<<Installation drive>>:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\ProjectItems\DataTransformationProject\DataTransformationItems

OR
<<Installation drive>>:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\ProjectItems\DataTransformationProject\DataTransformationItems

You need to specify the drive location where Business Intelligence Development Studio (BIDS) or SQL Server Data Tools (SSDT) has been deployed. Please note, as BIDS or SSDT runs locally on client machine, you need to copy the template package to the above location on all the development machines you want it to use.  For this example we are naming the template package "SamplePackageTemplate.dtsx".

Simple Password Based Rijndael Encryption in .NET (C#)

 

This blog tells you how to encrypt and decrypt data

Link is here

http://blog.osamamirza.com/2011/10/simple-password-based-rijndael.html

Friday, June 21, 2013

How to add new package store under Stored Packages

 

In order to create a new folder called ‘My Packages’

1. Find the file called MsDtsSrvr.ini.xml in C:\Program Files\Microsoft SQL Server\100\DTS\Binn

2. Use a notepad and add the code in underline. Also make sure folder does exist. In this case c:\SSIS does exit.

 

3. Save and make sure you restart SSIS engine via Sql Server Configuration Manager

 

<?xml version="1.0" encoding="utf-8"?>
<DtsServiceConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <StopExecutingPackagesOnShutdown>true</StopExecutingPackagesOnShutdown>
  <TopLevelFolders>
    <Folder xsi:type="SqlServerFolder">
      <Name>MSDB</Name>
      <ServerName>.</ServerName>
    </Folder>


    <Folder xsi:type="FileSystemFolder">
      <Name>File System</Name>
      <StorePath>..\Packages</StorePath>
    </Folder>


    <Folder xsi:type="FileSystemFolder">
      <Name>My Packages</Name>
      <StorePath>C:\SSIS</StorePath>
    </Folder>


  </TopLevelFolders>
</DtsServiceConfiguration>

 

image

Monday, June 3, 2013

BIDS 2008 and TFS 2010

how to connect BIDS 2008 to TFS2010 for version control?


Check this blog:

http://microsoft-ssis.blogspot.ca/2012/04/ssis-2008-with-team-foundation-server.html

 

three steps1:

1. Install Team Explorer

2. install "Microsoft Visual Studio 2008 Service Pack 1" (even if it was already installed before step 1). You can download it here.

3. Thirdly install "Visual Studio Team System 2008 Service Pack 1 Forward Compatibility Update for Team Foundation Server 2010", which you can download here. This Service Pack let's you connect to TFS 2010.