Copyright © 2008-2019 Paula DiTallo

Tag Cloud

May 2014 Entries

SQL Server: How do I generate the table schema and populate it with inserts in a script?

In SSMS, there's a Generate Script utility (read: only available under version 2008 and up) . Here are the steps you would need to take to make use of the utility: Right click on the database you're interested in and go to Tasks -> Generate ScriptsSelect the tables and/or any other objects you'd like in order to get them into the script.Navigate to Set scripting options. Click on Advanced.Under the General category, navigate to Type of data to scriptSelect the Schema and Data option to get the ......

How do I find the largest files on my disk (storage)?

Here's an example using forfiles to scan your storage. This command line will look for files over 200mb on the C:\ drive after 1/1/2014.

forfiles /P C:\ /M *.* /S /D +"01/01/2014"  /C "cmd /c if @fsize gtr 209715200 echo @path @fsize @fdate @ftime"

For more information, check out Microsoft's examples and syntax page: