in

SQL Server Blogs

Voices from the UK SQL Server Community

Browse by Tags

  • Changing SQL Server Port with Powershell

    The other week, we were fortunate to have Mark Broadbent ( blog \ twitter ) as a guest speaker at the Leeds SQL Server User Group. he did a great presentation on using Windows Server Core and SQL Server. If you haven’t taken time to learn Powershell then this could be the best reason to do so. Of course...
    Posted to Martin Bell UK SQL Server MVP (Weblog) by MartinBell on Mon, May 7 2012
  • Auto blocking attacking IP address

    This is to share my PowerShell code online. I original asked this question on MSDN forum (or TechNet?) here: http://social.technet.microsoft.com/Forums/en-US/winserversecurity/thread/f950686e-e3f8-4cf2-b8ec-2685c1ed7a77 In short, this is trying to find attacking IP address then add it into Firewall block...
    Posted to Dong Xie's Blog (Weblog) by dong on Tue, Mar 6 2012
  • Powershell Snapins with SQL 2012

    Because the only Adventureworks database on codeplex for SQL Server 2012 is a case sensitive database, I thought I would check my change-collation script to see what needed changing. I thought the only issue would be changing SqlServerCmdletSnapin100 to SqlServerCmdletSnapin110 but unfortunately that...
    Posted to Martin Bell UK SQL Server MVP (Weblog) by MartinBell on Thu, Dec 8 2011
  • Calling DTUtil recursively from Powershell

    I’ve used DTUtil numerous times to load SSIS packages, but usually it is to load one or more packages to the same location. From the command prompt you can use a command such as FOR %i in (*.dtsx) DO DTUTIL –File “%i” –Decrypt SecretPassword –Destserver SQLServerInstance –Encrypt SQL; “%~ni”; 5 If you...
    Posted to Martin Bell UK SQL Server MVP (Weblog) by MartinBell on Thu, Dec 1 2011
  • Using Powershell to remove strings in files

    I was on a SQL 2005 site the other day, which was using a batch scripts to create their databases from files in version control. The process works well (if not that quickly!), and you can easily tell if a scripts has worked by the fact that the output file has zero length. This means you can quickly...
    Posted to Martin Bell UK SQL Server MVP (Weblog) by MartinBell on Mon, Oct 31 2011
  • Volume Freespace

    In my last blog post I talked about a problem where the incorrect permissions on a mount point directory causes a spurious error message regarding space on the root drive. Whilst investigating the problem I needed to find out the space available on the mounted drive. Unlike normal directories the information...
    Posted to Martin Bell UK SQL Server MVP (Weblog) by MartinBell on Mon, Jul 25 2011
  • Finding out how much space is used by filestream files

    At the Manchester user group the other night a question from the floor was “How do you determine the space used by the Filestream files” so I thought I would look into it. I found the same question posted on Stack Overflow and the following was given as a means to get an approximate answer. SELECT SUM...
    Posted to Martin Bell UK SQL Server MVP (Weblog) by MartinBell on Sat, Jun 25 2011
  • PowerShell- SQLps

    Day 3, of a blog a day I was hoping for more time for this post but we’ll see how it goes. I looked through some of my Google Documents and found some interesting bits that I’d collected around PowerShell so i thought I’d put them in a blog for future reference and have a play around with it. and as...
    Posted to Martin Croft Musings on SQL Server (Weblog) by MartinCroft on Tue, May 3 2011
  • SMO Enumerations in Powershell

    In my Changing Database Collations post I mentioned the difficulty I had calling the Alter method on the database when specifying a termination clause. The examples in Books Online and MSDN were not at all relevant, and the solution was not immediately obvious (to me). In the end it turned out to be...
    Posted to Martin Bell UK SQL Server MVP (Weblog) by MartinBell on Thu, Mar 17 2011
  • Collations in a FK relationship

    Anyone who studied the Powershell script in my previous post may have seen the following code to remove foreign keys that reference an index that has a column with the database collation I am changing: $list = @{} foreach ($tbl in $db.Tables) { foreach ($fk in $tbl.ForeignKeys) { foreach($fkcol in $fk...
    Posted to Martin Bell UK SQL Server MVP (Weblog) by MartinBell on Wed, Mar 16 2011
Page 1 of 4 (32 items) 1 2 3 4 Next >
Powered by Community Server (Commercial Edition), by Telligent Systems