SQL SERVER GYAN

This portal is to share my acquired knowledge related to Sql Server. I hope will be helpful for novice and professionals.

Sunday, September 15, 2013

ALTER computed column

There is no special command in SQL Server to ALTER any computed column.
But we can do by using below two ways:

1. Drop computed column and recreate
2. GO To Table in Object Explorer , right click on table and open in DESIGN mode.
Identify the column and edit "COMPUTED COLUMN Specification > Formula " property .

Second method will loose all existing value in computed column so best is to go for first method, it will drop, recreate and populate column again.
But never forget to note computed column expression before dropping column.

Thanks,
Randhir

Tuesday, September 3, 2013

List All Objects Using Linked Server


While deployment a project on Production server I got an requirement to update my all LINKED Server references which is a very boring  task to me.
I found a very useful function on MSDN to check cross-database dependencies.

/*-----List objects using Linked Server-------*/
SELECT
    Distinct
    referenced_Server_name As LinkedServerName,
    referenced_schema_name AS LinkedServerSchema,
    referenced_database_name AS LinkedServerDB,
    referenced_entity_name As LinkedServerTable,
    OBJECT_NAME (referencing_id) AS ObjectUsingLinkedServer
FROM sys.sql_expression_dependencies
WHERE referenced_database_name IS NOT NULL
And referenced_Server_name = 'Enter LinkedServerName here'


Thanks

Friday, July 26, 2013

All About BIG Data


I have found many articles on Big Data but below are few selected and categories.

Hope you will like .

 
What is Big Data







 

Why Big Data









 

 

Why Not Big Data




 

Big Data Challenges





 

Opportunities





 

 

Career











 

Technical Articles








 I LIKE :

Tutorials :
http://hadoopnet.com/tutorial/
 

Friday, May 17, 2013

Open Report Manager without Run As Administrator option

Below are steps to avoid "Run As Administrator" option while opening Report Manager


Open a browser window with Run as administrator permissions. From the Start menu, click All Programs, right-click Internet Explorer, and select Run as administrator.
  1. Click Allow to continue.
  2. Open Report Manager link
  3. Click Tools.
  4. Click Internet Options.
  5. Click Security.
  6. Click Trusted Sites.
  7. Click Sites.
  8. Add http://.
  9. Clear the check box Require server certification (https:) for all sites in this zone if you are not using HTTPS for the default site.
  10. Click Add.
  11. Click OK.
  12. In Report Manager, on the Home page, click Folder Settings.
  13. In the Folder Settings page, click Security.
  14. Click New Role Assignment.
  15. Type your Windows user account in this format: \.
  16. Select Content Manager.
  17. Click OK.
  18. Click Site Settings in the upper corner of the Home page.
  19. Click security.
  20. Click New Role Assignment.
  21. Type your Windows user account in this format: \.
  22. Select System Administrator.
  23. Click OK.
  24. Close Report Manager.
  25. Re-open Report Manager in Internet Explorer, without using Run as administrator

Click to get more information:

http://msdn.microsoft.com/en-us/library/bb630430.aspx

Sunday, November 4, 2012

Type column description of ReportServer Database



Here is the Type column description of ReportServer.Dbo.Catalog Table :

1 = Folder
2 = Report
3 = Resources
4 = Linked Report
5 = Data Source
6 = Report Model
7 = Report Part (SQL 2008 R2, unverified)
8 = Shared Dataset (SQL 2008 R2)

Thanks,
Randhir

Usefull queries of ReportServer Database

Date Source's Dependent Report

Use ReportServer
GO
 
SELECT
    C2.Name AS DataSourceName,
    C.Name AS DependentItemName,
    C.Path AS DependentItemPath
FROM
    ReportServer.dbo.DataSource AS DS
        INNER JOIN
    ReportServer.dbo.Catalog AS C
        ON
            DS.ItemID = C.ItemID
                AND
            DS.Link IN (SELECT ItemID FROM ReportServer.dbo.Catalog
                        WHERE Type = 5) -- to  identifies data sources
        FULL OUTER JOIN
    ReportServer.dbo.Catalog C2
        ON
            DS.Link = C2.ItemID
WHERE
    C2.Type = 5
ORDER BY
    C2.Name ASC,
    C.Name ASC;
 
 
Thakns,
Randhir