How do I execute a sql script?
-
Hello, I'm new to database programming. I'm currently reading Pro ADO.NET 2.0 from Apress. The book has been great so far, but when he get's to his first example, he supplies a script file to set up a simple data source. So, i have this .sql file that i don't know what to do with. when I double click it, it just opens in notepad. Yes, i'm a doofus. please help me! :sigh: I'm running a local instance of sql server 2005 standard. thanks! Ian
-
Hello, I'm new to database programming. I'm currently reading Pro ADO.NET 2.0 from Apress. The book has been great so far, but when he get's to his first example, he supplies a script file to set up a simple data source. So, i have this .sql file that i don't know what to do with. when I double click it, it just opens in notepad. Yes, i'm a doofus. please help me! :sigh: I'm running a local instance of sql server 2005 standard. thanks! Ian
Hi Ian. If you're running Sql Server 2005, you should have access to the Query Analyzer program, yes? Open the .sql file in Query Analyzer, then execute it (F5 will do it)
-
Hi Ian. If you're running Sql Server 2005, you should have access to the Query Analyzer program, yes? Open the .sql file in Query Analyzer, then execute it (F5 will do it)
i can't find the query analyzer. I'm going to reinstall and give that a shot. Thanks! Ian
-
i can't find the query analyzer. I'm going to reinstall and give that a shot. Thanks! Ian
SQL Server 2005 does not come with Query Analyser. That was a feature of SQL Server 2000. ColinMackay.net Scottish Developers are looking for speakers for user group sessions over the next few months. Do you want to know more?
-
Hello, I'm new to database programming. I'm currently reading Pro ADO.NET 2.0 from Apress. The book has been great so far, but when he get's to his first example, he supplies a script file to set up a simple data source. So, i have this .sql file that i don't know what to do with. when I double click it, it just opens in notepad. Yes, i'm a doofus. please help me! :sigh: I'm running a local instance of sql server 2005 standard. thanks! Ian
Open Microsoft SQL Server Management Studio Connect to the SQL Server In the tree on the left open the databases folder Right click on the database you want to query and select New Query... In the main pane you can now type SQL. You can execute the SQL by pressing F5 or using the Execute button. Does this help? ColinMackay.net Scottish Developers are looking for speakers for user group sessions over the next few months. Do you want to know more?
-
SQL Server 2005 does not come with Query Analyser. That was a feature of SQL Server 2000. ColinMackay.net Scottish Developers are looking for speakers for user group sessions over the next few months. Do you want to know more?
:) My mistake. :-O Thanks Colin.