Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Archives: April 2011

Download: Powershell a Day -April 2011

I you liked my Powershell a day – april 2011, where every day I wrote a blog about powershell you can download the consolidated pdf file which contains all the 30 days blog post. Download the file from here

Read more

2 comments, 655 reads

Posted in Vinay Thakur on 30 April 2011

Powershell Day 30

Day 30 Best Practice Having good Security is first best practice for any language no exception with Powershell. Having that we should also we try to follow following best practices. *Best practice is not always best. It may vary depends … Continue reading

Read more

0 comments, 546 reads

Posted in Vinay Thakur on 30 April 2011

Powershell Day 29

Day 29 Advance Security As discussed in earlier blog about “Security” Day 7. Continue on that we will discuss here -what all security features Powershell provides. How to use them. Security is good but securing the things without using is … Continue reading

Read more

0 comments, 507 reads

Posted in Vinay Thakur on 29 April 2011

Powershell Day 28

Day 27 SQL Policy I highly recommand to go through the Policy –based management (BCM)’s official excellent site to learn more aobut PBM http://blogs.msdn.com/b/sqlpbm/   Introduction:- Policy-Based Management (PBM).is introduced from sql server 2008 onwards. Policy means making a sql … Continue reading

Read more

0 comments, 154 reads

Posted in Vinay Thakur on 28 April 2011

Powershell Day 27

Day 27 Inventory   As discussed ealier about wmi, wmi is a good for accessing inventory data from remote system as: To get the Operating related information win32_OperatingSystem :OS info PS C:\> get-wmiobject win32_OperatingSystem –computername “servernm” Or PS C:\> get-wmiobject … Continue reading

Read more

0 comments, 154 reads

Posted in Vinay Thakur on 27 April 2011

Powershell Day 26

Day 26 Generate script Generate script for sql server objects is very simple, there are different ways we can generate the sql server objects includes – database, table, trigger, stored procedure… using SqlPS –MiniShell: We have already discussed about mini … Continue reading

Read more

0 comments, 223 reads

Posted in Vinay Thakur on 26 April 2011

Powershell Day 25

Day 25 RMO   I have observed that no body has written anything about RMO. And replications is one of my favoriate topic, so tried to write this blog. Please DO NOT TRY THIS SCRIPT ON PRODUCTION, I AM NOT … Continue reading

Read more

0 comments, 145 reads

Posted in Vinay Thakur on 25 April 2011

Powershell Day 24

Day 24 Performance Monitor  Sql Performance:  ? performance counters  sys.dm_os_performance_counters ? Top ten queries from sys.dm_exec_query_stats and sys.dm_exec_sql_text ? Processor: sys.dm_os_schedulers ?Memory : sys.dm_os_memory_clerks  Performance counters using WMIobject: Formatted Data ?get-wmiobject  Win32_PerfFormattedData_PerfDisk_PhysicalDisk ?get-wmiobject  Win32_PerfFormattedData_PerfOS_Memory ?get-wmiobject  Win32_PerfFormattedData_PerfOS_Processor ?get-wmiobject  Win32_PerfFormattedData_PerfProc_Process ?get-wmiobject  Win32_PerfFormattedData_Tcpip_NetworkInterface … Continue reading

Read more

0 comments, 251 reads

Posted in Vinay Thakur on 24 April 2011

Powershell Day 23

Day 23 SMO programming Part 4  AS we can work with Server, Database,  Table, Column. You can get the similar information about Views, Storedprocedures… $database1.Views $database1.Storedprocedures $database1.logfiles $database1.rules $database1.schemas $database1.roles $database1.triggers $tables1.triggers If you observed on this, cmdlets are always … Continue reading

Read more

0 comments, 140 reads

Posted in Vinay Thakur on 22 April 2011

Powershell Day 22

 Day 22 SMO programming Part 3 In earlier blog we have discussed about server and database classes, using table clase you can create a table with different options.  Table class also require support of other classes like “Datatype” class and … Continue reading

Read more

0 comments, 160 reads

Posted in Vinay Thakur on 22 April 2011

Powershell Day 21

Day 21 SMO programming Part 2  Continue with my earlier blog where I discussed about the information about SMO. Today we will talk about programming sql server using SMO.  SMO is a very big subject to discuss and each method … Continue reading

Read more

0 comments, 148 reads

Posted in Vinay Thakur on 21 April 2011

Powershell Day 20

Day 20 Introduction to SMO >>SQL Server Management Objects (SMO) are objects designed for programmatic management of Microsoft SQL Server >>The SMO object model extends and supersedes the Distributed Management Objects (SQL-DMO) object model. >>The DMO library is a COM … Continue reading

Read more

0 comments, 184 reads

Posted in Vinay Thakur on 20 April 2011

Powershell Day 19

Day 19 Sql Server with .Net Using .Net programming is  we can connect to sql server, its similar with any windows programming (vb/vc/.net). where we uses connection and connection string. So the script written using .net will work for any … Continue reading

Read more

0 comments, 135 reads

Posted in Vinay Thakur on 19 April 2011

Powershell Day 18

Day 18 PSSnapin Powershell works with cmdlets, and cmdlets are commands from snapins. Means spanin contains  group of commands. so if you want to know what all spanins installed /registered there is a command called get-PSsnapin We can create cmdlets … Continue reading

Read more

0 comments, 382 reads

Posted in Vinay Thakur on 18 April 2011

Powershell Day 17

 Day 17 Advance Mini Shell  Mini shell is a good and can be used as a replacement of management studio, in fact you can get lot of detailed information. For example in day 16 we discussed that   PS: SQLSERVER\…\databases\master:\>Invoke-sqlcmd … Continue reading

Read more

0 comments, 125 reads

Posted in Vinay Thakur on 17 April 2011

Powershell Day 16

Day 16 Introduction to Mini Shell Mini Shell or SqlPS is the default shell utility provided by Microsoft to support the sql server. This shell is default comes with Powershell i.e. It will be default from sql server 2008 onwards.  … Continue reading

Read more

0 comments, 158 reads

Posted in Vinay Thakur on 16 April 2011

Powershell Day 15

Day 15 Introduction to Powershell for MS Sql Server So far we have discussed several features and information about Windows Powershell, how it works and how powerful it is. I am impressed the way it is handling the stuff… you … Continue reading

Read more

0 comments, 270 reads

Posted in Vinay Thakur on 15 April 2011

Powershell Day 14

Day 14 Tools and more info   As Powershell is a global language and its open to explore. So many great companies/ experts have developed several tools with proper standards. We can use it as an expansion to existing Powershell … Continue reading

Read more

0 comments, 191 reads

Posted in Vinay Thakur on 14 April 2011

Powershell Day 13

Day 13 Other    XML: Powershell support XML, as XML is a language which works great for windows, and it’s like a platform independent, you can create a webpages using xml. With Powershell we can use convertto_XML option to convert an … Continue reading

Read more

0 comments, 234 reads

Posted in Vinay Thakur on 13 April 2011

Powershell Day 12

Day 12 ADSI Using Powershell you can work on Active directory as well. Active directory is introduced in windows 2000. It’s a system where you can use domain server and create an organization unit –group of people on one unit … Continue reading

Read more

0 comments, 141 reads

Posted in Vinay Thakur on 12 April 2011

Older posts