Re: [GENERAL] NoSQL -vs- SQL
On Tue, Oct 12, 2010 at 2:58 AM, Peter C. Lai pe...@simons-rock.edu wrote: On 2010-10-11 05:57:37PM -0600, David Boreham wrote: On 10/11/2010 5:46 PM, Carlos Mennens wrote: Just wondering how you guys feel about NoSQL and I just wanted to share the following article... http://www.linuxjournal.com/article/10770 Looking to read your feedback and / or opinions. http://www.xtranormal.com/watch/6995033/ (warning: may not be sfw). Someone should (or probalby has) made one that sounds exactly the same, except for replacign the Mongo guy with MySQL and the MySQL guy with PostgreSQL. That might be more apopros all around ;) Someone did indeed do that: http://nigel.mcnie.name/blog/mysql-is-a-database (also nsfw, iirc) -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] Error while compiling on HP-UX ia64
Derk Jan Horstman dj.horst...@anva.nl writes: After a new install of HP-UX B.11.23 (ia64) and installing the latest patches on it, I've tried to compile PostgreSQL 9.0.1 from source again. But I've still got problems with compiling, the process is ending with the next errors: ip.c: In function 'pg_foreach_ifaddr': ip.c:654: error: storage size of 'lifc' isn't known ip.c:725: error: 'struct lifreq' has no member named 'lifr_addr' ip.c:735: error: 'struct lifreq' has no member named 'lifr_addr' Hm. A bit of googling suggests that HPUX is randomly incompatible with the rest of the world concerning the output format of SIOCGLIFCONF (which is no great surprise). Unfortunately, it seems they've shut down www.testdrive.hp.com, which means there's no longer any easy access to HP systems on which one could test a fix. If you want this fixed, you're going to have to do it yourself, or find some other HPUX user who will fix it, or provide access to an HPUX system to somebody who wants to fix it. regards, tom lane Hi Guys, You can usually get pre-built versions of Postgres for HP-UX here: http://hpux.connect.org.uk/hppd/cgi-bin/search?package=ondescription=onterm=postgresSearch=Search Only 9.0 there at the moment, but they are usually not far behind the release date. Regards, Joe Hi Joe, Thanks for your hint. I have download the binary package en installed it successfully. A disadvantage with this package is the absence of the contrib and OpenSSL, but for now it's working fine. Thanks all for your help. Regards Derk Jan Horstman ***DISCLAIMER*** Deze e-mail is uitsluitend bestemd voor de geadresseerde(n). Verstrekking aan en gebruik door anderen is niet toegestaan. ANVA bv sluit iedere aansprakelijkheid uit die voortvloeit uit electronische verzending. This e-mail is intended exclusively for the addressee(s), and may not be passed on to, or made available for use by any person other than the addressee(s). ANVA bv rules out any and every liability resulting from any electronic transmission. ** -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] NoSQL -vs- SQL
carlos.menn...@gmail.com (Carlos Mennens) writes: Just wondering how you guys feel about NoSQL and I just wanted to share the following article... http://www.linuxjournal.com/article/10770 Looking to read your feedback and / or opinions. There's a lot there to agree with, and a lot to not disagree with. A couple of places I'd dispute a bit... So, what is the opposite of ACID? BASE (Basically Available, Soft-state, Eventual consistency), of course. No, that's not the opposite, by any means. BASE represents a particular model for relaxation of the ACID model. Indeed, it's more or less an academic codifying of the consequences of systems like MQ-Series, which use message queues to allow several ACID databases to talk to each other, relaxing the total consistency of cross-DB transactions. On the NoSQL side, the only thing in common is that there is nothing in common. Each NoSQL database has its own set of APIs, libraries and preferred languages for interacting with the data they contain. With an RDBMS, it is trivial to get data out in whatever format you need using whatever programming language you like best. Your choice of a NoSQL database might limit you to one or a handful of programming languages and access methods. This is true, but is further, essentially, a step backwards into the way databases were handled before SQL. Back in the Old Days, your database probably used IMS or CODASYL or some B-Tree library (hmm... anything similar here to SleepycatDB versus MongoDB versus Cassandra versus Tokyo Cabinet? :-)). And the only way to extract that data was by writing a program to traverse the data structure. At best, you could choose between COBOL and PL/1, and you'd have to write a separate program for each custom retrieval. The move from that to SQL was considered a big step *AHEAD*, because SQL, being a declarative representation, was inherently a whole lot more language/OS/framework-independent. Whoops, MongoDB is web scale[1] breaks all that. No schema means there's no declarative representation, so the notion of the same data being reusable without having to duplicate the traversal logic goes away. What I consider *particularly* bad is that this fails to recognize that NoSQL represents, in considerable part, a throwback to the database strategies of the 1960s that were consciously rejected in the adoption of SQL. [1] http://andrewjstevens.com/2010/09/mongodb-is-web-scale/ -- (reverse (concatenate 'string moc.liamg @ enworbbc)) Any sufficiently complicated C or Fortran program contains an ad hoc informally-specified bug-ridden slow implementation of half of Common Lisp. -- Philip Greenspun -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] NoSQL -vs- SQL
Carlos == Carlos Mennens carlos.menn...@gmail.com writes: Carlos Looking to read your feedback and / or opinions. Here's what I wrote on the Smalltalk Seaside mailing list a few weeks back: I've given a talk a few times about forget the ORM. The slides are up on http://www.slideshare.net/RandalSchwartz/forget-the-orm The key thing that separates a lot of these newer databases is that you can't have all three of consistency, availability, and performance at once... you have to sacrifice something. Traditional SQL databases favored consistency over everything, but who cares if your blog page says read the 6 comments on this item for a couple of seconds when there are really 7 because one just got added. The new databases give options for higher availability or performance at the cost of consistency. Some, like Riak (interviewed at http://twit.tv/floss129), actually let you select on each request how consistent you want the results, thus controlling how fast you get the response. Thus, for the front page of a blog, you can say give me a result that any 1 of the 3 replicas has, but when you finally drill into the comments, you say give me a result that all 3 replicas agree on. Of course, these are all *eventually* consistent on the order of tens or hundreds of milliseconds, but by allowing almost correct results, things are a lot zippier. (It also works that way on write... you can say come back when any 1 replica says it has it or come back only when all 3 replicas confirm write.) So, it's not so much that you get schemaless key/value store (although that's a frequent feature)... it's that these aren't traditional databases in a lot of ways. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.posterous.com/ for Smalltalk discussion -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
[GENERAL] problem with PG install script on Windows
This message is CCed to Dave Page, because his name is found in startserver.vbs script discussed later. I think there is a (minor?) problem with 8.4.5 Windows installer from EnterpriseDB (probably othere releases as well - didn't check). Here is an abstract from the tail of my installation log file: /*/ Starting the database server... Executing cscript //NoLogo C:\VectorDB\installer\server\startserver.vbs PostgreSQL Script exit code: 0 Script output: Starting PostgreSQL Service PostgreSQL started successfully startserver.vbs ran to completion Script stderr: Loading additional SQL modules... Executing cscript //NoLogo C:\VectorDB\installer\server\loadmodules.vbs postgres C:\VectorDB C:\VectorDB\data 5432 1 Script exit code: 2 Script output: Installing pl/pgsql in the template1 databases... Start DoCmd(C:\VectorDB\bin\psql.exe -p 5432 -U postgres -c CREATE LANGUAGE plpgsql; template1)... Executing 'C:\Users\vmwin7\AppData\Local\Temp\rad87CE4.bat'... psql: FATAL: the database system is starting up End DoCmd() Failed to install pl/pgsql in the 'template1' database Installing the adminpack module in the postgres database... Start DoCmd(C:\VectorDB\bin\psql.exe -p 5432 -U postgres -f C:\VectorDB\share\contrib\adminpack.sql postgres)... Executing 'C:\Users\vmwin7\AppData\Local\Temp\rad87CE4.bat'... psql: FATAL: the database system is starting up End DoCmd() Failed to install the 'adminpack' module in the 'postgres' database loadmodules.vbs ran to completion Script stderr: Program ended with an error exit code /*/ According to this code in startserver.vbs: /**/ ' Find the service Set objService = objWMIService.Get(Win32_Service.Name=' strServiceName ') ' Start it (them) If objService.State Running Then WScript.Echo Starting objService.Name iRetval = objService.StartService() If iRetval = 0 Then WScript.Echo Service objService.Name started successfully Else WScript.Echo Failed to start the database server ( iRetVal ) WScript.Quit 1 End If Else WScript.Echo Service objService.Name is already running End If /**/ here is what happened on my system: 1. startserver.vbs sends a signal to Postgresql service to start: iRetval = objService.StartService() 2. Postgres accepted the signal and set iRetval = 0, but didn't start yet (admittedely machine was busy doing something else at the same time) 3. VB script assumes that service is started (without actually checking it's status) and proceeds trying to connect to PG (while running next installation VB script - loadmodules.vbs, according to installation log). I realize it's a rare situation when machine will be busy with something else while installing Postgres. But, it still can happen, and stricter code could avoid this problem:6 /**/ ' Find the service Set objService = objWMIService.Get(Win32_Service.Name=' strServiceName ') ' Start it (them) If objService.State Running Then WScript.Echo Starting objService.Name iRetval = objService.StartService() If iRetval = 0 Then Do Until objService.State = Running WScript.Sleep(5000) Loop WScript.Echo Service objService.Name started successfully Else WScript.Echo Failed to start the database server ( iRetVal ) WScript.Quit 1 End If Else WScript.Echo Service objService.Name is already running End If /**/ If it really waits for service to start, checking it's status in a loop. Same status check probably needed earlier in the script, where it's trying to start dependencies services. oh, and I have to admit that I have zero VB scripting experience, so please correct me if my code modification is wrong. Regards, Igor Neyman
Re: [GENERAL] NoSQL -vs- SQL
On Mon, Oct 11, 2010 at 6:57 PM, David Boreham david_l...@boreham.org wrote: http://www.xtranormal.com/watch/6995033/ (warning: may not be sfw). ROFLMAO!!! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] NoSQL -vs- SQL
On 12 Oct 2010, at 2:27 AM, Darren Duncan wrote: Some people would say that NoSQL is a contrast with relational databases but I would say that in fact these things are orthogonal. You can in fact use the relational model of data over both an ACID database as over a NoSQL database, just as you can use a key-value store over both as well. We (a large UK media organisation) use both SQL and NoSQL on our platform, and deploy each where it is most appropriate to do so. We endure extremely high loads from time to time from thundering herds, and to do this on a realistic budget, the NoSQL options give us the performance required. To insulate ourselves from unstable nosql interfaces, we defined a very simple HTTP based restful API to our nosql database, giving us the option to swap out our nosql database at a future date should we need to. For years, SQL has been sold as a magic hammer to solve all database problems, but as the size of the data exceeded the practical size of a machine, and as internet audiences grew faster than the capacity of individual servers, the need became apparent for more specific database types that performed a far simpler job, far faster. Regards, Graham -- -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] Text search parser's treatment of URLs and emails
Thom Brown wrote: Hi, I noticed that if I run this: SELECT alias, description, token FROM ts_debug('http://www.postgresql.org:2345/directory/page.html?version=9.1build=alpha1#summary'); I get: alias | description | token --+---+- protocol | Protocol head | http:// url | URL | www.postgresql.org:2345/directory/page.html?version=9.1build=alpha1#summary host | Host | www.postgresql.org:2345 url_path | URL path | /directory/page.html?version=9.1build=alpha1#summary (4 rows) It could be me being picky, but I don't regard parameters or page fragments as part of the URL path. Ideally, I'd sort of expect: alias | description | token --+---+- protocol | Protocol head | http:// url | URL | www.postgresql.org:2345/directory/page.html?version=9.1build=alpha1#summary host | Host | www.postgresql.org port | Port | 2345 url_path | URL path | /directory/page.html query_string | Query string | version=9.1build=alpha1 fragment | Page fragment | summary (7 rows) ... of course that's if there was support for query strings and page fragments, which there isn't. But if changes were made to support my definition of a URL path, they'd have to be considered breaking changes. Wow, that is a tough one. One the one hand, it seems nice to be able to split stuff out more, but on the other hand we would be making url_path less useful because people would need to piece things together to get the old behavior. In fact to piece things together we would need to add '?' and '#' optionally, which seems kind of hard. Perhaps we should keep url_path unchanged and add file_path that has your suggestion. That would allow more fine-grained control without breaking backward compatibility. We already duplicate some data with url and url_path, so having file_path as another place we duplicate some seems OK. But my main gripe is with the name url_path. Also: SELECT alias, description, token FROM ts_debug('myname+prior...@gmail.com'); Yields: alias | description | token ---+-+ asciiword | Word, all ASCII | myname blank | Space symbols | + email | Email address | prior...@gmail.com (3 rows) The entire string I entered is a valid email address, and isn't totally uncommon. Shouldn't that take such email address styles be taken into account? The example above incorrectly identifies the email address since the real destination address would most likely be myn...@gmail.com. I had no idea '+' could be part of an email address, and in fact it is a modifier that is stripped off when delivering the email: http://my.brandeis.edu/bboard/q-and-a-fetch-msg?msg_id=Nu I didn't even know that was possible. It is used as an email delivery flag. I agree that needs to be corrected. We fixed URLs in 9.0 with: Use more standards-compliant rules for parsing URL tokens (Tom Lane) so I think it is reasonable to fix email addresses in 9.1. Care to submit a patch? You can lookup Tom's change as a guide. -- Bruce Momjian br...@momjian.ushttp://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. + -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
[GENERAL] are there any method that Update command not affect other unrelated indices?
Hi, I have the following table: CREATE TABLE A ( a1 integer not null, a2 integer, a3 integer, a4 integer ) and have the following four indices: create index ind_a1 on A USING gist(a1); create index ind_a2 on A USING gist(a2); create index ind_a3 on A USING gist(a3); create index ind_a4 on A USING gist(a4); now we have 10,000 update command executions using spi_exeplan(): SPI_prepare(); // prepare the plan for update A set a4 = $1; for(i=0;i1;i++ ){ SPI_execute_plan();// update A set a4 = i; } the question is why all four indices updated in the execution of SPI_execute_plan()? I think there should only one index, that is ind_a4 be updated, how to avoid other three indices updated? thanks!
Re: [GENERAL] are there any method that Update command not affect other unrelated indices?
Well, the objects indices 1,2,3 point to changed when you changed column a4, but I don't know if that's the reason. I would guess that the indices are structured as pointers of some kind though. On Wed, Oct 13, 2010 at 9:03 AM, sunpeng blueva...@gmail.com wrote: the question is why all four indices updated in the execution of SPI_execute_plan()? I think there should only one index, that is ind_a4 be updated, how to avoid other three indices updated? thanks!
Re: [GENERAL] are there any method that Update command not affect other unrelated indices?
Thanks. I could give more clues. The call stack of the function most consumed time is: Thread [1] (Suspended) 34 ExecInsertIndexTuples() /home/postgres/develop/postgresql-snapshot/src/backend/executor/execUtils.c:1046 0x08201e66 33 ExecUpdate() /home/postgres/develop/postgresql-snapshot/src/backend/executor/execMain.c:2135 0x081f3b13 32 ExecutePlan() /home/postgres/develop/postgresql-snapshot/src/backend/executor/execMain.c:1681 0x081f31c6 31 standard_ExecutorRun() /home/postgres/develop/postgresql-snapshot/src/backend/executor/execMain.c:309 0x081f0f4b 30 ExecutorRun() /home/postgres/develop/postgresql-snapshot/src/backend/executor/execMain.c:258 0x081f0e04 29 _SPI_pquery() /home/postgres/develop/postgresql-snapshot/src/backend/executor/spi.c:2009 0x0821fe8c 28 _SPI_execute_plan() /home/postgres/develop/postgresql-snapshot/src/backend/executor/spi.c:1831 0x0821facd 27 SPI_execute_plan() /home/postgres/develop/postgresql-snapshot/src/backend/executor/spi.c:392 0x0821d201 in execMain.c, the call of ExecInsertIndexTuples() is as following: if (resultRelInfo-ri_NumIndices 0 !HeapTupleIsHeapOnly(tuple)) ExecInsertIndexTuples(slot, (tuple-t_self), estate, false); 2010/10/12 Ben Carbery ben.carb...@gmail.com Well, the objects indices 1,2,3 point to changed when you changed column a4, but I don't know if that's the reason. I would guess that the indices are structured as pointers of some kind though. On Wed, Oct 13, 2010 at 9:03 AM, sunpeng blueva...@gmail.com wrote: the question is why all four indices updated in the execution of SPI_execute_plan()? I think there should only one index, that is ind_a4 be updated, how to avoid other three indices updated? thanks!
[GENERAL] Gripe: bytea_output default = data corruption
Defaulting bytea output from the backend to use hex mode encoding, which is incompatible with pre-9.0 interfaces, wasn't a friendly thing to do. The default should have been escape mode. Or else you needed a big warning in HISTORY that we must either change bytea_output, or upgrade all clients before servers. Because using a 9.0 server with a 8.x libpq-based client results in undetected data corruption when selecting BYTEA objects. By default, the 9.0 server encodes a bytea using hex mode, but an 8.x libpq-based client will decode that using escape mode, with no error detected on either end. For example, start with A, encode to \x40 decode to x40. There are good reasons to break backward compatibility, like security or standards compliance, but not performance. Please think twice next time you consider breaking stuff just because you think the new way should be faster. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] NoSQL -vs- SQL
On 2010/10/12 8:46, Carlos Mennens wrote: Just wondering how you guys feel about NoSQL and I just wanted to share the following article... http://www.linuxjournal.com/article/10770 Looking to read your feedback and / or opinions. Seems a nice article. I like it. :) I think NoSQL is a new implementation built with old technologies. Computing paradigm (and the hype) is repeatable. I know there are several trade-offs on making decisions of technology design, such as Traditional RDBMS, In-Memory Datatabase, Key-Value Store or something like that. A few years ago, I heard that Michael Stonebraker said There is no new (theoretical) invention around the database technology. The key is integration of existing technologies. I agree with that. At that time, he was working for the C-store. Anyway, NoSQL is grown as a kind of storage, not a database to process business transactions (As the article mentioned, early MySQL users knew an importance of web-scale storage). However, when NoSQL process more critical transactions or critical user data, it needs to be ACID-compliant, and needs to have several technologies around traditional RDBMSes. For example, Cassandra is now having its write-ahead-logging. So, from my viewpoint, NoSQL is a subset of traditional database technologies, and I agree with that it would deliver values in some use cases, because there are several trade-offs and overheads on existing technologies in such use cases. However, NoSQL is still lacking important features and/or properties to process business transactions, and there are only few sites having needs for true Facebook-size scalability. Thanks, -- NAGAYASU Satoshi satoshi.nagay...@gmail.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] psql copy command - 1 char limitation on delimiter
Steve Crawford wrote: On 09/25/2010 07:03 AM, Tom Lane wrote: reyreyw...@optonline.net writes: Why limit this to a single character? Performance. Believe it or not, breaking fields at the delimiter is a significant factor in COPY speed. regards, tom lane I agree that that multi-character (or even regex) delimiters would be useful. Would it be reasonable for the copy process to differentiate between single character delimiters which could be processed in high-speed mode and multi-character or regex delimiters which would be available as needed albeit at the expense of a performance hit? I am not sure you are aware but Postgres never confuses delimiters from data because it uses a backslash before literal data that matches delimiters. -- Bruce Momjian br...@momjian.ushttp://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. + -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] problem with PG install script on Windows
Hi Igor Neyman, Yeah - I agree with you. That needs to be changed. But, I see scope of the improvement in the script, you shared. That is - what if the service never started, then it will never return from the script. We will do the required changes, Thanks for your inputs. -- Thanks Regards, Ashesh Vashi EnterpriseDB INDIA: Enterprise Postgres Companyhttp://www.enterprisedb.com *http://www.linkedin.com/in/asheshvashi*http://www.linkedin.com/in/asheshvashi On Tue, Oct 12, 2010 at 11:56 PM, Igor Neyman iney...@perceptron.comwrote: This message is CCed to Dave Page, because his name is found in startserver.vbs script discussed later. I think there is a (minor?) problem with 8.4.5 Windows installer from EnterpriseDB (probably othere releases as well - didn't check). Here is an abstract from the tail of my installation log file: /*/ Starting the database server... Executing cscript //NoLogo C:\VectorDB\installer\server\startserver.vbs PostgreSQL Script exit code: 0 Script output: Starting PostgreSQL Service PostgreSQL started successfully startserver.vbs ran to completion Script stderr: Loading additional SQL modules... Executing cscript //NoLogo C:\VectorDB\installer\server\loadmodules.vbs postgres C:\VectorDB C:\VectorDB\data 5432 1 Script exit code: 2 Script output: Installing pl/pgsql in the template1 databases... Start DoCmd(C:\VectorDB\bin\psql.exe -p 5432 -U postgres -c CREATE LANGUAGE plpgsql; template1)... Executing 'C:\Users\vmwin7\AppData\Local\Temp\rad87CE4.bat'... psql: FATAL: the database system is starting up End DoCmd() Failed to install pl/pgsql in the 'template1' database Installing the adminpack module in the postgres database... Start DoCmd(C:\VectorDB\bin\psql.exe -p 5432 -U postgres -f C:\VectorDB\share\contrib\adminpack.sql postgres)... Executing 'C:\Users\vmwin7\AppData\Local\Temp\rad87CE4.bat'... psql: FATAL: the database system is starting up End DoCmd() Failed to install the 'adminpack' module in the 'postgres' database loadmodules.vbs ran to completion Script stderr: Program ended with an error exit code /*/ According to this code in startserver.vbs: /**/ ' Find the service Set objService = objWMIService.Get(Win32_Service.Name=' strServiceName ') ' Start it (them) If objService.State Running Then WScript.Echo Starting objService.Name iRetval = objService.StartService() If iRetval = 0 Then WScript.Echo Service objService.Name started successfully Else WScript.Echo Failed to start the database server ( iRetVal ) WScript.Quit 1 End If Else WScript.Echo Service objService.Name is already running End If /**/ here is what happened on my system: 1. startserver.vbs sends a signal to Postgresql service to start: iRetval = objService.StartService() 2. Postgres accepted the signal and set iRetval = 0, but didn't start yet (admittedely machine was busy doing something else at the same time) 3. VB script assumes that service is started (without actually checking it's status) and proceeds trying to connect to PG (while running next installation VB script - loadmodules.vbs, according to installation log). I realize it's a rare situation when machine will be busy with something else while installing Postgres. But, it still can happen, and stricter code could avoid this problem:6 /**/ ' Find the service Set objService = objWMIService.Get(Win32_Service.Name=' strServiceName ') ' Start it (them) If objService.State Running Then WScript.Echo Starting objService.Name iRetval = objService.StartService() If iRetval = 0 Then Do Until objService.State = Running WScript.Sleep(5000) Loop WScript.Echo Service objService.Name started successfully Else WScript.Echo Failed to start the database server ( iRetVal ) WScript.Quit 1 End If Else WScript.Echo Service objService.Name is already running End If /**/ If it really waits for service to start, checking it's status in a loop. Same status check probably needed earlier in the script, where it's trying to start dependencies services. oh, and I have to admit that I have zero VB scripting experience, so please correct me if my code modification is wrong. Regards, Igor Neyman