A few days ago a friend asked why working with text files in powershell was so annoying. I asked him what the problem was, and he was trying to split a text file in half.
I gave him this simple line:
$content = (Get-Content C:\input-file.txt -Raw); $content.Substring(0,$content.Length * 0.5) | Set-Content "C:\first-half.txt"
This will get the raw text content of a file (C:\input-file.txt), and dump out the first 50% of the file to C:\first-half.txt
Visual Studio cannot create Data Generation Plans for Windows Azure because the schemas aren’t compatible.
These are the steps you need to take if you want to generate data for an Azure database.
- Import your Azure database to your local SQL / SQL Express instance on your development machine
- Create the data generation plan using the local database
- Use the SQL Database Migration Wizard to create your migration backups
- Continue with the SQL Database Migration Wizard to publish to a database in Azure