in

SQL Server Blogs

Voices from the UK SQL Server Community

Browse by Tags

  • 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
  • Changing database collations with Powershell

    Changing a database collations is rarely as simple as it may seen. You may have found articles which show you the ALTER DATABASE statement such as Example B , unfortunately that example only works because you have just created the testDB and nobody has connected to it! Anyone who has tried to do this...
    Posted to Martin Bell UK SQL Server MVP (Weblog) by MartinBell on Mon, Mar 7 2011
  • Signing Powershell scripts

    I wanted to write a post on signing Powershell scripts, but doing a few internet searches found this article . Which is great if you have a certificate store, and this is the recommended method, but using a certificate store is not always an available option. There are several alternate methods to create...
    Posted to Martin Bell UK SQL Server MVP (Weblog) by MartinBell on Wed, Feb 16 2011
Page 1 of 3 (30 items) 1 2 3 Next >
Powered by Community Server (Commercial Edition), by Telligent Systems