Sybase WorkSpace Videos

I was looking through the help docs of Sybase Workspace when I ran across a link to the Workspace Videos. For anyone that wants to take a look at Workspace before purchasing or downloading the Evaluation:

Share Button

FW (Slashdot): Google Releases MySQL Enhancements

Posted by CmdrTaco on Wednesday April 25, @11:19AM
from the what-an-exciting-morning-this-isn’t dept.
An anonymous reader noted that “Google has released its internally developed enhancements to MySQL to the open source community this week. Changes include improvements in replication, high availability configuration, and performance.” It’ll be interesting to see if the changes they made are of interest to other places using MySQL.

It’s about time! 🙂 MySQL has improved a great deal over the past year. Performance has gone way up and many of the design issues have been rectified. Google releasing their modifed MySQL code back to the community is a very very good thing indeed. Way to go Google!

Share Button

Replication Server Exception List Deleter (updated)

As you may remember, my good friend Ken Rearick created an excellent stored procedure, rs_del_all_exception, that safely clears out old exceptions from the RSSD database. Ken has just sent an updated version to me. B-)

IF OBJECT_ID('dbo.rs_del_exception') IS NOT NULL
BEGIN
    DROP PROCEDURE dbo.rs_del_exception
    IF OBJECT_ID('dbo.rs_del_exception') IS NOT NULL
        PRINT '< << FAILED DROPPING PROCEDURE dbo.rs_del_exception >>>'
    ELSE
        PRINT '< << DROPPED PROCEDURE dbo.rs_del_exception >>>'
END
go

-- rs_del_exception [xactid] [,xactid]
-- no transaction id just list exceptions
-- single xactid delete that xact
-- range of xactid's delete the full range of xact

create proc rs_del_exception
@xacts int = NULL,
@xacte int = NULL

as

declare @systran binary(8)
declare @cnt int, @err int
declare @ccnt char(8)
declare @cxact char(8)
declare @rsname varchar(30)
declare @cmdcount char(9)
declare @msg varchar(255)
declare @tab_name varchar(30)
declare @row_cnt int

set nocount on

/* find RS name */

select @rsname = charvalue
from   rs_config
where  optionname = "oserver"

/* Build temp table #tab1 */

create table #tab1
(    orig_site varchar(30),
    orig_db   varchar(30),
    orig_user varchar(30),
    orig_time datetime,
    error_site varchar(30),
    error_db varchar(30),
    log_time datetime,
    reccount int null,
    sys_trans_id binary(8),
    app_usr varchar(30)
)

insert into #tab1 (orig_site, orig_db,
           orig_user, orig_time,
           error_site, error_db,
           log_time, sys_trans_id,
           app_usr)
select
    orig_site,
    orig_db,
    orig_user,
    orig_time,
    error_site,
    error_db,
    log_time,
    sys_trans_id,
    app_usr
from    rs_exceptshdr exh

/* add logged command counts to table */

update #tab1
  set reccount = (select max(src_cmd_line)
                    from   rs_exceptscmd exc
                      where exc.sys_trans_id = #tab1.sys_trans_id
                    group by exc.sys_trans_id)
/* print summary */

begin
  select @cnt = count(sys_trans_id)
  from rs_exceptshdr

  select @ccnt = convert(char(8), @cnt)

  if (@cnt = 0)
  begin
    print " "
    /* 20500,"         There are 0 Logged Transactions." */
    exec rs_get_msg 20500, @msg output
    print @msg
    print " "
    return
  end

  print " "
  /* 20501,"         Summary of Logged Transactions on '%1!'", @rsname */
  exec rs_get_msg 20501, @msg output
  print @msg, @rsname
  print " "
  print " "

  if (convert(int, 0x0000100) = 65536)
  begin
    select
      "Xact ID" = convert(int, reverse(substring(sys_trans_id, 5, 8))),
      "Org Site" = substring(rtrim(orig_site)+"."+rtrim(orig_db), 1, 15),
      "Org User" = substring(orig_user, 1, 8),
      "Org Date " = convert(char(11), orig_time),
      "Dest Site" = substring(rtrim(error_site)+"."+rtrim(error_db), 1, 15),
      "# Recs/Xact" = reccount
    from #tab1
  end
  else
  begin
    select
      "Xact ID" = convert(int, substring(sys_trans_id, 5, 8)),
      "Org Site" = substring(rtrim(orig_site)+"."+rtrim(orig_db), 1, 15),
      "Org User" = substring(orig_user, 1, 8),
      "Org Date " = convert(char(11), orig_time),
      "Dest Site" = substring(rtrim(error_site)+"."+rtrim(error_db), 1, 15),
      "# Recs/Xact" = reccount
    from #tab1
  end

  print " "
  print " "
  /* 20502,"         To Delete a Specific Logged Xact., type 'rs_del_exception {Xact ID}'" */
  exec rs_get_msg 20502, @msg output
  print @msg
  print " "
end

if (@xacts = null)
  return 0
  
select @row_cnt = 1

while (@row_cnt > 0)
begin

set rowcount 1

  if (@xacte = null)
  begin
    if (convert(int, 0x0000100) = 65536)
      select @systran = sys_trans_id from #tab1 where convert(int, reverse(substring(sys_trans_id, 5, 8))) = @xacts
    else
      select @systran = sys_trans_id from #tab1 where convert(int, substring(sys_trans_id, 5, 8)) = @xacts
  end
  else
  begin
    if (convert(int, 0x0000100) = 65536)
      select @systran = sys_trans_id from #tab1 where convert(int, reverse(substring(sys_trans_id, 5, 8))) between @xacts and @xacte
    else
      select @systran = sys_trans_id from #tab1 where convert(int, substring(sys_trans_id, 5, 8)) between @xacts and @xacte
  end
  
  select @row_cnt = @@rowcount

  delete #tab1 where @systran = sys_trans_id

  set rowcount 0

  if (@row_cnt = 0)
  begin
    print " "
    print "Exceptions deleted"
    print " "
    return
  end

  if (convert(int, 0x0000100) = 65536)
    select @cxact = convert(char(8), convert(int, reverse(substring(@systran, 5, 8))))
  else
    select @cxact =  convert(char(8), convert(int, substring(@systran, 5, 8)))

  /* if logged transaction exists, delete it. */

  select @cmdcount = rtrim(convert(char(9), reccount))
  from   #tab1
  where  sys_trans_id = @systran

  print " "
  /* 20505," Deleting %1! Commands in Logged Transaction # %2! on '%3!'" */
  exec rs_get_msg 20505, @msg output
  print @msg, @cmdcount, @cxact, @rsname

  begin transaction

  delete  rs_systext
  from    rs_exceptscmd exc,
          rs_exceptshdr exh,
          rs_systext sys
  where   exc.sys_trans_id = exh.sys_trans_id
  and     exc.cmd_id = sys.parentid
  and     sys.texttype = "C"
  and     exh.sys_trans_id  =  @systran

  select @err = @@error

  if (@err != 0)
  begin
    select @tab_name = 'rs_systext'
    /* 20506,"Deleting %1! table failed. Transaction Rolled Back." */
    exec rs_get_msg 20506, @msg output
    print @msg, @tab_name
    rollback transaction
  end
  else
  begin
    delete  rs_exceptscmd
    where   sys_trans_id  =  @systran

    select @err = @@error

    if (@err != 0)
    begin
      select @tab_name = 'rs_exceptscmd'
      /* 20506,"Deleting %1! table failed. Transaction Rolled Back." */
      exec rs_get_msg 20506, @msg output
      print @msg, @tab_name
      rollback transaction
    end
    else
    begin
      delete  rs_exceptshdr
      where   sys_trans_id  =  @systran

      select @err = @@error

      if (@err != 0)
      begin
        select @tab_name = 'rs_exceptshdr'
        /* 20506,"Deleting %1! table failed. Transaction Rolled Back." */
        exec rs_get_msg 20506, @msg output
        print @msg, @tab_name
        rollback transaction
      end
      else
      begin
        commit transaction

        select @err = @@error

        if (@err !=0)
        begin
          /* 20509,"Executing 'commit transaction'  failed. Transaction Rolled Back." */
          exec rs_get_msg 20509, @msg output
          print @msg
          rollback transaction
        end
        else
        begin
          print " "
          /* 20510,"         Logged Transaction # %1! Successfully Deleted. Truncate RSSD Transaction Log if Necessary." */
          exec rs_get_msg 20510, @msg output
          print @msg, @cxact
          print " "
        end
      end
    end
  end
end


go
EXEC sp_procxmode 'dbo.rs_del_exception','unchained'
go
IF OBJECT_ID('dbo.rs_del_exception') IS NOT NULL
    PRINT '< << CREATED PROCEDURE dbo.rs_del_exception >>>'
ELSE
    PRINT '< << FAILED CREATING PROCEDURE dbo.rs_del_exception >>>'
go

Download: rs_del_exception stored procedure

Share Button

Workspace 1.7. Unable to set ‘execute’ permission on files

In “MyMobileServer” project (dummy project created by Workspace on install):

Right click on project -> New -> File -> select MyMobileServer giving any name (i.e. ‘j’) as the file name

Right click on File -> Properties -> Info -> check mark “Executable”.

Setting the Execute flag

Click “Apply” – the check box is now uncheck marked. 🙁

The execute flag is deselected

I opened a case with Sybase Technical Support and the TSE (thanks Kevin!) created CR 465942 to get this fixed.

Share Button

Minor bug with Sybase’s Workspace 1.7 regarding directories starting with a ‘.’

I’ve been using Sybase’s Workspace 1.7 for developing and maintaining a myriad of maintenance scripts, web pages, and other interesting things.  I ran into an interesting issue that is worthwhile to take note:
In most of the 3rd party plugins, the .components directory properly shows up in their perspectives.  For example, the EPIC plugin shows the .components directory in the project with no problems.
The EPIC Perl module's perspective shows the

None of Sybase’s eclipse plugins show the .components directory.  I believe this is based on the assumption that since Workspace only runs on windows, that dot directories are rare or nonexistent.  This is a minor bug but one that people should be aware of in case you think that Workspace ate your directory.  😉
Any of the Sybase plugin Perspectives don't include the .components directory.

Share Button

For those of you that believe that knitting is a ‘female’ hobby

1. Men don’t knit.

2. Knitting is a woman’s hobby.

3. Knitting has always been associated with women.

1. False 2. False 3. False

 

Civil War Veterans knitting at the Navy League Knitting Bee in New York's Central Park (1918)

 

A look at many of the current popular books on knitting would lead you to believe that all three statements above are true.

For example, a look at Debbie Stoller’s popular Stitch and Bitch book, while a passable guide to knitting, reveals a false history of knitting.

….

Read more of the history of men knitting at MenKnit.net

If nothing else, it is a great way to meet women 🙂

Share Button

Sybase Employees that SHOULD write a blog?

Are there any Sybase Employees that you wish would write to a blog? There are a number of Sybase Employees that I wish would (not a complete list):

  • Wim ten Have – he almost single handedly ported SQL Server 11.0 to Linux during his lunch hours (read: on his own time).
  • Peter Dorfman – this guy seems to know more about the MDA tables than anyone else on the planet. If you don’t know who he is, if you’ve ever seen Rob Vershoor present at TechWave, Peter is the guy with a peppered goatee presenting with (and sometime correcting) Rob.
  • Harold Mason – he runs TeamSybase with a iron fist. I’m joking, a velveted baseball bat when it is needed. 😉

I’ll add more tomorrow as I’m being told by my wife that it is ‘bed time’. Whom am I to argue about bedtime with a beautiful woman? hehe

Share Button

Making headway on the Sybase::TdsServer and Sybase::RepAgent perl modules

Remember my Sybase Replication Server: custom built RepAgents with Perl! post back last year? Well, not only am I the new maintainer, but I finally have it working in a test environment. It isn’t ready for a new release for Sybase::TdsServer and Sybase::RepAgent, yet, but expect one soon.

My main development environment for these two modules is:

  • Windows XP SP2
  • ActiveState Perl 5.8.8
  • Sybase Workspace 1.7 (Eclipse based)
    1. EPIC Perl plugin
    2. Subclipse (subversion client)

I’m hoping to get out my first CPAN release to the perl testers within the next month or so. Why the delay? My wife and I are expecting family and friends to stay with us for the next few weeks. That’s a very good thing 🙂

Share Button

A skill every techie needs to have!

The How-To Manual That Anyone Can Write or Edit

How to Wiggle Your Ears

We all have muscles that will move our ears around a little bit. The general consensus is that the ability to wiggle your ears is thanks to one gene, which has been turned off for some people, though, most of us don’t naturally know how to wiggle our ears voluntarily, even if we had the gene. Just as animals perk up their ears, humans can, too, and it is possible to learn how.

Read more….

Hey, if I can do it, I bet you could too! 😉

Share Button

Sybase Workspace and Subclipse

If you try to add the subversion plugin Subclipse to Sybase’s Workspace version 1.6 or 1.7, you will receive the following error:
Error generated by Workspace/Eclipse when attempting to import the Subclipse plugin
To work around this problem, you need to start Eclipse.exe directly, usually located in your %SYBASE%\Workspace\Eclipse directory. Go to Help -> Software Updates -> Find and Install -> Search for new features. Add the url (http://subclipse.tigris.org/update_1.0.x) and Name (subclipse). When you’re given the option to install, uncheck the “Show the latest version of a feature only”.

We need to use version 1.0.5 of subclipse because Sybase’s Workspace is running on top of the older Eclipse version 3.1 software. The newer subclipse requires Eclipse 3.2 or higher to work.
Uncheck
Uncheck “Subclipse 1.2.0” and check “Subclipse 1.0.5”.

Continue installing, ignore any warnings.

The other option, of course, is to install Eclipse 3.2x separately and point Workspace to it during the install of Workspace. That way we are able to use the current version of Eclipse. I have not tried this with the new Workspace 1.7 release yet. Sybase Workspace is hardcoded to work only with Eclipse 3.1.x releases. 🙁

This seems to only happen on Workspace 1.6 and 1.7 that was upgraded from 1.6. I’m investigating it some more.

UPDATE:  Sybase is going to create a techdoc explaining this behavior.  This is somewhat expected behavior because of the older 3.1x Eclipse version.

Share Button