Computed Columns 2


Sometimes we are using some scalar function to generate computed column values
This values also not persisted until the function is marked as schema bound

Lets see example here


Computed columns 1


computed columns

use test

We used computed columns many times , but we can get most benefit of computed columns when we can mark them
as persisted.
For this columns must be deterministic.
Lets see how can we get it


How to get list of servers running in network using PowerShell

As a DBA its your repsonsibility to get list of SQL Servers running in network and manage them. As infrastructure grows its getting tough to get list of SQL Servers running in network along with their versions
It easy in Powershell
Let see how to use it

SQLPS Powershell in SQL Server -3

Now we will go for some cmdlets and see how to use them.
One question comes in your mind is how to run query from powershell?

Lets see first it
For this there is cmdlet -Invoke-Sqlcmd

SQLPS Powershell in SQL Server -2

Ok , so now we are connected to SQLPS
We will first navigate to different folders of SQL Server

SQLPS - Powershell in SQL Server

Those who are using SQL Server must have idea of Powershell eventhough they dont have used it.
Its a nice utility and sometimes makes work more easy then routine coding.
Here today first we weill get basic idea on how to use it.
Before SQL Server 2012 it was a sepereate exe SQLPS.exe, but 2012 onwards MS has added it as a seperate module for powershell. So eventhough SQLPS is available, it will be deprecated in future.

Online reindexing of partition.


Till now SQL 2012 its not possible to reindex a partition online.
We had two option

1. Either reindex entire table online
2. Reindex a single partition offline.

Nonclustered index got corrupted.

Recently we had issue of nonclustered index corruption on table. We faced this issue multiple times and we also run DBCC CHECKTABLE to get the details of index corruption. Every time we drop index and recreate index , but immediately it got corrupted. Our system was running fine since last 3 yrs and suddenly we got this issue.
Due to this our all update and insert started to fail, and since its main summary table we are helpless till we resolve this issue.
We checked errorlog also to get issue.
Below is image of the error.

Amazon Contextual Product Ads

Popular Posts