Is it possible to create a global stored procedure at Sql server level

I created a query that takes a database backup at certain specified location. I want to use it as a stored procedure but this should act as a global stored procedure so that whenever this SP is called. Then database backup is taken. It uses DB_Name() to take database backup of owner database. Is it … Read more

HBase Error – assignment of -ROOT- failure

I’ve just installed hadoop and hbase from cloudera (3) but when I try to go to http://localhost:60010 it just sits there continually loading. I can get to the regionserver fine – http://localhost:60030… Looking at the master hbase server logs I can see the following. Looks like a problem with the root region. All of this … Read more

Is Hibernate using pessimistic or optimistic locking?

All my classes have an @Version annotation, so I assumed they were using optimistic locking. But I the following exception in my logs that seem to indicate Im using pessimistic locking. So which is it ? (I want to use optimistic locking) update Song set acoustidFingerprint=?, acoustidId=?, album=?, albumArtist=?, albumArtistSort=?, albumSort=?, amazonId=?, arranger=?, artist=?, artistSort=?, … Read more

Is the IN relation in Cassandra bad for queries?

Given an example of the following select in CQL: SELECT * FROM tickets WHERE ID IN (1,2,3,4) Given ID is a partition key, is using IN relation better than doing multiple queries or is there no difference? Answer I remembered seeing someone answer this question in the Cassandra user mailing list a short while back, … Read more

Why can’t I install Cassandra-driver

I am studying Cassandra by its document. But when I use “pip install cassandra-driver” to install cassandra-driver ,failed like this: weikairen2@weikairen2-virtual-machine:~$ pip install cassandra-driver Collecting cassandra-driver Using cached cassandra-driver-3.7.0.tar.gz Requirement already satisfied (use –upgrade to upgrade): six>=1.6 in ./.local/lib/python2.7/site-packages (from cassandra-driver) Requirement already satisfied (use –upgrade to upgrade): futures in ./.local/lib/python2.7/site-packages (from cassandra-driver) Building wheels … Read more

Drop foreign keys generally in POSTGRES

How can I drop Foreign keys in general. I mean, if I have many foreign key constraints in a table. like MonthlyEvaluatedBudgetTable Contraints: budgetid_pk (Primary Key) branchid_fk (Foreign Key) accountid_fk (Foreign Key) dept_fk (Foreign Key) Is there a way in postgres to drop all foreign keys in general and not specifically in an existing table? … Read more

SQL ‘ORDER BY’ slowness

Is it true that ORDER BY is generally pretty slow? I am trying to run some sql statements where the WHERE clause is pretty simple, but then I am trying an ORDER BY on a VARCHAR(50) indexed column. I need to sort alphabetically for display reasons. I figured that getting the database to do it … Read more

How to drop more than one constraint at once (Oracle, SQL)

I’m changing constraints in my database and I need to drop some of them. I know that for a single constraint, the command is following: ALTER TABLE tblApplication DROP CONSTRAINT constraint1_name; However, when I try ALTER TABLE tblApplication DROP ( CONSTRAINT constraint1_name, CONSTRAINT constraint2_name, CONSTRAINT constraint3_name ); it doesn’t work and I need to do: … Read more