Author |
Topic |
Sun Foster
Aged Yak Warrior
515 Posts |
Posted - 2010-07-27 : 08:43:09
|
In a off-line vb.net app (about 20 users) which will use local SQL saver to store all objects, such as tables, store procedures. How to update local server store procedures in each lap top if I update store procedures in server? For example, I create a new store procedure, sp_order_new, I want to load it into 20 lap top local SQL server to be ran for app. So far, I have to update it in all lap top local SQL server. I knew that this is not the best way but I have no idea of how to. |
|
Sachin.Nand
2937 Posts |
Posted - 2010-07-27 : 08:56:09
|
Create a script file for the sp & execute it on each laptop.Limitations live only in our minds. But if we use our imaginations, our possibilities become limitless. PBUH |
 |
|
Kristen
Test
22859 Posts |
Posted - 2010-07-27 : 10:59:22
|
We have some scripts that have to be run remotely to update things.We have a table in the [central] DB that stores them, together with "come-from" and "will-get-you-to" version numbers.Far end can then be "told" that it needs to get to version C, will check its local database and discover that it is on Version A, and will query to retrieve, and execute, scripts for Version B and Version C [from central DB] This won't help the first time you do it, as you will have to distribute the bit that actually runs the script at the remote end, but thereafter you should be able to just INSERT a new script to the "version table", and then have the remote ends update (could be a check that they do at each startup, or something you email the users telling them explicitly to do)I have a friend who sells accounting software and they do the whole thing with an XML file. The XML file includes new executables for the application, changes for the database, all sorts. It processes each element in the XML, in sequence, and Hey Presto! the application and database updates itself. Very slick! |
 |
|
Sachin.Nand
2937 Posts |
Posted - 2010-07-27 : 12:35:31
|
I have a friend who sells accounting software and they do the whole thing with an XML file. The XML file includes new executables for the application, changes for the database, all sorts. It processes each element in the XML, in sequence, and Hey Presto! the application and database updates itself. Very slick!We do it using 3rd party source control where by which you commit the script file into the source safe.a list of databases & servers is maintained in a XML format in the source safe for a project.as soon as you commit those changes in the source safe project, the script file automatically gets executed in all the related servers for that source safe project.So in the case of OP as soon as the laptop user gets connected to the SourceSafe & if his local server is registered in the source safe the script file will get executed.Limitations live only in our minds. But if we use our imaginations, our possibilities become limitless. PBUH |
 |
|
Sun Foster
Aged Yak Warrior
515 Posts |
Posted - 2010-07-27 : 17:18:53
|
Can you tell me the name of 3rd party source control? It is what I looking for. |
 |
|
Sachin.Nand
2937 Posts |
Posted - 2010-07-28 : 00:40:54
|
quote: Originally posted by Sun Foster Can you tell me the name of 3rd party source control? It is what I looking for.
http://www.syntevo.com/smartcvs/index.html.But it is not free.Limitations live only in our minds. But if we use our imaginations, our possibilities become limitless. PBUH |
 |
|
Kristen
Test
22859 Posts |
Posted - 2010-07-28 : 01:11:13
|
(Just drop the "." from the end of the URL ... pesky forum formatting code )By the by, we use SVN for our source code repository (and Tortoise as the Client) [they are the Opensource components, I don't know about SmartSVN]. I've got absolutely, 100%, NOTHING bad to say about it. For anyone not using version control ... well ... set yourself a resolution, today, to install it and start using it! |
 |
|
Sachin.Nand
2937 Posts |
Posted - 2010-07-28 : 01:16:03
|
quote: Originally posted by Kristen (Just drop the "." from the end of the URL ... pesky forum formatting code )
Oops....Done ithttp://www.syntevo.com/smartcvs/index.htmlLimitations live only in our minds. But if we use our imaginations, our possibilities become limitless. PBUH |
 |
|
Kristen
Test
22859 Posts |
Posted - 2010-07-28 : 01:18:04
|
Idera : does SmartSVN have the distribution "tricks" built in, or is that something you built "on top" of SmartSVN? |
 |
|
Sachin.Nand
2937 Posts |
Posted - 2010-07-28 : 02:08:35
|
quote: Originally posted by Kristen Idera : does SmartSVN have the distribution "tricks" built in, or is that something you built "on top" of SmartSVN?
To be frank enough I have no idea on its internal architechture .We have an in house Source Control administrator who comes up with different tricks & tweaks.Limitations live only in our minds. But if we use our imaginations, our possibilities become limitless. PBUH |
 |
|
Kristen
Test
22859 Posts |
Posted - 2010-07-28 : 02:23:15
|
"We have an in house Source Control administrator"Blimey! A bit like a Butler then, eh?!! |
 |
|
Sachin.Nand
2937 Posts |
Posted - 2010-07-28 : 02:48:19
|
quote: Originally posted by Kristen "We have an in house Source Control administrator"Blimey! A bit like a Butler then, eh?!!
Yeah we have lot of positions in the company which can be synonymoms with butler,chauffeur,masseur etc Limitations live only in our minds. But if we use our imaginations, our possibilities become limitless. PBUH |
 |
|
Sun Foster
Aged Yak Warrior
515 Posts |
Posted - 2010-07-28 : 10:25:20
|
Is there any way to store a store procedure as a record in one table cell? If so, I can use code in app to finish this project.The problem is that only one line can be copied.For example, copy sp1 below into a cell will be "SET ANSI_NULLS ON" only. SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE PROCEDURE [dbo].[SP1]SELECT * FROM ORDER |
 |
|
Kristen
Test
22859 Posts |
Posted - 2010-07-28 : 10:51:52
|
Its probably in there, just the display-back will not display line breaks. Try query it in a Query Window, rather than an Edit Grid ? |
 |
|
Kristen
Test
22859 Posts |
Posted - 2010-07-28 : 10:52:57
|
Note that "GO" as a separator is only really a Query Analyser / SSMS section terminator, you may need to handle that specifically in your application when it tries to actually "run" the script |
 |
|
|