Software Development/Engineering Thread

Started by AbbeySider, December 22, 2010, 10:46:22 AM

Previous topic - Next topic

Fear ón Srath Bán

Quote from: AbbeySider on December 22, 2010, 02:46:21 PM
I dont like SQL Server, you cant roll back which is a pain!

I believe you can, but you have to explicitly 'set transaction' first, or something like that.
Carlsberg don't do Gombeenocracies, but by jaysus if they did...

AbbeySider

Quote from: Fear ón Srath Bán on December 22, 2010, 02:53:31 PM
Quote from: AbbeySider on December 22, 2010, 02:46:21 PM
I dont like SQL Server, you cant roll back which is a pain!

I believe you can, but you have to explicitly 'set transaction' first, or something like that.

Thats news to me, I use MS SQL Server Management Studio, and never heard of a rollback.
In my last company we had Oracle 9 or 10g and it was much handier

Geoff Tipps

Quote from: Fear ón Srath Bán on December 22, 2010, 02:53:31 PM
Quote from: AbbeySider on December 22, 2010, 02:46:21 PM
I dont like SQL Server, you cant roll back which is a pain!

I believe you can, but you have to explicitly 'set transaction' first, or something like that.

I'm not a DBA but have written stored procs that perform roll backs if an error has occurred otherwise commit the transaction. They're standard I would have thought??

AbbeySider

Quote from: Geoff Tipps on December 22, 2010, 03:00:09 PM
Quote from: Fear ón Srath Bán on December 22, 2010, 02:53:31 PM
Quote from: AbbeySider on December 22, 2010, 02:46:21 PM
I dont like SQL Server, you cant roll back which is a pain!

I believe you can, but you have to explicitly 'set transaction' first, or something like that.

I'm not a DBA but have written stored procs that perform roll backs if an error has occurred otherwise commit the transaction. They're standard I would have thought??

Well on oracle, if you execute SQL and make a mistake you can just type
rollback;
and it will roll back the last transaction AFAICT
But SQL Server doesnt allow that I thought

Goats Do Shave

Quote from: AbbeySider on December 22, 2010, 02:47:14 PM
Quote from: Goats Do Shave on December 22, 2010, 02:36:02 PM
.Net Developer. Create custom web apps that communicate via web services to a vendor software application.

Any jobs going?

Where are you based Goats?
Sh!t loads of work in Dublin and most cities down south in Java / .NET

Belfast. Seems to be plenty advertised up here. I'm terrible at interviews - technical jargon definitions etc, but I get my work done!

Fear ón Srath Bán

#20
Quote from: Geoff Tipps on December 22, 2010, 03:00:09 PM
I'm not a DBA but have written stored procs that perform roll backs if an error has occurred otherwise commit the transaction. They're standard I would have thought??

That sounds like those stored procs were written against an Oracle database, i.e., was the programming language PL/SQL?

With SQL Server, and its associated language Transact-SQL (T-SQL), you'd need something like:

DECLARE @TransactionName varchar(20) = 'Transaction1';

BEGIN TRAN @TransactionName
       INSERT INTO ValueTable VALUES(1)
       INSERT INTO ValueTable VALUES(2)
ROLLBACK TRAN @TransactionName

Carlsberg don't do Gombeenocracies, but by jaysus if they did...

Geoff Tipps

Quote from: AbbeySider on December 22, 2010, 03:04:22 PM
Quote from: Geoff Tipps on December 22, 2010, 03:00:09 PM
Quote from: Fear ón Srath Bán on December 22, 2010, 02:53:31 PM
Quote from: AbbeySider on December 22, 2010, 02:46:21 PM
I dont like SQL Server, you cant roll back which is a pain!

I believe you can, but you have to explicitly 'set transaction' first, or something like that.

I'm not a DBA but have written stored procs that perform roll backs if an error has occurred otherwise commit the transaction. They're standard I would have thought??

Well on oracle, if you execute SQL and make a mistake you can just type
rollback;
and it will roll back the last transaction AFAICT
But SQL Server doesnt allow that I thought

Something like this would work:

CREATE PROCEDURE TestSP

AS
DECLARE @sp_error1    int
   BEGIN TRAN
   BEGIN
                                 //do whatever here      
      
      SELECT @sp_error1 = @@ERROR   
   END

   IF @sp_error1 = 0
      BEGIN
            COMMIT TRAN
      END
   ELSE
      BEGIN
            ROLLBACK TRAN
   END
GO

Fear ón Srath Bán

That's SQL Server (or Sybase), and T-SQL is very rudimentary compared to PL/SQL, would do your head in  ;)
Carlsberg don't do Gombeenocracies, but by jaysus if they did...

Maiden1

#23
Oracle is neater than SQL server in terms of Rollback.  With Oracle you can run an update script, then run a select statement and look at the output, if it is correct then decide to commit or rollback.  With SQL server you can have a rollback for the script if there is an error but the rollback has to be part of the script.

I'd say generally Oracle is considered more robust etc. but SQL Server is cheaper so it depends on what a companys main considerations are.
There are no proofs, only opinions.

heganboy

I get to play with a lot of high perf stuff, database wise, vertica, hadoopdb, kx, greenplum that our R&D guys have. A lot of the high end hardware and networking kit, usually a long time ahead of it hitting the market. Still fun to be a geek...
Never underestimate the predictability of stupidity

AbbeySider

Quote from: Goats Do Shave on December 22, 2010, 03:05:43 PM
Quote from: AbbeySider on December 22, 2010, 02:47:14 PM
Quote from: Goats Do Shave on December 22, 2010, 02:36:02 PM
.Net Developer. Create custom web apps that communicate via web services to a vendor software application.

Any jobs going?

Where are you based Goats?
Sh!t loads of work in Dublin and most cities down south in Java / .NET

Belfast. Seems to be plenty advertised up here. I'm terrible at interviews - technical jargon definitions etc, but I get my work done!

Interviews are always technical which is a pain, but you should study up and have about 20 common interview definitions written up and printed out so you can glance at it now and again to learn them.

In my line there is classic technical Java questions that come up that you have to answer certain ways or you sound like you dont know what your on about, even if you do understand what your saying without the proper jargon. 

ziggysego

Testing Accessibility

Goldengreen


Dinny Breen

If you want a job as a DBA - SQLServer is your man, every contract we take on is now SQLServer and whereas before it was all Oracle.

There is no contest as regards integration, performance, scalability and management, Oracle all the way.

I've been an Oracle DBA the last 11 years so anytime I work on SQLServer I keep thinking like Oracle, very frustrating...

We could probably setup our own GAABoard Software House, all we need is an idea (something we can sell to every GAA Club in the country) and some sales arseholes to pitch it and we're sorted.
#newbridgeornowhere

imtommygunn

Oracle licensing costs are pretty big I think which would be the key problem. I used to work in a large place where it was Oracle all the way but now I've went to smaller company we wouldn't touch it.

Oracle will do many things by default which you won't get on the other platforms.

That being said I do very little DB work these days.

There do sound to be plenty of jobs in Belfast these days. InvestNI etc still put in a lot of money and a lot of the yank companies take advantage of this. Basically they can increase their staff at no cost because Invest NI will pay the salaries of a good few staff members. Seems to suit both parties. Hope they continue to invest if(more like when) the tories pull the plug on that kind of funding!