Community

Subscribe
Highlighted
Accepted Solution

Snapcreator configuration for SAP Sybase ASE

Hello.

I am trying to configure snapcreator to backup our Sybase database. I am using snapcreator 4.0p1 on Linux RHEL 6.4. The relevant part of my config file looks like this:

------------------------------------------------------

SYBASE_SERVER=SBT

SYBASE_USER=sybsbt

SYBASE_DATABASES=SBT:sapsa/93616c7425625f5f44b68281853be0e3219c33df62a8bc16c5adc374c7ed88e4

SYBASE_ISQL_CMD=/sybase/SBT/OCS-15_0/bin/isql

SYBASE=/sybase/SBT

SYBASE_LOGDIR=/sybase/SBT/saplog_1

------------------------------------------------------

   

However, when I start the command for backup, I receive following error during DB quiescence:

------------------------------------------------------

[2013-11-22 15:36:15,348] INFO: [dbhost:9090 (4.0.0.1)] SYBASE:QUIESCE: Quiescing database SBT

[2013-11-22 15:36:15,349] ERROR: [dbhost:9090 (4.0.0.1)] [syb-00012] SYBASE:RUN_CMD: Command [/bin/su - sybsbt -c "/sybase/SBT/OCS-15_0/bin/isql -Usapsa -Pxxxxx -SSBT -w 1024 -i /tmp/1qZre74f5v.sc"] failed with return code 256 and message -SSBT: Command not found.

[2013-11-22 15:36:15,350] ERROR: [dbhost:9090 (4.0.0.1)] [syb-00012] SYBASE:RUN_CMD: Command [/bin/su - sybsbt -c "/sybase/SBT/OCS-15_0/bin/isql -Usapsa -Pxxxxx -SSBT -w 1024 -i /tmp/ITSVyBIsOE.sc"] failed with return code 256 and message -SSBT: Command not found.

[2013-11-22 15:36:15,350] ERROR: [dbhost:9090 (4.0.0.1)] [syb-00012] SYBASE:RUN_CMD: Command [/bin/su - sybsbt -c "/sybase/SBT/OCS-15_0/bin/isql -Usapsa -Pxxxxx -SSBT -w 1024 -i /tmp/SYG0mU18iI.sc"] failed with return code 256 and message -SSBT: Command not found.

[2013-11-22 15:36:15,351] ERROR: [dbhost:9090 (4.0.0.1)] [syb-00012] SYBASE:RUN_CMD: Command [/bin/su - sybsbt -c "/sybase/SBT/OCS-15_0/bin/isql -Usapsa -Pxxxxx -SSBT -w 1024 -i /tmp/BXlOew09mX.sc"] failed with return code 256 and message -SSBT: Command not found.

[2013-11-22 15:36:15,351] ERROR: [dbhost:9090 (4.0.0.1)] [syb-00012] SYBASE:RUN_CMD: Command [/bin/su - sybsbt -c "/sybase/SBT/OCS-15_0/bin/isql -Usapsa -Pxxxxx -SSBT -w 1024 -i /tmp/FFBBkjwsrf.sc"] failed with return code 256 and message -SSBT: Command not found.

[2013-11-22 15:36:15,352] ERROR: [dbhost:9090 (4.0.0.1)] [syb-00012] SYBASE:RUN_CMD: Command [/bin/su - sybsbt -c "/sybase/SBT/OCS-15_0/bin/isql -Usapsa -Pxxxxx -SSBT -w 1024 -i /tmp/6y1nvhnKr6.sc"] failed with return code 256 and message -SSBT: Command not found.

[2013-11-22 15:36:15,353] ERROR: [dbhost:9090 (4.0.0.1)] [syb-00012] SYBASE:RUN_CMD: Command [/bin/su - sybsbt -c "/sybase/SBT/OCS-15_0/bin/isql -Usapsa -Pxxxxx -SSBT -w 1024 -i /tmp/8wcpnpR2v8.sc"] failed with return code 256 and message -SSBT: Command not found.

[2013-11-22 15:36:15,353] ERROR: [dbhost:9090 (4.0.0.1)] [syb-00004] SYBASE:QUIESCE: Quiescing databases failed

------------------------------------------------------

Another problem (that did not occure yet but i expect it to come) is that I have the DB installed with a virtual hostname (DB is using hostname that is not the same as OS host). Therefore the calling for isql must contain -X parameter otherwise an error will be displayed:

------------------------------------------------------

[root@host01 sybase]# /bin/su - sybsbt -c "/sybase/SBT/OCS-15_0/bin/isql -Usapsa -Ppassword -SSBT -w 1024 -i /tmp/jYMsmsFNjz.sc"

Msg 1640, Level 16, State 2:

Server 'SBT':

Adaptive Server requires encryption of the login password on the network.

Msg 4002, Level 14, State 1:

Server 'SBT':

Login failed.

CT-LIBRARY error:

        ct_connect(): protocol specific layer: external error: The attempt to connect to the server failed.

------------------------------------------------------

 

How can I configure this -X parameter to be a part of -sql calling ?

 

Any assistance with these 2 problems would be appreciated.

Thank you.

Josef

Re: Snapcreator configuration for SAP Sybase ASE

Hi Josef,

Maybe using "-S SBT" instead of "-SSBT" will already do the job!?

Also I would use "-P xxxxx" instead of "-Pxxxxx".

So, try to add a space after the options!

maybe this will help...

Thanks,

Horst

Re: Snapcreator configuration for SAP Sybase ASE

Hello Josef,

The error you have given is discussed here.

http://scn.sap.com/thread/3268654

In the above thread, they are suggesting to unlock the sa account as below.

$> isql -Usapsso -S<SID>

                       1> sp_locklogin 'sa', 'unlock'

                       2> go

Please let me know if that helps.

Also about the -X option

http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc30191.1550/html/utility/BABEFHFB.htm

This allows below.

-X

initiates the login connection to the server with client-side password encryption. -X enables both extended password encrypted connections and password encrypted connections without plain text password reconnection. isql (the client) specifies to the server that password encryption is desired. The server sends back an encryption key, which isql uses to encrypt your password, and the server uses the key to authenticate your password when it arrives.

If isql crashes, the system creates a core file that contains your password. If you did not use the encryption option, the password appears in plain text in the file. If you used the encryption option, your password is not readable.

Are you using encryption?  If not, you may not need the -X

Thanks,
Siva Ramanathan

Re: Snapcreator configuration for SAP Sybase ASE

Hello.

Thank you for your answer. The thread you refer to is discussing a general problem in connecting to Sybase DB but my problem is different. Anyway, to make really sure, I unlocked the account but the result is the same.

Anyway, I will try to re-formulate my problem once again to prevent any misunderstanding. I use snapcreator configuration file for my Sybase DB as described in my original post. When I try to run the backup command, I get following:

------------------------------------------------------

[root@host01 sybase]# /dynamiclandscape/opt/scServer/snapcreator -profile sybase -config sbt -action backup -policy hourly -verbose

########## Detecting Data ONTAP mode for vnsap1012ha ##########

[Sat Nov 23 15:39:27 2013] INFO: STORAGE-03031: System version details of [vfiler].

[Sat Nov 23 15:39:27 2013] INFO: STORAGE-03032: System version details of [vfiler] finished successfully.

########## Agent validation ##########

[Sat Nov 23 15:39:22 2013] INFO: Agent validation completed successfuly for agent dbhost:9090

########## Plugin validation ##########

[Sat Nov 23 15:39:22 2013] INFO: Plugin validation completed successfuly for plugin sybase

########## PRE APPLICATION QUIESCE COMMANDS ##########

[Sat Nov 23 15:39:22 2013] INFO: Pre application quiesce commands are not defined

########## PRE APPLICATION QUIESCE COMMANDS FINISHED SUCCESSFULLY  ##########

[Sat Nov 23 15:39:22 2013] INFO: Application auto discovery is not enabled skipping .

[Sat Nov 23 15:39:22 2013] INFO: Validate volume is not enabled skipping validate volume task.

########## Application Quiesce ##########

[Sat Nov 23 15:39:27 2013] INFO: [dbhost:9090 (4.0.0.1)] SYBASE:QUIESCE: Starting

[Sat Nov 23 15:39:27 2013] INFO: [dbhost:9090 (4.0.0.1)] SYBASE:EXPAND_DB: Entered

[Sat Nov 23 15:39:27 2013] INFO: [dbhost:9090 (4.0.0.1)] SYBASE:EXPAND_DB: No database discovery (+ALL) specified, finishing

[Sat Nov 23 15:39:27 2013] INFO: [dbhost:9090 (4.0.0.1)] SYBASE:QUIESCE: Quiescing database SBT

[Sat Nov 23 15:39:27 2013] ERROR: [dbhost:9090 (4.0.0.1)] [syb-00012] SYBASE:RUN_CMD: Command [/bin/su - sybsbt -c "/sybase/SBT/OCS-15_0/bin/isql -Usapsa -Pxxxxx -SSBT -w 1024 -i /tmp/18q8wSe_Ef.sc"] failed with return code 256 and message -SSBT: Command not found.

[Sat Nov 23 15:39:27 2013] ERROR: [dbhost:9090 (4.0.0.1)] [syb-00012] SYBASE:RUN_CMD: Command [/bin/su - sybsbt -c "/sybase/SBT/OCS-15_0/bin/isql -Usapsa -Pxxxxx -SSBT -w 1024 -i /tmp/xSFks63Vzx.sc"] failed with return code 256 and message -SSBT: Command not found.

[Sat Nov 23 15:39:27 2013] ERROR: [dbhost:9090 (4.0.0.1)] [syb-00012] SYBASE:RUN_CMD: Command [/bin/su - sybsbt -c "/sybase/SBT/OCS-15_0/bin/isql -Usapsa -Pxxxxx -SSBT -w 1024 -i /tmp/6PBjVe_YkJ.sc"] failed with return code 256 and message -SSBT: Command not found.

[Sat Nov 23 15:39:27 2013] ERROR: [dbhost:9090 (4.0.0.1)] [syb-00012] SYBASE:RUN_CMD: Command [/bin/su - sybsbt -c "/sybase/SBT/OCS-15_0/bin/isql -Usapsa -Pxxxxx -SSBT -w 1024 -i /tmp/SFBw3wxkVf.sc"] failed with return code 256 and message -SSBT: Command not found.

[Sat Nov 23 15:39:27 2013] ERROR: [dbhost:9090 (4.0.0.1)] [syb-00012] SYBASE:RUN_CMD: Command [/bin/su - sybsbt -c "/sybase/SBT/OCS-15_0/bin/isql -Usapsa -Pxxxxx -SSBT -w 1024 -i /tmp/S8XK1cZVB5.sc"] failed with return code 256 and message -SSBT: Command not found.

[Sat Nov 23 15:39:27 2013] ERROR: [dbhost:9090 (4.0.0.1)] [syb-00012] SYBASE:RUN_CMD: Command [/bin/su - sybsbt -c "/sybase/SBT/OCS-15_0/bin/isql -Usapsa -Pxxxxx -SSBT -w 1024 -i /tmp/MGf4Tgh_OY.sc"] failed with return code 256 and message -SSBT: Command not found.

[Sat Nov 23 15:39:27 2013] ERROR: [dbhost:9090 (4.0.0.1)] [syb-00012] SYBASE:RUN_CMD: Command [/bin/su - sybsbt -c "/sybase/SBT/OCS-15_0/bin/isql -Usapsa -Pxxxxx -SSBT -w 1024 -i /tmp/_8kBhPV8Af.sc"] failed with return code 256 and message -SSBT: Command not found.

[Sat Nov 23 15:39:27 2013] ERROR: [dbhost:9090 (4.0.0.1)] [syb-00004] SYBASE:QUIESCE: Quiescing databases failed

[Sat Nov 23 15:39:24 2013] ERROR: [dbhost:9090(4.0.0.1)] SCF-00037: Application quiesce for plugin [sybase] failed with error [-SSBT: Command not found.] and exit code [256], Exiting!

[Sat Nov 23 15:39:27 2013] ERROR: Task: quiesce with config:sybase@sbt failed

########## Application Unquiesce ##########

[Sat Nov 23 15:39:27 2013] INFO: [dbhost:9090 (4.0.0.1)] SYBASE:UNQUIESCE: Starting

[Sat Nov 23 15:39:27 2013] INFO: [dbhost:9090 (4.0.0.1)] SYBASE:EXPAND_DB: Entered

[Sat Nov 23 15:39:27 2013] INFO: [dbhost:9090 (4.0.0.1)] SYBASE:EXPAND_DB: No database discovery (+ALL) specified, finishing

[Sat Nov 23 15:39:27 2013] INFO: [dbhost:9090 (4.0.0.1)] SYBASE:UQUIESCE: Unquiescing database master

[Sat Nov 23 15:39:27 2013] ERROR: [dbhost:9090 (4.0.0.1)] [syb-00012] SYBASE:RUN_CMD: Command [/bin/su - sybsbt -c "/sybase/SBT/OCS-15_0/bin/isql -Usapsa -Pxxxxx -SSBT -w 1024 -i /tmp/wdyz8g_Tn6.sc"] failed with return code 256 and message -SSBT: Command not found.

[Sat Nov 23 15:39:27 2013] INFO: [dbhost:9090 (4.0.0.1)] SYBASE:UQUIESCE: Unquiescing database master failed

[Sat Nov 23 15:39:27 2013] ERROR: [dbhost:9090 (4.0.0.1)] [syb-00005] SYBASE:UNQUIESCE: Unquiescing databases failed

[Sat Nov 23 15:39:24 2013] ERROR: [dbhost:9090(4.0.0.1)] SCF-00032: Application unquiesce failed due to application error. Check logs and application settings. To ignore application errors and proceed with backup you can set APP_IGNORE_ERROR=Y.

[Sat Nov 23 15:39:27 2013] ERROR: Task: unquiesce with config:sybase@sbt failed

[Sat Nov 23 15:39:27 2013] ERROR: NetApp Snap Creator Framework 4.0p1 CLI action backup failed

[root@host01 sybase]#

------------------------------------------------------

I belive my problem lies in the way how the snapcreator constructs the command to quiesnce DB. This part: Command [/bin/su - sybsbt -c "/sybase/SBT/OCS-15_0/bin/isql -Usapsa -Pxxxxx -SSBT -w 1024 -i /tmp/_8kBhPV8Af.sc"] failed with return code 256 and message -SSBT: Command not found.    What is written in output debug file is naturally not exactly what is executed in background (my password is not xxxxx) and I would say that my password for sapsa is supplied by snapcreator in "" which creates problem for bash to interpret the command.

My second problem with -X parameter could be seen when I investogated the issue. I tried to run the command manually and this is the result:

------------------------------------------------------

[root@host01 sybase]# /bin/su - sybsbt -c "/sybase/SBT/OCS-15_0/bin/isql -Usapsa -Ppasswd -SSBT -w 1024"

Msg 1640, Level 16, State 2:

Server 'SBT':

Adaptive Server requires encryption of the login password on the network.

Msg 4002, Level 14, State 1:

Server 'SBT':

Login failed.

CT-LIBRARY error:

        ct_connect(): protocol specific layer: external error: The attempt to connect to the server failed.

[root@tsbp01sap20 sybase]#

------------------------------------------------------

As written in previous error message, Adaptive Server requires encryption of the login password on the network. So if I specify -X parameter, I can log in sucesfully:

------------------------------------------------------

[root@host01 sybase]# /bin/su - sybsbt -c "/sybase/SBT/OCS-15_0/bin/isql -Usapsa -Ppasswd -SSBT -w 1024 -X"

1>

------------------------------------------------------

As I wrote in my first post, i belive the reason is that I used virtual hostname for Sybase installation and therefore, although it is on the single host, it uses the "network communication" and -X parameter is needed.

Hope I managed to explain both issues a little better.

Thank you.

Josef


Re: Snapcreator configuration for SAP Sybase ASE

Hello ,

It executes following sql queries one by one and check at least one of the query satisfy, during quiesce operation.

#status3 - quiesce database - (AND)         True(Tq) & False(Fq)

" SELECT CASE WHEN (status3 & 128) = 0 THEN 'Fq' ELSE 'Tq' END AS [(qui)]

from master.dbo.sysdatabases where name=\"".$db."\"",

#status - mixed log and data - True(Tm) & False(Fm)

#status - no options set

" SELECT CASE WHEN status = 0 THEN 'Tm' ELSE 'Fm' END AS [(mix)]

from master.dbo.sysdatabases where name=\"".$db."\"",

#status - select_into/bulkcopy -(AND)       True(Ts) & False(Fs)

" SELECT CASE WHEN (status & 4) = 0 THEN 'Fs' ELSE 'Ts' END AS [(sel)]

from master.dbo.sysdatabases where name=\"".$db."\"",

#status - trunc_log_on_chkpt - (AND)        True(Tt) & False(Ft)

" SELECT CASE WHEN (status & 8) = 0 THEN 'Ft' ELSE 'Tt' END AS [(trn)]

from master.dbo.sysdatabases where name=\"".$db."\"",

#status - ddl in tran - (AND) True(Td) & False(Fd)

" SELECT CASE WHEN (status & 512) = 0 THEN 'Fd' ELSE 'Td' END AS [(ddl)]

from master.dbo.sysdatabases where name=\"".$db."\"",

#status2 - abort_tran_on_log_full - (AND)   True(Ta) & False(Fa)

" SELECT CASE WHEN (status2 &  1) = 0 THEN 'Fa' ELSE 'Ta' END AS [(abt)]

from master.dbo.sysdatabases where name=\"".$db."\"",

#status - allow_nulls_by_default - (AND)    True(Tn) & False(Fn)

" SELECT CASE WHEN (status & 8192) = 0 THEN 'Fn' ELSE 'Tn' END AS [(aln)]

from master.dbo.sysdatabases where name=\"".$db."\""

Can you copy the one of the sql quey into /tmp/testfile and try to execute the below sql query from scagent running user, I hope you run the scagent as root user

/bin/su - sybsbt -c "/sybase/SBT/OCS-15_0/bin/isql -Usapsa -Pxxxxx -SSBT -w 1024 –I /tmp/testfile

It look like ‘sybsbt’ user don’t  have access to "/sybase/SBT/OCS-15_0/bin/isql”.  I think some environment variable is missing.

Regards,

  1. Karthikeyan.N

-------------------------------------------------------

Never give up. Never, never give up!

-------------------------------------------------------

Re: Snapcreator configuration for SAP Sybase ASE

Hello.

I created the /tmp/testfile with first SQL query:

------------------------------------------------------

SELECT CASE WHEN (status3 & 128) = 0 THEN 'Fq' ELSE 'Tq' END AS [(qui)]

from master.dbo.sysdatabases

go

------------------------------------------------------

When I try to execute it with the given command, it fails but only because this -X parameter is missing. Kindly see the output:

------------------------------------------------------

[root@host01 sybase]# /bin/su - sybsbt -c "/sybase/SBT/OCS-15_0/bin/isql -Usapsa -Ppasswd -SSBT -w 1024 -i /tmp/testfile"

Msg 1640, Level 16, State 2:

Server 'SBT':

Adaptive Server requires encryption of the login password on the network.

Msg 4002, Level 14, State 1:

Server 'SBT':

Login failed.

CT-LIBRARY error:

        ct_connect(): protocol specific layer: external error: The attempt to connect to the server failed.

[root@host01 sybase]#

------------------------------------------------------

However, when I add this -X parameter, query is executed properly:

------------------------------------------------------

[root@host01 sybase]# /bin/su - sybsbt -c "/sybase/SBT/OCS-15_0/bin/isql -Usapsa -Ppasswd -SSBT -w 1024 -i /tmp/testfile -X"

(qui)

-----

Fq

Fq

Fq

Fq

Fq

Fq

Fq

Fq

Fq

(9 rows affected)

[root@host01 sybase]#

------------------------------------------------------

For this reasons I belive that snapcreator is just not generating the command syntax properly (as mentioned before I would guess for a " character at password) and also this is the reason why I think that it is necessery to use -X parameter for a distributed SAP installation where virtual hostnames are used for SAP application server and also for Sybase database.

Thank you very much for your assistance.

Josef

Re: Snapcreator configuration for SAP Sybase ASE

Josef,

You are correct in the assumption of debug logs showing xxxxx as the password.
Since we don't want the log files to hold sensitive information, we replace the password with xxxxx

Meanwhile, let me talk to who is the developer of this Sybase plugin and see how best to address this issue here.

Thanks much for bringing this to our attention.

Regards,
Siva Ramanathan

Re: Snapcreator configuration for SAP Sybase ASE

Hello Josef,

Here is another thought.

Could you please try this and let us know the results?

SYBASE_ISQL_CMD=/sybase/SBT/OCS-15_0/bin/isql

to

SYBASE_ISQL_CMD=/sybase/SBT/OCS-15_0/bin/isql -X

Thanks,
Siva Ramanathan

Re: Snapcreator configuration for SAP Sybase ASE

Hello Siva.

Thanks much for your replay. Now the -X parameter problem is solved. System adds this parameter into the command. Howerver, there is still the problem with the command parsing:

------------------------------------------------------

[Tue Nov 26 08:19:51 2013] ERROR: [dbhost:9090 (4.0.0.1)] [syb-00012] SYBASE:RUN_CMD: Command [/bin/su - sybsbt -c "/sybase/SBT/OCS-15_0/bin/isql -X -Usapsa -Pxxxxx -SSBT -w 1024 -i /tmp/eZpaHcl27p.sc"] failed with return code 256 and message -SSBT: Command not found.

------------------------------------------------------

Thank you for your help.

Josef

Re: Snapcreator configuration for SAP Sybase ASE

Hello Siva.

Did you manage to find some solution or workaround ? If you need any logs or tests from my side, please let me know.

Thank you.

Josef