Skip to main content

Posts

Showing posts from 2017

Active Directory in Windows

                                                                Active Directory in Windows  When a windows server is bought it comes with many capabilities like AD groups for security, IIS(Internet Information Services), ability to built own VPN and many more of which Active directories are created with a domain and the computers which access the network will be connecting to the domain controllers. Practically, there will be a cluster of domain controllers where data will be replicated all over the cluster.

Database Snapshots in SQL Server

Database Snapshots in SQL Server What is DB Snapshot? Snapshots are read only and are a very good option for reporting purposes. All the reporting related hits could be made on the snapshot instead of on the the actual database, and the burden on the active database could be minimized. Also, as snapshots are read only, chances of any undesired updates by the subscriber (who reads data for reports etc.) could be negated. A database snapshot is a read-only, static view of a SQL Server database (the source database ).It is transactionally consistent with the source database as of the moment of the snapshot's creation and always resides on the same server instance as its source database. As the source database is updated, the database snapshot is updated. Therefore, the longer a database snapshot exists, the more likely it is to use up its available disk space.  Multiple snapshots can exist on a given source database. Each database snapshot per

Creating SQL statements From excel

                                            Creating statements From excel Automatically For Insert Statements, ="INSERT INTO DR_Prices VALUES("&A5&",'"&B5&"',"&C5&","&D5&","&E5&","&F5&","&G5&","&H5&","&I5&","&J5&","&K5&","&L5&","&M5&","&N5&","&O5&")" If we have a requirement wherein same kind of statements needs to be created with same count of columns then they can be generated in Excel using statement, ="exec sp_addmessage @msgnum='"&A4&"',@severity='"&C4&"',@with_log='"&D4&"',@msgtext='"&E4&"'" NOTE: Above statement is to insert into sys.messages table in Master DB. Insert sta

Active Node

                                                         Active Node in a Cluster Def : This script when run sends a mail whenever there is a change in the active node on which the SQL instance is currently running. Please find the below link for code. https://gist.github.com/tejaswidatla/164e528d8a5b83687a5f892c9b41d9d6 NOTE: Passive node is one that does not have any active service running on it (just like with SQL server services may not be running on passive node but that doesn't mean passive node can be offline). There is a quoram disk which has data on how the drive mapping must happen when the services failover.

SQL Server

                                                                     SQL Server  Its been a while that I have updated my blog. Though Databases and SQL was something that I used to stay away as much as possible because for some reasons, I got to work on these all the day for 8-9 hours and sometimes haunting in the nights and weekends as well. However, it has been a good journey so far and I found some interesting stuff in SQL Server. So, this triggered an idea a couple of weeks back to share some cool stuff that I am learning in SQL Server over numerous sources. Hope I can make this a good series. As there are not much visitors to my blog, let me start with wishing me a good luck. So, here starts the SQL Server Series!!!!!!