Posts

Showing posts from May, 2012

SQL Server Import and Export Wizard step by step explained. Building your first SSIS package.

Image
Hi, Today I will be talking about the SQL Server Import and Export Wizard, which is one of the easiest ways to develop your first SQL Server Integration Services (SSIS)  package, and it so useful to export and import data from multiple sources to a various destinations, varies from relational database tables to text files. Through the demo I will be using SQL Server 2012 on top of a Windows 2008 Sever, but the wizard is exactly the same as it was in erlier versions. You start by learning the different ways to get the wizard up, and it is straight forward and can be launched from various locations 1-from the run commend or the command prompt, you might type "DTSWizard.exe" and hit enter, which will get the wizard up and running..  2-By right click on your database---> Tasks--->"Import Data" or "Export Data"  3-From SQL Server Data Tools (SSDT) , right click on "SSIS Packages" and select "SSIS Import and Export Wizard...

Change SSIS 2012 Catalog DB encryption algorithm

Hi, By default, when you install the SSIS catalog, the encryption algorithm is   AES_256.. You can read about the various configurable options here.. http://msdn.microsoft.com/en-us/library/ff878147.aspx To change it, you'll need to get the database in a single user mode, then use the  "catalog.configure_catalog" SP to change it. Yes you'd use T-SQL to control that now... you may read more about it here http://msdn.microsoft.com/en-us/library/ff878042%28v=sql.110%29.aspx so the whole script would be.. select * from catalog .catalog_properties ALTER DATABASE SSISDB SET SINGLE_USER WITH ROLLBACK IMMEDIATE ; GO catalog .configure_catalog 'ENCRYPTION_ALGORITHM' , 'AES_192' select * from catalog .catalog_properties ALTER DATABASE SSISDB SET MULTI_USER; GO Please note that you need to be a SSIS_Admin or SysAdmin to be able to do that... Hope that helps someone...

A DBA’s Ethics T-SQL Tuesday #30

Image
Hi, this month's T-SQL Tuesday is hosted by Chris Shaw, and the topic is around the DBA's ethics at the work place... The database administrator (DBA) is the person whose responsible for managing the relational database and its access permissions. Well, first of all I am not a DBA and never been one, But I am a developer, and I must admit that I share the same ethics and responsibilities towards the data that I deal with.  The ethics here are cross all  database professionals whose has access to the back end of the company's data, whom can access sensitive information about patients in health care organizations, or sensitive financial information about clients in financial organizations. Every database professional should be striving for technical excellence to the best of his/her knowledge. they should and constantly invest in their career by learning and gain new skills. Privacy and confidentiality is the most important.  Obtaining permiss...

SSIS 2012 - New expression language functions(ReplaceNull,Left, Token, TokenCount)

Image
SQL Server 2012 is full rich of new features for SSIS, really many new useful stuff, such as the script task debug and the renovated Flat File Source, that could handle uneven number of columns... Today I am going to demonstrate 4 new SSIS expression functions... 1-Left Which exactly the opposite of the RIGHT functions, and similar to the LEFT function in T-SQL, which allows you to grab a number of characters from your string, starting at point zero or in other words from the LEFT side of the string. http://msdn.microsoft.com/en-us/library/hh231081.aspx 2-ReplaceNull Which as the name means, it replaces your NULL values, with another string expression.  Before you would use ISNULL which returns Boolean injunction with a condition to change the value. ISNULL(LastName) ? "Unknown last name":LastName  http://msdn.microsoft.com/en-us/library/ms141184.aspx http://msdn.microsoft.com/en-us/library/hh479601.aspx 3- TokenCount Which allows you to sep...

How to add a TABLE to blogger.com, blogspot.com

Image
Hi, Today I got the need to insert a table in one of my posts, I am lazy, and usually get around it by using a screen shot of my data, usually it's in excel or a SQL table, so it's already formatted in a table... But for that specific post, I decided to dig around how to insert a table into my post... There are several ways...you need to be a little familiar on using HTML or use an HTML editor, such as Microsoft Expressions, which I'm using... All what you need to do is to click on HTML from the top bar... And that will allow you to edit the HTML behind you post.. If you have a HTML editor, your solution will be by creating the table on your HTML editor, copying the code and pasting in your HTML post. Or use a sample snippet code such as <style type= "text/css" > .nobrtable br { display : none } </style> <div class= "nobrtable" > <table border= "2" bordercolor= "#0033FF" style= "bac...

SSIS Strip digits from a string.

Image
Today's scenario is a "File Name" that contains digits and need to strip these digits out, it can be at the beginning of the string, middle or at the end. If you are wondering, why there's digits! it's the size of that file and only comes at the end of the string, but just to demonstrate various scenarios that you might encounter. For our demo, I'll create a table, has 2 columns, an ID and a FilePath column. the output will be 4 columns, our 2 input columns along with 2 new columns, FileSize and CleanedFilePath.  Of course you can overwrite your FilePath with the digits stripped one. Let's run the below script to create the test demo and insert 3 test rows. SSIS Strip Digits <> 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 /* Create Table */ IF NOT EXISTS ( SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N '[dbo].[STripDigits]' ) AND type in (N 'U' )) BEGIN ...