Posts

Showing posts with the label SQL 2012

Attach AdventureWorks 2012

Image
Quick and easy, but I see people in forums are asking about it... You may download the .MDF file from here: http://msftdbprodsamples.codeplex.com/releases/view/55330 I'd typically download and save it with the rest of the data files, maybe at the default location or any other drive if you prefer. The default location would be: C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA Then, right click on your DATABASES under your server name and select ATTACH Then you'll get the following screen, where you would normally navigate to the download directory and select the advntureworks2012.mdf file. After you click on OK, you will see that the log file is missing and SQL server will display "Not Found", just highlight the log file and click on remove, then OK. You're done!! attached ans ready for testing...

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...

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...

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 ...

SQL Server 2012 RTM Cumulative Update 1

Microsoft has release the SQL Server 2012 RTM Cumulative Update 1, the Update contains 53 hotfixes for SQL server 2012. You may download it from http://support.microsoft.com/kb/2679368/en-us The update needs to be requested and delivered to your e-mail inbox, it comes in 3 self-extracted zip archived files. 1- Data-Tier App Framework (446570) 2.9 MB 2- PowerPivot for Excel ( 446571) 122 MB 3- SQLServer2012-KB2679368-x64 ( 446572) 475 MB Please remember to test before deploying to your production servers :)

T-SQL Tuesday #029 –SQL Server 2012 useful feature!

Image
Well, this is my first time to participate in the T-SQL Tuesday, and I'm honored to talk about a new SQL server 2012 feature, and I hope I can do it more often.  SQL 2012 is really a major release and rich full of features, but as an ETL developer I'll pick SSIS as my candidate to demo and share my happiness about one new feature. It really saved me headache and made me say 'Thanks Microsoft' when I heard that it's finally here!  it might sounds simple but it was really a big deal in SSIS. The feature is the new and improved Flat File Source , it now can support ragged uneven number of columns!! yes! finally they thought about it..... Before if you had a flat file that has uneven column numbers, you're out of luck!! you need to use a script task, or read it as one line and do some monkey work or even use bulk insert with the annoying format file to skip a column!! Or use a community task such the " Delimited File Source " oh my god! I remember...

71-467 Review, Design Business Intelligence Solutions w/MS SQL Server 2012 - 071-467

I was one of the first fortunate people to take the 071-467 beta exam (Design Business Intelligence Solutions w/MS SQL Server 2012), using the free SQL 2012 Beta vouchers. Check this link to see what's covered in the exam and get idea of what I'll be talking about http://www.microsoft.com/learning/en/us/exam.aspx?id=70-467 As the name of the exam states, Design Business Intelligence Solutions w/MS SQL Server 2012, it was mostly about every business intelligence product that Microsoft has, you need to be familiar with a variety of tools, starting down from Excel SSRS, SSIS, SharePoint, PerformancePoint and up to SSAS (Analysis Services) BISM and Tubular modes. I must admit that exam was hard and I didn't had the wide knowledge for all these tools and not even much experience about SSAS tubular mode.  It uses a totally different approach than any other SQL server exam that I've taken in the past, it consists of 3 separate cases and 31 multiple choices questions. ...

You must use the Role Management Tool to install or configure Microsoft .NET Framework 3.5 SP1

Image
While installing SQL server 2012 RC0 on a Windows server 2008 R2 machine You might get an error telling you to install .Net 3.5 SP1. Although I see it installed and did all the windows updates and .NET 4.0 is even installed. So when you go to the download site and try to install it. http://www.microsoft.com/download/en/confirmation.aspx?id=22 You get another error.... It seems that Windows server 2008 R2 comes pre-installed but not configured or enabled. You just need to go to Sever Manager ---> Features--->Add a feature .  and enable it... Or run that command... %windir%\system32\ocsetup.exe NetFx3   to configure it too. Hope that helps someone...

There was a failure to validate setting CTLRUSERS in validaton function ValidateUsers.

You might get that error while installing SQL server 2012, it's when you select a non domain user while in the Distributed Replay Controller step. You need to choose a domain user or no user at all...Hopefully they improve that error MSG to a meaning error in future releases :) TITLE: SQL Server Setup failure. ------------------------------ SQL Server Setup has encountered the following error: There was a failure to validate setting CTLRUSERS in validaton function ValidateUsers. Error code 0x85640004. For help, click: http://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft%20SQL%20Server&EvtSrc=setup.rll&EvtID=50000&EvtType=0xFB87BFDA%25400x601E39D7 ------------------------------ BUTTONS: OK ------------------------------