How to set all user databases in offline - sap

Is there a way to set a SAP Sybase ASE database in offline mode or release the devices?
Or unmount the databases?
I am trying to revert a snapshot for one of our databases in the instance but as the processes holds its device; I can't revert it until it's releases the devices.
Regards Tomas

Re: My Sybase ASE says that unmount command does not exist (in 15.7)
The mount/unmount commands do exist in 15.5+, according to the documentation.
Another solution would be to just shutdown the ASE server, then load the "snapshot" to the sybase devices at the operating system.

Related

Clone SQL Server database

I have two computers, one is the main used by people and the other is the backup in case the main stops working. They are both running SQL Server and at the moment whenever I want to sync their data I backup the main computer and restore the backup computer.
Is there an option to clone and on realtime if it's possible an sql server database on another computer running also SQL Server?
After a search I found about Transactional Replication is it what I'm looking for?
Currently, you have 3 options:
AlwaysOn
Database mirroring
Log shipping
Database mirroing is going to be deprecated in the future versions of SQL Server so perhaps you should choose between AlwaysOn and Log Shipping. Depends on what are your actual needs, you can read about differences and options here: https://msdn.microsoft.com/en-us/library/ms190202.aspx

Database change notifications for DB2?

Oracle and SQL server have a database change notification feature that notifies table/row level changes in a database to registered clients. The feature is mostly used for synchronization of data with other data sources.
I've been looking for this feature in DB2 but so far, no luck. Does DB2 not provide this feature at all or am I missing something?
There is no such feature out of the box, not in the LUW version anyway (since you reference Oracle and MS SQL Server, I guess that's what you're interested in). You can easily roll your own using Q Replication event publishing, InfoSphere Change Data Capture, or plain old triggers and MQ functions.

can not prepare primary database for standby database creation (for RMAN)

i was trying to prepare a primary database for standby database creation. while executing set_log_params.sql, we struck with an error "ORA-32017 failure in updating SPFILE" and "ORA-00439 feature not enabled: managed standby".
from the detailed error message, it has been seen that the error when setting "log_archive_dest_2" parameter.
we are using oracle 11g standard edition with RHEL 5
It will be appreciable if you could tell me if there will be an easy way to setup a backup database server.
thanks and regards
Jayalaxmi
I'm reasonably certain that the creation of standby databases is a feature of Enterprise Edition only.
RMAN has this capability, if you are using poor man's oracle like we are, you can take care of the log shipping and log apply with shell scripts and cron (unix) or batch files and scheduler (windows) we do it every 30 minutes....

Sybase Data transfer utility

I am looking for a Sybase utility that would update any data change in one table in a sybase main server to archive server.
I remember i used it once when I used to work in a different firm but I don't remember the name.
When I was in previous firm, when there was an issue with replciation server. I used that utility to manually sync main server to remote readyonly archive server. I don't think it was entire databas syce. It was more of synce of one table at a time.
Does anybody have any ideas?
This is called Warm Standby.
You can do this only via Sybase Replication Server
check official docs.
but in real world - Warm Standby is not stable B)
Also u can syncing via bcp copy or dump and restor via NFS.

Simulate SQL Server database going down

I've written an application that connects to a system over the network and logs events from that system to a SQL Server database.
I need to test the behaviour of the application when the SQL Server goes down. Is there a way to Kill just the one Database on a SQL Server system without affecting the others?
If not is there a way to simulate the SQL Server going down.
It shouldn't matter but the app is written in Java.
You can use sqlcmd to set the database in single-user mode or detach the database using T-SQL. This will simulate the database going offline in a controlled fashion, but not simulate the server going down in an uncontrolled fashion, which perhaps could be more useful.
Extending #bzlm's answer:
USE master
GO
ALTER DATABASE YourDB SET SINGLE_USER WITH ROLLBACK IMMEDIATE
GO
you can make the database offline
ALTER DATABASE YourDatabase SET OFFLINE
GO
In addition to the other answers: You might even want to test different failure modes.
The other answers simulate the DB going down, while the server the DB runs on stays up.
You might for example also want to simulate a network failure or a server crash; this could probably be done by altering the network settings on the app server, or just by pulling its (network) plug.
Of course, whether this makes sense depends on your app.
I simply stop SQL Server service.