Showing posts with label Command Line. Show all posts
Showing posts with label Command Line. Show all posts

Saturday, April 12, 2014

How do you start Power Shell from SQL Server 2012?

It is quite easy. Make sure you have SQL Server installed on your computer. The following reference shows you how you may start Power Shell from your SQL Server Management Studio(SSMS). Also make sure you are able to connect to your server.

After this preparation review the following for a step by step procedure:

http://hodentekmsss.blogspot.com/2014/04/starting-power-shell-from-sql-server.html

Thanks

Monday, December 3, 2012

How do you copy from Notepad and paste to command line(DOS)?

Sometimes you may want to run a huge script from the command line but you hesitate to type it into the DOS window. In such cases you may want to type the script into NOTEPAD where you can more easily edit and then paste it into command line. Is this possible?

Yes, you can do it. First you have to run the DOS program with elevated permission, that is as an administrator. Once you do that you can paste it into the command line.
Step 1:
Run CMD with Administrators permission.

The DOS program starts

Step 2:
Prepare your script in NOTEPAD such as the one shown here.

Highlight the script you want to run and copy it to clipboard

Step 3:
Right click in the open DOS screen to pop open drop-down menu.

Click Paste (Control-V does not work). Your text is now copied to command line.
You are done!!