3
votes
1answer
1k views

Daily database maintenance using SQL Server 2008 and a stored procedure

I have created a database maintenance plan using wizard though that link for SQL Server 2005. I have created a Maintenance Plan for SQL Server 2008 and it works fine. Now I required to complete the ...
3
votes
1answer
811 views

MySQL Handler_read_rnd_next == tablescans without indexes?

I am in the process of tuning our Percona 5.5 server, and have been using percona's tools to plot our database's performance. In the MySQL Handlers Plot, i have been noticing alot of ...
2
votes
1answer
991 views

SQL Server 2005 delete corrupt table

We are having a database in which one table name dbo.ONOA is corrupt. We need to delete this table. Please let me is there any way to force delete the table?
5
votes
2answers
2k views

Possible to keep max number of records in postgresql?

Basically part of our Postgresql table is used to keep server access logs, and as such sometimes during production this can get pretty large. is there any way of setting in postgresql to have a ...
1
vote
1answer
633 views

mongodb: replica-set processing reads on the primary

Running a replica-set with 1 primary and 2 secondaries, I wonder why the READs are also done on the primary. Shouldn't the primary mainly do the WRITEs and the secondary can share the READ-load?! I ...
-9
votes
1answer
317 views

What are the edges of typical (or specific) paid databases like oracle of mysql compared to the free oness? [closed]

Note: I am building a startup. I am currently using mysql. I am pretty much stuck. Others recommend other free databases like mongodb. I am seriously considering paid one IF and only IF it gets better ...
-1
votes
1answer
1k views

What exactly is SOLR? [closed]

It seems like a magical technology that can Do spatial search do full text search The problem is, It doesn't say where does it store all the data. Does it have it's own proprietary database If it ...
6
votes
2answers
1k views

Working Around Filtering Problems in Merge Replication

I am in the process of defining filters on a merge replication publication for our database. The problem I am coming up against is that merge replication has these rules, I don't like to call them ...
2
votes
1answer
11k views

What is different between SQL-Server versions 2008R2 and 2012

Dear SQL Server experts, Can you tell me the different between SQL-Server 2008 R2 and SQL-Server 2012 versions? I designed my product with version 2008 but when I tried to buy a licence, Microsoft ...
4
votes
1answer
1k views

How does SQL Server choose an index key for a foreign key reference?

I am working with a legacy database that was imported from MS Access. There are about twenty tables with non-clustered, unique primary keys that were created during the MS Access > SQL Server upgrade. ...
3
votes
2answers
2k views

How do I set the external editor for PostgreSQL's psql client?

What do I put in ~/.psqlrc file to set the default editor? The editor I want to use (Textmate) is at /Users/username/bin/mate. I found the place in the docs where they talk about it, and tried ...
1
vote
1answer
92 views

How can I automate sharding in the presence of continuous reads

I am using a pymongo in a sharded mongo environment. I have some fairly write-intensive systems, so I split the data up by time, with one database per hour, so the heavy-lifting of index-updates can ...
8
votes
3answers
3k views

Oracle: How do I query a Hierarchical table?

Background This is for the construction of some views we'll be using for reporting. I have an table of locations, the key fields being "location" and "parent". The structure that these two fields ...
0
votes
0answers
811 views

ora-07202 when creating standby database

I am pretty new to Oracle database, and I am trying to set up a high availability between two PCs. The first PC runs Windows server 2008 R2, and the second is on Fedora. As far as I have read, with ...
5
votes
1answer
202 views

Parameter sniffing work arounds

I have used two methods to get around parameter sniffing issues in the past: 1) Use WITH RECOMPILE 2) Reassign parameter values to local variables and use those instead of the parameters From what ...
3
votes
1answer
968 views

Can I Rebuild indexes in a DB except for one table?

I have a table in my database that is constantly monitored by an application server for changes. Unfortunately rebuilding the indexes connected with this table breaks the app server's connection. This ...
4
votes
1answer
2k views

How, if possible, can an .sql file be executed against an oracle database from a bash script

Is it possible to execute an sql file (a text file containing several SQL statements) against an oracle database from a bash shell command line (e.g. no graphical GUI and no interactive clients) ...
2
votes
1answer
4k views

mongodb: drop all collections

How to remove existing content before entering a replicaset the first time? mongodb worries about: ... has data already, cannot initiate set. All members except initiator must be empty.
0
votes
1answer
4k views

Is there a way to alter a table definition (add columns) in Oracle and have it replicate to materialized views on remote databases?

I have a master table, and several remote read-only materialized views on pre-built tables that are being fast refreshed to keep in sync with the master table, using a dblink. The table definitions ...
4
votes
2answers
6k views

SQL Server 2008R2 - Why is my index not used

I have a table defined in the following way: CREATE TABLE [dbo].[MyTable] ( [MyTable_ID] [int] IDENTITY(1,1) NOT NULL, [COLUMN_WITH_DATA] [varchar](128) NOT NULL, [COLUMN_A] [varchar](128) ...
15
votes
3answers
4k views

Dynamically Define a Range in a Dimension

I have an issue that i face every time i decide to build a cube, and i haven't found a way to over come it yet. the issue is how to allow the user to define Range of things automatically without ...
2
votes
2answers
869 views

How to get SQLCMD to output errors and warnings only?

How can you get SQLCMD, when executing a SQL script file, to just output any errors or warnings it encounters? I essentially dont want information based messages to be output.
1
vote
1answer
273 views

syscacheobjects is cleared randomly

Microsoft SQL Server Web Edition (64-bit) Version 10.50.1600.1 SQL Server 2008 R2 I have noticed that we are getting a lot of execution plan re-complilcations - first executions quite slow, ...
1
vote
1answer
5k views

Connecting remote MySQL database to local MySQL database?

I want to write PHP code to be embedded in a Drupal7 module. I want to call a procedure which can copy newly generated data in the local MySQL database to a remote MySQL database. When data is ...
3
votes
0answers
660 views

Mismatched Oracle drivers - need upgrade (10.2.0.1 to 10.2.0.5)

I was forwarded here by recommendation from Stack Overflow ...... We are running Oracle Enterprise software on various client and DB servers and we are experiencing a problem (outlined here) where ...
1
vote
0answers
523 views

Create stored procedure to select the data?

I have four tables user, shops, offer, merchant in that id is unique and present in all table shop ------ id shops 1 shop1 1 shop2 1 shop3 user ----- id name 1 abc merchant ...
0
votes
2answers
1k views

Lock wait timeout exceeded on insert despite low lock_time in the slow query log

Our Java/Spring application reports occasional lock wait timeouts on single record INSERTs to a MySQL 5.5 InnoDB table. Here are a few slow query log records for some of the failed INSERTs. # ...
5
votes
3answers
4k views

What's the formula for calculating Key Efficiency, Key Buffer Used, and Query Cache Hitrate in MySql?

Now, I have retrieved some dates from table of 'GLOBAL_STATUS' and 'GLOBAL_VARIABLES' by MySQL DB named information_schema . I can retrieve key_buffer_size key_cache_block_size query_cache_limit ...
0
votes
1answer
111 views

Multitable partition guide

We have a main table called tblLink in it will have a date field.The tblLink will have its primary key as foreign in few other tables too and one of the table will tblMainData which over time will be ...
7
votes
2answers
16k views

Can I restore a SQL Server .bak files without SQL Server?

I have some large .bak files from a SQL Server 2005 dump. Can I restore these without using SQL Server, either to PostgreSQL, MySQL, or to flat text files? An open source solution would be most ...
1
vote
1answer
177 views

Command line switch to disable Coherence?

We have a Java app that happens to have the coherence jar in the path. My application doesn't need it, so I'd like to pass some type of -D variable to the JVM to tell it to ignore coherence, or ...
3
votes
1answer
1k views

Objects in v$bh but not dba_objects

The Oracle documentation has a section in the 11.2 Performance Tuning Guide with the title Determining Which Segments Have Many Buffers in the Pool. The section lists the following query: SELECT ...
0
votes
1answer
2k views

Access 2007 sql editor

Is there an ACCESS 2007 JET SQL editor or client (not sure the right term is) that can be used to code Access Jet SQL queries? It is very difficult to write SQL queries in ACCESS 2007 since it's like ...
3
votes
1answer
663 views

What is the best practice for physical deployment of data marts?

We are just starting to get into business intelligence at our company. We have some architects who are designing our data warehouse and also our data marts. They are using star schema for both ...
14
votes
2answers
3k views

SQL Server how to get around the transaction log filling up when updating a column to an int

I have a SQL Server 2005 table called BRITTNEY_SPEARS_MARRIAGES and it has the following columns: MarrigeId tinyint, HusbandName varchar(500), MarrigeLength int Now I have another table ...
5
votes
1answer
254 views

Non-English characters are not imported using SSIS or Visual Studio Deploy

I'm having problems with importing data into a SQL Server 2008 database. If I execute the following statement in SSMS, it works fine. INSERT INTO [dbo].[ObjectiveRatingTranslation] ( ...
0
votes
2answers
107 views

SQL and Multiple Indexes

Consider the following table: i | a | b | c -------------- 0 | 1 | 2 | 3 1 | 4 | 5 | 6 2 | 7 | 8 | 9 3 | x | y | z The table, in the end, will have several thousand rows, and even more columns then ...
0
votes
1answer
204 views

Parse message_body(XML)

I know the contents of @message_body are: <inserted DocNo="xxxx99999"/> I want to put 'DocNo' into a variable I created @DocNo and have tried various this such as: SET @DocNo = (SELECT ...
2
votes
1answer
870 views

What does CREATE ASSEMBLY do with the registered dll?

I created a dll in .NET for some custom CLR spatial functions in SQL Server 2008 R2. I sent the dll to a colleague along with a script to deploy it (CREATE ASSEMBLY then create the external functions ...
0
votes
0answers
59 views

Enumerate open oracle connections

How can I troubleshoot which processes are keeping connections open? Background: A QA installation of several software components is generating an ORA-12516 error now and then, and I'm not sure which ...
0
votes
1answer
75 views

MySQL slave seems confused as to just how far out of date it is

I have a slave that claims, in SHOW SLAVE STATUS, to be zero seconds behind the master. However, it also says it's on Master_Log_File binlog.009636, which is 46.9 gig behind where the master is. I ...
3
votes
4answers
6k views

Benefits of BTREE in MySQL

What are the pros and cons of using a BTREE index in MySQL, regarding query speed, disk storage and memory usage? Does BTREE provide easier iteration in increasing order ? What kind of queries would ...
0
votes
2answers
1k views

Some queries slower in MySQL 5.5 than 5.0?

We have an exceptionally inefficient process (1.3 million selects, 232k updates) that I'm now recoding to be 1 select and 50 updates. In the meantime, though, today's process ran. We recently updated ...
1
vote
1answer
3k views

How can I tell if an index is being used to sort in MySQL?

I have a query with an ORDER BY clause which uses a column which is the last column on an index which is being used in the WHERE clause, essentially of the form: SELECT cols FROM tables WHERE ...
5
votes
2answers
1k views

Implementing a Circular Buffer (Sliding window) in MySQL

I intend to store some Java objects in a MySQL database, accompanied by a timestamp. These objects should be kept in a Sliding Window fashion (also known as Circular Buffer), meaning that only the ...
2
votes
1answer
665 views

Data type for protobuf objects in mysql

I would like to store some protobuf objects in a MySQL database. The objects are created in a Java application. The object is accompanied with a textual type identifier and a timestamp. ...
5
votes
3answers
161 views

Schemas and user rights

I have 2 schemas, lets say sch1 and sch2. Each owned by different user. I do want to grant SELECT rights on sch2.MyTable (but just this one object) to sch1 procedures/views AND allow to reference ...
3
votes
3answers
2k views

SQL Server dates - can I get date and hour?

In SQL Server, can I do the equivalent of to_char(date_field, 'YYYY-MM-DD:HH24') in Oracle to get 2012-01-30:23?
6
votes
2answers
748 views

What are the pros/cons of splitting date and time into separate fields vs. using the datetime data type and storing the date in a single field?

My database is extremely large and growing at a rate of ~20m rows/day. I have timestamp data that is important but most of the reporting is based on date ranges and week over week or month over month ...
1
vote
1answer
6k views

€ Euro sign/symbol not showing up on Oracle 10gr2 and aix 6.1

this is Oracle 10gr2 on aix 6100-02 The issue is that I do not manage to see the € sign from Oracle. This is an easy way to see the issue: SQL> insert into prueba values ('€'); SQL> commit; ...

15 30 50 per page