Executing Scripts In SQL Server 2000
-
hi, is there any other way of executing a sql script in sql server 2000 besides using the sql query analyzer or the enterprise manager itself? for example my database server (sql server 2000) is up and running. what i want do is to change one of the stored procedures. i have made the changes and generated the script. now is there any way that i could upload this script to the deployed sql server and automatically execute it at some fix time? please do answer this question, even if the answer is "no" or nobody knows!! thanx in advance ☺«««DTA»»»☺
-
hi, is there any other way of executing a sql script in sql server 2000 besides using the sql query analyzer or the enterprise manager itself? for example my database server (sql server 2000) is up and running. what i want do is to change one of the stored procedures. i have made the changes and generated the script. now is there any way that i could upload this script to the deployed sql server and automatically execute it at some fix time? please do answer this question, even if the answer is "no" or nobody knows!! thanx in advance ☺«««DTA»»»☺
In
C:\Program Files\Microsoft SQL Server\80\Tools\Binn
you should fine a program calledosql.exe
. This is a command-line query running tool. Alternatively, many installation tools (Installshield, wise, windows installer) support some method of executing SQL on a server.
-
In
C:\Program Files\Microsoft SQL Server\80\Tools\Binn
you should fine a program calledosql.exe
. This is a command-line query running tool. Alternatively, many installation tools (Installshield, wise, windows installer) support some method of executing SQL on a server.
thanx a lot Steven. osql.exe was just the utility i needed! works great for me! One thing that comes into my mind now is that, if sql server 2000 provides such a utility, does this mean that there might be a tool or program for the versioning of all the Stored Procedures, or any objects in the database? if you could refer such a tool/program, it would be Heaven on Earth for me! ;) thanx a lot! ☺«««DTA»»»☺
-
thanx a lot Steven. osql.exe was just the utility i needed! works great for me! One thing that comes into my mind now is that, if sql server 2000 provides such a utility, does this mean that there might be a tool or program for the versioning of all the Stored Procedures, or any objects in the database? if you could refer such a tool/program, it would be Heaven on Earth for me! ;) thanx a lot! ☺«««DTA»»»☺
Sorry to disappoint, but there is no built in versioning support in SQL Server, at any level. The best you can do is manually include comments at the start of your stored procedures, to indicate change history. There are some 3rd party tools that do database comparisons, and will be able to tell you when database structures are different. I cannot recommend anything specific though.
-
Sorry to disappoint, but there is no built in versioning support in SQL Server, at any level. The best you can do is manually include comments at the start of your stored procedures, to indicate change history. There are some 3rd party tools that do database comparisons, and will be able to tell you when database structures are different. I cannot recommend anything specific though.
no disappoint at all!! not after "oslq.exe". i think i will go for the manual approach, because third party tools usually involve some sort of licensing problems, and versioning in my case has the lowest priority. so i dont think that i'll be spending any money for this purpose! thanx anyways! ☺«««DTA»»»☺