I have been following this tutorial: http://www.misfitgeek.com/2010/07/adding-asp-net-membership-to-your-own-database/
I have installed SQL Server Management Studio Express from here: http://www.microsoft.com/download/en/details.aspx?id=8961.
1) How can I locate my database?
2) How do I run the SQL script on my database from external file?
Click Query > Connection > Connect to connect to the server that contains the database you want to access. Select the appropriate StarTeam Server database. Open the tuning script, by choosing File > Open > foldername\scriptname. Execute the script, by clicking the Execute button on the toolbar or by pressing F5.
You can open a document in one or more editors by clicking Open on the File menu and then clicking File. In the Open File dialog box, select the file, click the Open arrow, and then click Open With. In the Open With dialog box, in the Select a program to open list, click the preferred program, and then click Open.
Generate a Script in the SQL Server Management Studio Open SQL Server Management Studio (SSMS) Expand Databases. Select the database to script. Right-click on the database and select Tasks > Generate Scripts.
This website has a concise tutorial on how to use SQL Server Management Studio. As you will see you can open a "Query Window", paste your script and run it. It does not allow you to execute scripts by using the file path. However, you can do this easily by using the command line (cmd.exe):
sqlcmd -S .\SQLExpress -i SqlScript.sql
Where SqlScript.sql
is the script file name located at the current directory. See this Microsoft page for more examples
Open SQL Server Management Studio > File > Open > File > Choose your .sql file (the one that contains your script) > Press Open > the file will be opened within SQL Server Management Studio, Now all what you need to do is to press Execute button.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With