Tuesday, December 3, 2013

SSIS:WEB SERVICE

Source: SSIS Script Component Transformation Video SSIS 2012

1.Control Flow:Full Business Logic.

2.Data  Flow:

i.Real "Source" to "destination" data flow happens.

ii."Transformations" before inserting into Destination.

OLEDB Source

Script Component

Derived Column (enable "Data Viewer")

3.In this lesson "Script Component Transformation" example is shown.

 i.In "Script Component Transformation" , one can choose as "Source","Destination" or "Transformation".

 ii.Choose "Transformation".

Script Language:Visual Basic 2010
                                      or  Microsoft Visual C#  2010

Mapping
Input
Output
Create any "output column"

Choose button "Edit Script" -

        Navigated to "Microsoft Visual Studio".

Public strvar1 As String
Public strvar2   As Decimal


Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer)

'Add Code here

If  condition Then

.....
Else
....

End If
.....
End Sub

End Class
------------------------------------------------------------------------------------------------------------

Source:Consuming a web service in SSIS 2

Data Flow:

 Script Component( prompts: choose "source")

  Right Click( on above component)

  1.(Custom Properties:script Language: dropdown(Microsoft Visual Basic 2005,Microsoft Visual C# 2005)- click on "Edit Script" button,it lauches the Visual Studio.

i.Define "Output Column":what the webservice returns (name,city etc)


Note:In 2008 version the "Script Language" is new)(Lauching Visual Studio is also new).


 2.( takes to Visual Studio: Reference:"Add Web Reference" (prior to this :copy the url from web service) - click(Add Reference)

  i.in visual studio the main.cls click the method(CreateOutputRows)
    To use it ass

     using (click on object explorer tab, copy the webservicename)

     using system.xml;

     ...
     Note:Inside method(CreateOutputRows)

           Note:Define the object of that WebService like

           train mytrain= new train();

  string myresponse= mytrain.gettraindestination(xyzparam);

Note:In 2008 version "Add Web Reference" also new.
Note:It adds as a 'Proxy Class',enable it communicate with that Web Service.

Run to build it.

Back to BIDS.

3.Add component "Row Count" and chk. Variable and a "Data Viewer", see the data.

------------------------------------------------------------------------------------------------------------

Source:SSIS 2008 Series:Using Webservices in SSIS Packages

1.Start BIDS:just create a SSIS project.
2.In Visual Studio: create a Project ->"ASP.NET Web Service Application" project.
  i.change say the message

...
[WebMethod]

public string Hello World( )
{
return "Hello World";
}

a. Run the package , it will return the XML

  ii.The Web Service is created

      Service1
HelloWorld
Invoke

Click on invoke , will show the string.

Change the url adding at the end "WSDL" : http://localhost:55345/Service1.asmx?WSDL

give the whole - XML

        Click on the "Service Description"  , save it as a link ( in a folder WebSrvr.asmx)

Note:Generally before using the Web Service , it's hosted in IIS, but for this example (Visual Studio running & Dev. running )



3.In BIDS create new connection :(HTTP)

  Server URL:WSDL path( the step 3 link which is saved , rename it to WSDL)

  ( you can use proxy but for now the above)

4.Now in "Control Flow" put task "Web Service Task" , specify the connection (HTTP one), specify the WSDL file,set "OVerwriteWSDLFile:True"

Input:

Service:Service1

Output:

OutputType: File Connection ( Can be "variable" also.)

Create File

Note:If you put in variable using "Script Task" - echo the variable value.


------------------------------------------------------------------------------------------------------------

Thursday, November 21, 2013

SSIS:BI Env.:Performance Tuning SSIS


SQL Server Integration Services SSIS Best Practices



Refer Source Video: Free SQL Training - Performance Tuning SSIS

Graphically deselecting column does not take out column, in SQL query specify the columns.Its a Client Side filter, so it pulls all data across network.

oledb source: Table or View
SQL Command:
Select * From tablename
                        [ instead for performance: Select col1,col2 from tablename]

Data Flow Task
Source - Advanced editor - Input Output Properties - column:Fastparse

For each individual column the above step need to be repeated.Fastparse will trust data being correct and load , it improves performance a lot but if any row bad then it will fail and need to rollback.

--
Refer Source Video:SSIS & SSAS BI Platform Performance Tuning

OLTP -(SSIS) or TSQL ->DW->SSAS cube<-Reports(Share point Portal,Excel etc.)

SSAS Cube in separate server  for cube to process faster.
Using TSQL fine , not necessarily only SSIS component.
Source - 'FastParse' can be used if  data is correct.
Packet size- SQL Server 2008 ( 2 types compressions: datatype ( Select data fast , Insert slow: integer takes 1 byte instead of 4 bytes) Page Compression:WinZip does for files.


Wednesday, November 13, 2013

SQL:SQL FULL OUTER JOIN-SQL UNION -- SQL UNION ALL

Refer the Source Video: SQL Server join :- Inner join,Left join,Right join and full outer join

Full outer join=Result of (Inner join (common records) + Left Outer Join + Right Outer Join)


Source: SQL FULL OUTER JOIN Keyword

SELECT Customers.CustomerName, Orders.OrderID
FROM Customers
FULL OUTER JOIN Orders
ON Customers.CustomerID=Orders.CustomerID
ORDER BY Customers.CustomerName;

Note: The FULL OUTER JOIN keyword returns all the rows from the left table (Customers), and all the rows from the right table (Orders). If there are rows in "Customers" that do not have matches in "Orders", or if there are rows in "Orders" that do not have matches in "Customers", those rows will be listed as well.


Source: SQL UNION -- SQL UNION ALL 

SELECT City FROM Customers
UNION
SELECT City FROM Suppliers
ORDER BY City;

Note: UNION cannot be used to list ALL cities from the two tables. If several customers and suppliers share the same city, each city will only be listed once. UNION selects only distinct values. Use UNION ALL to also select duplicate values!

SSIS:Performance Tuning


SQL Server Integration Services SSIS Best Practices



Refer the Source Video:SSIS Performance Tuning

FULL RECOVERY - lot of  logging done

DW project - generally Simple Recovery Mode (minimal logging)


Simple Recovery it loads lot of rows in sec.

Control Flow  Data Flow

Control Flow:

              Create DB 
                  {notes:Create DB ( Execute SQL Task:SQL Statement )}
                   {notes: ALTER DATABASE [DBname] SET RECOVERY FULL

              Create Table

Data Flow:


Flat File Source ( 6,000,000 rows)

OLE DB Destination

notes:
CREATE DATABASE (Transact-SQL)

  Create DB ( Execute SQL Task:SQL Statement )

USE [master]
GO
IF DB_ID(DBNAME) IS NOT NULL
BEGIN
ALTER DATABASE [DBNAME] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
DROP DATABASE DBNAME;
END
GO

CREATE DATABASE [DBNAME]
CONTAINMENT = NONE
ON PRIMARY
(NAME = N'DBNAME', FILENAME = N'C:\ProgramFiles\Microsoft SQL Server\MS SQL11.MSSQLSERVER\MSSQL\DATA\DBNAME.mdf', SIZE =10 MB, MAXSIZE = UNLIMITED, FILEGROWTH = 1 MB)

LOG ON
( NAME = N'DBNAME_log', FILENAME = N' C:\ProgramFiles\Microsoft SQL Server\MS SQL11.MSSQLSERVER\MSSQL\DATA\DBNAME.ldf', SIZE = 2 MB, MAXSIZE = 2000GB, FILEGROWTH = 10%)

GO
GO
ALTER DATABASE [DBNAME] SET RECOVERY FULL
-----------------------------------------------------------------------------------------------------------

Source: SSIS Performance Tuning Simple Load Part 2 Database Growth SSIS

In the CREATE DATABASE  statement if  the FILEGROWTH  is increased  say 20MB or 100MB , performance improves.

-----------------------------------------------------------------------------------------------------------
Source:SSIS Performance Tuning Simple Load Part 3 Initial Database Size 

In previous video using the "DBGrowth"  which refer to "FILEGROWTH" the performance improved.The table that being loaded is below  the "FILEGROWTH" so it will not impart on performance.

By changing the "Initial Database Size" which refers to "SIZE"  , it will change the performance. 

-----------------------------------------------------------------------------------------------------------
 Source:SSIS Performance Tuning Simple Load Part 4 BI vs Enterprise Edition

In Enterprise Edition its faster.  
-----------------------------------------------------------------------------------------------------------
Source:SSIS Performance Tuning Simple Load Part 5 Commit Size

Data Flow:

OLE DB Destination
-----------
OLE DB Destination Editor:

             Configure the properties used to insert data into a relational database using an OLE DB provider.

[Connection Manager
Mappings
Error Output]

Specify an OLE DB Connection manager, a data source, or a data source view, and select the data access mode.If using the SQL Command access mode, specify the SQL Command either by typing
the query or by using Query Builder. For Fast - load access, set the table update options.

OLE DB Connection manager:
oledb-LoadDatabase

Data access mode:
Table or View - fast load

Name of  the table or the view:
[dbo].[Tablename..]

                        []Keep Identity [*]Table lock
[]Keep nulls []Check Constraints

Rows. per batch:

Maximum insert commit size: 0 ( changed from a higher number to 0) ( it means 1 transaction)[1 transaction: it will commit all rows, in 1 time{Logsize,TempDB size will be  bigger]
[Caution: Table having "Clustered Index"  won't work.][Only for heap table(having no indexes)]

View Existing Data
----
~Source:Making Fast Load really fast on clustered indexed tables with SSIS

Moreover, as using MICS parameter leads to a dramatic performance degradation, I think that the OleDb destination adapter should issue a warning if both ORDER and MICS parameter are set so to make the programmer think twice before using them together.

~Source:Batch Sizes, Fast Load, Commit Size And The OLE DB Destination

Rows per batch:
This setting affects the performance and commit semantics of the SQL engine, but doesn’t affect things on the SSIS side. Lowering this value does not affect the number of times SSIS commits data to the server.

Maximum insert commit size:
Enlisting the Data Flow task in a transaction also has the same effect as setting FastLoadMaxInsertCommitSize  = 0.  All rows will be committed or rolled back at the end of the Data Flow Task.

Beware
Setting the Maximum insert commit size property to a low value will cause a lot of overhead on the destination as the rows will be committed much more often.

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
SSIS Performance Tuning Simple Load Part 6 Packet Size SSIS 2012 Video Example

Ole Db -right click -  All - see  "Packet Size:0" - by default it means 4kb. Change it to 32KB which is maximum, if the value disappears then its on the "Connection" , choose the "project.param" , choose connection
string and specify  "Packet Size" 

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Source: SSIS Performance Tuning Simple Load Part 7 Row vs Page Compression SSIS 2012 Video Example

Connect to Server

Server type: Database Engine

Choose the Database->Table(right click "Storage" - "Manage Compression" - change Compression type "Page"

Next screen "Data Compression Wizard" , Run immediately ,

Task Manager - Look at "Performance", "Write Speed" is less , "Read speed" as usual.

Conclusion:Compression "Slows down" the load into "heap" table. 

Observation:"Row" Compression is bit faster , "Write Speed" is little faster , "Read speed" little better

But any how "Row" Compression is slower.

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Source: SSIS Performance Tuning Simple Load Part 8 Balanced Data Distributor SSIS 2012 Video Example

Balanced Data Distributor , does parallel processing.It works like "Conditional Split" , but its more efficient.

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Source:SSIS ole db vs SQL Server Destination Simple Performance Test


OLEDB destination is faster and its recommened but in this example SQL Server Destination is faster.
----------------------------------------------------------------------------------------------------------------------------------

Friday, November 8, 2013

SSIS:Conditional Split Transformation

Refer Source Video: SSIS Conditional Split Transformation Part 1 Video Example SSIS 2012

2005,2008,2008 R2, 2012 - same. No much difference.
DataFlow

OLEDB DataSource:

SQL Command: query ( UNION ALL  of  two resultset)

Derieved Column: To view the values , "Condition" , column define the condition for spliting. The "Order" of  the condition important, accordingly it will execute.

Why "Order" is important, see in the below video.

Refer Source Video:SSIS Conditional Split IS NOT NULL Part 3 Video Example SSIS 201

If you have NULL  value then the Conditional Split Transformation , will stop. If  one adds like ISNULL(columnname) as the codition , it still will not work and other condition it will not run until the "Order" the ISNULL having condition is first.

Refer Source Video:SSIS Conditional Split Default Output Name Part 2 Video Example SSIS

"Conditional Split Transformation" Editor, the rows that do not meet any condition defined in the condition criteria will be lost, to capture it , in "Default Output name:" give a name and in Data Flow add a Derived Column & add , so those rows are captured.

Refer Source Video:SSIS Conditional Split Configure Error Output Part 4 Video Example

If  you have NULL value or for any condition you want those row to fall into another category then in the "Conditional Split Transformation" , there is a "Red Arrow" in that you specify the "Redirect" output of conditions , thats the same you see in "Configure Error Output", so using a 'Derieved Column" , one can see the error rows.

------------------------------------------------------------------------------------------------------------
Refer Source Video:Conditional Split Transformation In SSIS

If  in "Condition Split Transformation" one want to split data and put into different sources like one to "Flat file" and other set to  any other database.

------------------------------------------------------------------------------------------------------------

Wednesday, October 16, 2013

SSIS:Logging

Refer the Source Video: SSIS:Logging

Right click in Package - Logging

Sql Task

Containers: Flexibility to choose a task
                  ( allows task wise track error messages.)

Logs     Details(Event wise error messages: On Error, OnPostExecute,OnPreExecute)

Provider Type:
SSIS log  Provider for windows
SSIS log  Provider for Text files (.txt)
SSIS log  Provider for XML files (.xml)
SSIS log  Provider for SQL Server
SSIS log  Provider for SQL Server Profiler (.trc) {Only for 32bit, change in right clicking on Project Explorer,,)

Mostly used:Windows & SQL Server one

Windows see in Windows Event Viewer:
Select * from SYSSSISLog 

Tuesday, October 15, 2013

SSIS:Deployment using Project Deployment Model

Refer Source Video:SSIS 2012 Deployment using Project Deployment Model Video

--------------------------------
Prior:How to create a Catalog?
----------------------------------
Project Deployment Model  is new in 2012:
Folder file names: Package,Project.params,SSIS Project Deployment Model,SSIS Type Integration Services project file
----
Method1:Right click on project-choose Deploy
Server:Database Engine Server Name ( where SSISDB Catalog is their).
                        Path:SSISDB\Test

Copy the commandline parameter to Notepad.
The project is deployed to Database Engine(--verify)
Microsoft SQL Server Management Studio:
  Integration Services Catalogs-SSISDB-Test-Projects-SSIS Project Deploment Model-Packages-Package.dtsx
  SQL Server Agent
--
After running it the Bin\Deployment \ folder is created with file SSIS Project Deploment Model.
-----
Method2: Right click on Project Explorer->Build
Prior to choosing "Build" remove the Bin & Object folder

It will create Bin\Development , creates SSIS Project Deploment Model (Integration Services Deployment File) [Instead of running this , move to another Server & Run from their]
just double click the file it will run the wizard.( Same as Method 1 wizard)

Method3: Running from Commandline (---Notepad)
cd %ProgramFiles%\Microsoft SQL Server\..\Binn
isdeploymentwizard.exe  whatever copied for commandline

--Project deployment method whole Project is deployed not package wise.If any one modifying a package , make sure that latest one is compiled.

Monday, October 14, 2013

SSIS:Deploying Package

Refer the source Video:Deploying Package

SQL Server 2008 :Deploy package in 2 ways File system,MSDB.
Right click->Package Configuration->(check) Enable package configuration ->
Configuration type:XML configuration file 
( )Specify configuration settings directly
   Configuration file name: create a file 

( ) Configuration location stored in environment variable

Specify what values we want to read from the configuration file.Map the "Server Name" Value & then "Table Name" Value.

For creating Deployment Utility:Choose Solution->Right click->Properties->"Deployment Utility"  CreateDeploymentUtility:True

When from Menu->Build , it creates in the Path , mentioned in "Full Path"
..\bin\Deployment folder all files are their. .dtsx files, .SSISDeploymentManfest, .dtxConfig 

File system:
-----------------
i.Double click on .SSISDeploymentManfest , it will start the package installation wizard.(check)-File System Deployment  - SQL Server deployment 
   ( stores in MSDB database , burden on Sql Server)
just shows the   .dtxConfig file parameters.
ii.Create a job: SQL Server Agent - job - New Job  type:SQL Server Integration Services Package
Package Source: Choose "File System"

After Finishing steps , right click on job ->Start the job.
-------
MSDB:
---------
i.Double click on .SSISDeploymentManfest , it will start the package installation wizard.
(check)-File System Deployment  - SQL Server deployment 
   ( stores in MSDB database , burden on Sql Server)
just shows the   .dtxConfig file parameters.
ii.Create a job: SQL Server Agent - job - New Job  type:SQL Server Integration Services Package
Package Source: Choose "SQL Server"

Check on MSDB database that the job is created.After Finishing steps , right click on job ->Start the job.


-------

Thursday, October 10, 2013

SSIS:Package Configuration

Refer Source Video: SSIS : Package Configuration
Package Configuration
1.)XML Configuration
a.) Direct
b.) Indirect ( Using Environmental Variables)
2.)Environment Variables
3.)SQL Server Configuration
4.)Parent Child Configuration
5.)Registry Entry
------
what is the basic need for package configuration.:SSIS package go through development env. , it has to go through testing phase,uat & then to production.That mean port SSIS to the Production.Go To go to BIDS & change the connection.Microsoft allows to do in more easier way.The "connection string" , variable values," script tasks "to point to right database -

1.Right click on Package workspace Area - Choose "Variable" -  2.SQL query analyzer:

Select * from Production..TransactionHistory where ProductID=799 and TransactionDate<>'2007-09-01 00:00:00:000'

3.The Package when runs just shows Count of Orders for a "Product" for a particular "date".

Environment Variables:Generally not used. 
-------------------------------
My Computer->Properties->system->Advances->Environmental Variables

a.Create an "Environmental Variable" : ProductId  Value:799
b.Close the open session of "BIDS" , reopen the .sln (solution) In the "Package" window, right click anywhere choose "Package Configuration" , choose check box "Enable package configurations".

It opens a wizard , add a new package configuration.
Configuration type:Environment Variable
Load all Environment Variables: choose :"ProductId" , then Map it to,
"ProductId" Filter
Package
Variables
...
ProductId_Filter
 - properties

Now the value shows "799" , now after running the package it will take the Environment Variable value.At the runtime it does not take the "Package Level Variable" value but the "Environment Variable" value.

Registry Entry: Not at all used.
-------------------
1.start-run-regedit-
HKEY_CURRENT_USER- add a key-say "SSIS",right click on it,New,String Value-call "Value"
Value Data - '2007-09-01 00:00:00 000'
right click anywhere choose "Package Configuration" , 
It opens a wizard , add a new package configuration.
Configuration type:Registry Entry
Registry Entry:SSIS

It should map to the DateTransaction_Filter - Value
If you change any value in Environment variable, need to reload the Environment variable again.
--------------------
Through Environment variable : Dynamically changing variable values at run time.
----------------------
XML Configuration:That is generally used.
--------------------------
a.)Direct b.)Indirect
a.)Direct :right click anywhere choose "Package Configuration" 
Configuration type:XML configuration file
-Specify configuration settings directly
Configuration file name:c:\temp\ abc.dtsconfig
       Connection Manager-Database Connection
Map:ConnectionString of  Database(not variable)

This shows the abc.dtsconfig file.Open it to see its XML file defining the connection.
In this file change the Catalog: name which is the Database Name , then running
the SQL will show records found from that database.
Right Click on Databaseconnection: can see the Database name whats in the XML
file abc.dtsconfig
b.)Indirect:Copy the path of the abc.dtsconfig  from Configuration file name:c:\temp\ abc.dtsconfig
Create an environment variable:ConfigPath and it will have info. where this abc.dtsconfig
file is which is holding connection information to database.

As the New Env. Variable is added, need to restart the package.

right click anywhere choose "Package Configuration"  - when tried to edit it gave error,

so removed that and created another and 

Configuration location is stored in environment variable:ConfigPath
--------------------------
3.)SQL Server Configuration

Remove the "Environment Variabale" , "Registry Entry" Configuration from "Package Configuration" .

Only remaining the Configuration type:XML configuration file (b.)Indirect , which has
the connection information in an Environment Variable that points to the path
"abc.dtsconfig".

right click anywhere choose "Package Configuration" 
Configuration type:SQL Server
New ->Database->specify "Server name" "DataBase":

You will see a New Table.In the next window.

CREATE TABLE [dbo].[SSIS Configuration]
(
ConfigurationFilter   NVARCHAR[255] NOT NULL,
ConfigurationValue   NVARCHAR[255]  NULL,
PackagePath     NVARCHAR[255] NOT NULL,
ConfigurationValueType NVARCHAR[255] NOT NULL
)

Remove the gap between the tablename

CREATE TABLE [dbo].[SSISConfiguration]
(
ConfigurationFilter   NVARCHAR[255] NOT NULL,
ConfigurationValue   NVARCHAR[255]  NULL,
PackagePath     NVARCHAR[255] NOT NULL,
ConfigurationValueType NVARCHAR[255] NOT NULL
)

This will create a table and this one holds all values that is specified in the Environment
variables. So for moving the configuration details from "Dev" to "Test" or "Production"

The script generation sql of this table and the Environment Variable details to be given
to the person who is moving it.

Configuration filter:VariableDemo { in the screen : Configuration type:SQL Server }

Map: ProductID,TransactionDate { Now as the Environment Variable value deleted , it 
        takes the variable values).
--------------------------
Briefnote:In the "Package Configuration" , specifying "connection" and Mapping "Variables" package level, to take value or it takes from environment variable.
The connection parameter details file path can be in a environment variable.
In 'SQL Server Type" : SSISConfiguration table holds all variable values.
--------------------------
Query analyzer: Select * from SSISConfiguration

Configuration filter:VariableDemo  thats defined above uniquely tells this package filter
and PackagePath holding the variable values name.
--------------------------
SSIS Package i.e dtsx file open in notepad , you will see its a XML file.
--------------------------
UPDATE  SSISConfiguration SET  ConfigurationValue= WHERE  PackagePath=
AND ConfigurationFilter=
--------------------------
ConnectionManager:
DatabaseConnection
DEV.TestDB -> the new value in the table "SSISConfiguration" and runs the package.
--------------------------
For Migration:Actually the values in Environment Variables.

Choose DB:rightclick->Task->Generate Script
Choose Table 'SSISConfiguration" , 
Table/View:Option choose "Script Data" -> True
Then choose Script to Query Window.

It will show Create statement for  SSISConfiguration table and even the Insert statement
for the variables.The Deployment person will run in that environment say Production.

---
Guideline:Just only the 'Environment Variable" where things need to change only.

So the  3.)SQL Server Configuration XML configuration file (b.)Indirect , which has
the connection information in an Environment Variable that points to the path
"abc.dtsconfig".
----

Monday, October 7, 2013

SSRS:Deployment - fixing Rsaccess denied

------------------------------------------------------------------------------------------------------------------------


Refer the Source Video:Deploying SSRS reports 2008,R2 and 2012


------------------------------------------------------------------------------------------------------------------------


Summary:

1. In the "Reporting Services Configuration Manager" 

"Report Manager Url" <- using the url the user can see the report.

"Web Service Url" <- location where report is deployed.

(copy this "Web Service Url"  and in the report design solution explorer , properties,

, in the Target Url , paste it  & deploy the report)


2.For "fixing Rsaccess" , in the IE  options , in 
i.advanced tab "Windows authentication" selected, 
ii.in "local intranet" security see the "Automatic log using current user & password" is checked.



------------------------------------------------------------------------------------------------------------------------

SolutionExplorer:Shared Data Sources(...rds):Shared DataSets:Reports(...rds)

Report Server Url - Webservice report url - allow to deply to that location

Report Manager Url - allow to use the report

1.Program->SQL Server Management Studio-
Analysis Services
Configuration Tools
-Reporting Services Configuration Manager
-SQL Server Configuration Manager
-SQL Server Error & Usuage Reporting
SQL Server Installation Center
Data Quality Services

-Reporting Services Configuration Manager
scr1:Server Name: Report Server Instance:SQL2012
scr2:-Service Account -Web Service URL -Database -Report Manager URL
-Email Settings -Execution Account -Encryption Keys -Scal-out Deployment
Current Report Server: SQL Server Instance,InstanceID,..Server Database Name:ReportServer$SQL2012,....
2.Check first the "Report Manager URL" , gives the error message
User ... does not have required permissions.Verify that sufficient permissions have been
granted and Windows Account Control(UAC) restrictions has been addressed.

[UAC thinks this user is not part of "Administrator Group". Even for users when they enter windows userid, password or active directory userid,password , ..]
a)Certain options to set in IE brower settings:Tools->Internet Options-Advanced chk:(checked) Enable Integrated Windows Authentication : Security tab:local intranet:sites:advance:localhostname appears
Security:CustomLevel:chk:Checked:Automatic logon with current username & password, close IE Start Program:IE:Run as administrator:Open the Report Manager URL

b)-Reporting Services Configuration Manager-Web Service URL (copy the Webservice Report URL)
Go to BIDS(Microsoft Visual Studio)(where we deploy our report):Open the report-Project(right click) -Properties:TargetServerURL:paste the Webservice Report URL :Right Click on Project:Choose Deploy
IE Start Program:IE:Run as administrator:Open the Report Manager URL , refresh it would show the report.

------------------------------------------------------------------------------------------------------------------------

Refer the Source Video:Report Deployment

------------------------------------------------------------------------------------------------------------------------

Summary:

1.In the "project" properties , Target Url is  the "Report manager url" , get that from configuration tool and paste it. Then deploy it.

2.In the report manager after deploying the report, when one click on "Data Source",

generally a  "domain\administrator" specified and the , check the "windows credential" to be used.

The user when try to run the report it uses the "administrator" account , that has access to the
report server.


------------------------------------------------------------------------------------------------------------------------

HR Reports (Project)
-Shared Data Sources
   -dsetAdventureWorks
-Reports

1."DataSource" & "Report" need to be deployed to the Server.
2.If you right click on "Shared Data Sources" & right click "Deploy" , it won't work as the Project "HR Reports" ( to point to the Server in Question).
a.Right Click on "HR Reports" , choose properties
Configuration Properties
Deployment
OverwriteDataSources:False{ if the shared DataSource,connection parameter changed,difficult}
TargetDataSourceFolder : Data Sources
TargetReportFolder: HR Reports
TargetServerURL:
(http://Servername/reportServer) - //localhost:8081/reportServer)
note1:{ instead of localhost if there is ServerName then will be used in TargetServerURL)
note2:In a Server,multiple Services are running , port80 generally WebService,so in configuration
setting 8081 as Report Server.
b.Highlight the  Project "HR Reports" , "Deploy" - it builds the project.One can indivially choose
"DataSources" and Reports to deploy too.
c.To verify: Goto Report Server:http://localhost:8081/Reports/Pages/Folder.aspx
See on the screen : Data Source      HR Reports
i.Click on "Data Source" -
in Connectstring - if test server mentioned change to point to right one, Catalog (<- Database)
Name:
Description:
Data Source Type:
Connection string: Data Source=..;Initial Catalog=AdventureWorks
Connect using:
-Credential supplied by the user running the report
    Display the following text to prompt user for a user name & password
    Use as windows credentials when connecting to the data source
-Credentials stored securely in the report server
  User name:    Password:
   -Use as Windows credentials when connecting to the data source
   -Impersonate the authenticated user after a connection has been made to the data source
-Windows integrated security
-Credentials are not required {Unsecure}
notes1:
{-Windows integrated security
Administor can run.Windows Integrated but another user  wonot be able to}
notes2:
{-Credentials stored securely in the report server
User name: domain\administrator Password:
-Use as Windows credentials when connecting to the data source
Any user having windows credential will go via. domain\administrator
 }
Apply Move Generate Model Delete

------------------------------------------------------------------------------------------------------------------------

Refer the Source Video:Reporting Services - Configuration

------------------------------------------------------------------------------------------------------------------------

Summary:

1. In the configuration tool , "service account" , better to specify a active directory account.

2.WebService url , Report manager url

note:
2005  the port 80 runs the iis web servive.
2008  there is not iis (port used is 8081), it has it's own web service as this has clustering mechanism which is when
one server down another runs the report. 
3.Database: create the report database where report will reside.

4.Email account: domain\someaccount -> reports are emailed

5.Execution account: use an "active directory" account when jobs run it uses it.

6.scale-out Deployment: add a server
   

------------------------------------------------------------------------------------------------------------------------

start-programs

Report Server Mode: Native
But for share point to be change.

Service Account:
Use built-in account:Local System
Use another account:
For one active directory account to cater to all servicces.

2005:
2008:clustering[Fault torlance - one goes down other can start,end](not use IIS )

Web Service URL:8081
   80 - Web Service running
   21- FTP
   25-Mail
   SSL Certificate

Database:For Share Point , change

Email Setting:
     Use SMTP

Execution Account:
     For schduling (active directory)

Encryption Keys:
   sensitive information (
     Backup the key

Scale-out Deployment;
   Clustering

------------------------------------------------------------------------------------------------------------------------

SSRS:(SSRS) report with drill down functionality.


------------------------------------------------------------------------------------------------------------------------


Refer the Source url:(SSRS) report with drill down functionality

------------------------------------------------------------------------------------------------------------------------

Summary:

Create the report using "Report Wizard" , in the process it will show an option for "Enable Drilldown", after choosing it the report will have drilldown feature.

------------------------------------------------------------------------------------------------------------------------


1.Programs->BIDS->Visual Studio 2008->
File-New Project->Report Server Project Wizard (Name:)
Shows Report wizard
-Shared data source - new datasource(name,connection string "Edit" button- )
[Make Shared DataSource]
Query Builder:choose Table-columns (shows Sql query)
Tabular Matrix (choose layout)
Group-
In the Table Layout choose below options
-Include subtotals -Enable drilldowns
Formatting -

Show the Report Server name


------------------------------------------------------------------------------------------------------------------------

SSRS:Creating SSRS Subreports

------------------------------------------------------------------------------------------------------------------------


Refer the Source Video: Creating SSRS Subreports

------------------------------------------------------------------------------------------------------------------------

Summary:

Create one report. Then to that report drag "Sub Report" control , right click and in the 
properties specify which report you want to show. Here choose "Parameter" section and 
pick the "parameter" , say the parameter of first report "@region" and the sub report also
need to filter data based on that.

------------------------------------------------------------------------------------------------------------------------


Main report – Sub Report:( allow to pass parameters)

1.DataSet:change sql :where countryregioncode=@CRC , also choose Parameter.,but no value their.Then under Parameter- see CRC then check in DataSet , the Parameter value , it will show now @CRC.
2.Solution Explorer->Report->New Item->Report

Report Data
----------------
Built-in Fields ,Parameters,Images,Data Sources,Data Sets

Data Source:create a new connection string.Edit button
Data source:Microsoft SQL Server (SqlClient) Server name:
-Use Windows Authentication – Use SQL Server Authentication
Connect to database

After creating the conection – go to DataSet ,in “Options” specify the Data Source.
Click on Query Designer from the above screen window, choose Table, here the
sql shows like Select TOP 10 ….

In the Datasets , choose parameters and in WHERE clause introduce the parameters
CountryREgionCode=@CRC

3.Design of Report- View Toolbox – Drag a Table – From DataSet which shows the
Fields , Just drag & drop as Table fields.

4.Call another Report.From the same View-Toolbox , just drag the “SubReport”
control to the Report Design View.Right click on sub report and choose 'Sub Report
Properties”, From the dropdown choose which report to use as subreport.
Choose “Paramer” ,choose @CRC, so from main report the parameter is passed to

the subreport.

Thursday, October 3, 2013

SSRS:Creating a Report with Parameters


------------------------------------------------------------------------------------------------------------------------


Refer the Source Video:Creating a Report with Parameters


------------------------------------------------------------------------------------------------------------------------

Summary:

1. "DataSet" :  Select .... From ... Where ...
      
      Where condn. -> tells the "Parameter"

     After the "Where" condn. is specified , it creates a "Parameter"

2. To create a "Dropdown List"

    i."Dataset" - build the query to show the values.
    ii. "Parameter" - specify the above dataset.

------------------------------------------------------------------------------------------------------------------------


DataSets: choose query
1)Select...Where TerritoryID=@TerritoryID
It adds.
Report
Parameters
TerritoryID
2)Need a Dropdown & select
DataSet-Add DataSet
Query:Select Distinct TerritoryID ..
Go to Parameters: Avalaible value:specify it

------------------------------------------------------------------------------------------------------------------------


Refer the Source Video: Creating a SSRS Report with cascading parameters

------------------------------------------------------------------------------------------------------------------------

Summary:

Requirement: Based on "Customer" ,  the "Territory" drop down shows values.

1. "DataSet" : sql query for "Territory" add "Where" having the  @Customer parameter.

2. "DataSet": sql of main dataset, add both "Where' having @Customer , @ Territory

------------------------------------------------------------------------------------------------------------------------

CustomerId - then populate the Territory Id
DataSet: Query:Distinct CustomerID

Choose the DataSet:TerritoryId
Query:change sql having Where CustomerId=@CustomerID

Then it creates a paramerter:There choose and choose "Available Values"
2nd dropdown is greyed out.
Note: If you do want dropdown you specify in parameter no drop down,it shows just textbox.

------------------------------------------------------------------------------------------------------------------------


Wednesday, October 2, 2013

Reporting Services

Refer the Source Video: 

A server based reporting.
Report are developed 
-in Report Builder  -in Visual Studio -in SQL Server Data Tools(SSDT) -by hand-writing XML

Report Services report 
-..stored in a SQL Server Database Engine - a .rdl file - embedded into .NET applns. 
- integrated with SharePoint

Report Delivery
- to email,mobile devices, & browers -via SSRS web service -on a schedule
 -.when the data changes

SSRS 2012: - Standard version 
-free version in Express Edition (SQLServerExpresswithAdvancedServices)

Architecture of  SQL Server 2012:Reporting Services
-SSRS  can be from small to Big organization -3rd Part companies - provide more look,feel etc..

There  3 components: 
-client ( one requesting the report) - report server ( who you request to)    .SSRS
-data (SQL Server , Oracle, DB2 etc.)
(If you have OLE DB or ODBC provider to get data, even 3rd party ,so any source can get data)

Client -> SSRS (Server) -> Report A ( 3 different sources[sql server relational,Dashboard,Oracle)
.pdf,excel format
Traditional client -server -client request (via a url) of the report server
http://myreportserver.learnitfirst.com/ReportA.rdl

-Server receives that
Report Server make request to Data Source ( still its client-server)
 - client is the report server - server (Data Source)

Report author/administrator can specify how to authenticate to the data source 
windows authentication, sql server authentication.

All client request to report server are made via URL
-users working with applications links to report
-SSRS has the own web server( do not need to install IIS web server to it)
note:nice change in 2008 that with reporting server the web server is installed

Report Server - does more than just connecting to the data source & creating report
- manages secure access to the reports,can schedule delivery, can render report in multiple way etc.