Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2013
    Posts
    4

    Unanswered: DBD::Sybase - can't change context to database xyz

    sub : I'm getting issue with sybase......I'm trying to connect IBM netcool omnibus with sybase from perl script...I'm getting worning as that DBD:: Sybase - can't change context to database xyz




    pls can you help on this issue...If you post solutions regarding on this issue...It's needful to me...

    below is the script which is connecting Netcool omnibus sybase database.......

    I have two instances (Databases) in Sybase server are DERUYI1P and DERUYI1D and the sybase server name is DERUYI ...when I'm communicating with Sybase server is connecting successfully and It's default connecting to first instance called DERUYI1P ..



    But when I'm trying to connect manually with first instance or second instance as like below script is giving warning that DBD:ybase - can't change context to database DERUYI1P


    #!/cust/perl/bin/perl
    use DBI;
    use strict;
    use warnings;
    my $dbname ="DERUYI1P";

    my $dbh = DBI->connect('DBIybase:server=DERUYI;database=$dbname', 'root', '')
    or die "Cannot log into \n";
    $dbh->do("use $dbname");
    print"KCconnecected";



    $dbh->disconnect;

    Is there any possibility to connect instances of Netcool omnibus sybase through perlscript?
    Last edited by krishnach; 04-23-13 at 07:56. Reason: I'm getting issue with netcool omnibus sybase ....I'm trying to connect IBM netcool omnibus with sybase from perl script...

  2. #2
    Join Date
    Jan 2004
    Posts
    545
    Provided Answers: 4
    Have you tried connecting manually with isql or the like? Try to make sure that your server works properly before implementing your perl-script.
    I'm not crazy, I'm an aeroplane!

  3. #3
    Join Date
    Apr 2013
    Posts
    4
    Hi....... I tried manually with Sybase server name and I'm using Netcool omnibus with sybase database....I tried manually with nco_sql ,so It was success with Sybase instance name and it's credentials.. but when I'm trying to connect from perlscipt using with instances as like (mentioned above) my $dbh = DBI->connect('DBI::sybase:server=DERUYI;database=DERUY I1P', 'root', '') , In this case it is giving warning...

    If I tried with DBI->connect('DBI:ybase:database=DERUYI1P', 'root', ' ') - In this case it throwing with failure error

    DBI->connect('DBI:ybase:server=DERUYI1P', 'root', ' ') - In this case also it throwing with failure error

    but DBI->connect('DBI::sybase:server=DERUYI;database=DERUY I1P', 'root', '') - In this case it is giving warning that DBD:: Sybase - can't change context to database DERUYI1P


    My doubt is it correct syntax to connect sybase database instances ........ Pls help me out on this issue....
    Last edited by krishnach; 04-23-13 at 08:11. Reason: DBD::Sybase - can't change context to database xyz

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •