All Questions

1
vote
1answer
2k views

How to debug a db memory-leak causing mysql to go before it's own limits?

We are having a problem with one of the database server of one application, possibly caused by some code that is creating a problem in the way Mysql manage it's memory. Until the second week of ...
2
votes
1answer
136 views

MySQL Subquery hangs / terrible perfomance

I am using MySQL 5.5.16 @ CentOS. Please have a look at this query: SELECT inventory_ID, ( SELECT price_brutto FROM _inventory_prices ...
0
votes
1answer
2k views

Oracle database link via ODBC to SQL Server does not recover automatically

I have a test environment with an Oracle 10XE database which is linked to an SQL-Server 2005 via an ODBC data source. For reference here I named the connection MSSQL_LINK. The production environment ...
1
vote
3answers
569 views

Restore Oracle tablespace to 2 days before

I have multiple test tablespaces in an Oracle SID. One of the tablespace is updated with wrong data. It works fine 2 days before. I want to restore the tablespace to 2 days before. Can anyone ...
-2
votes
1answer
95 views

Handle vast amount of data in DB [closed]

Now my current database is working in SQL Server 2008 R2 and we are uploaded its only in 1 server. How can I migrate my existing database in to Hyper Table ? (My current database has huge amounts of ...
-2
votes
3answers
132 views

Load Balancing in SQL

We are implementing new database applications with large users and the developer thinks we need to look into doing some kind of load balanced SQL database.our server is slow due to vast amount of ...
0
votes
1answer
1k views

updation of a column after expire of specific time in mysql

i have a table where i have a column named 'state'(int(2)) and 'modify_time' (time_stamp on update current timestamp). i have an update trigger which changes the value of state column to 0 based on ...
2
votes
1answer
372 views

How to restore from a backup of a very old version of DB2 (version 6.1 backup)?

I am helping a client with some legacy application that is still running DB2 6.1 on Windows 2000! I am helping them migrate to newer software/hardware infrastructure. I have a backup of the DB2 6.1 ...
1
vote
1answer
174 views

Repairing Broken Binary Replication in PostgreSQL 9.0

I have a binary replication that was stopped for so long that the WALs were removed and as a result, it ended up being old. I'm trying to reestablish the replication and the best way I've found so far ...
0
votes
1answer
562 views

The UPDATE permission was denied on the object

I'm connecting to a remove Microsoft server running MsSQL via PHP. The code looks something like: $con = mssql_connect('0.0.0.0:123', 'user', 'pass') or die(log_mssql_error(__FILE__, __LINE__, ...
0
votes
2answers
365 views

Two nullable columns one required to have value

No-Explanation Question: Is there anyway to have a constrain of 2 null values that always requires 1 to have value ? For example two date columns both null but having at least 1 that requires to have ...
1
vote
1answer
170 views

Executing local scripts against remote server?

I am in a situation where I would like to execute a number of sql scripts that are on my local machine against a remote MySQL instance. I found this question which seems to point me in the right ...
-1
votes
1answer
2k views

How quickly repiar mongo database 1TB on production [closed]

help me, production server is down every 15 min, i don't know how can fix it without lock Tue May 28 14:26:17.803 [conn7] Assertion: 10334:BSONObj size: 0 (0x00000000) is invalid. Size must be ...
6
votes
1answer
249 views

Failed copy job deletes all users

Since the progression of this was apparently somewhat difficult to follow the first time around: I attempted a completely boring, been-done-a-thousand-times-before copy of a database using the copy ...
0
votes
0answers
34 views

MySQL - Faster after reload?

I'm running MySQL 5.1.41 (innoDB) on Ubuntu 12.10. I noticed that the MySQL performance will be better immediately after I restart MySQL. This smells like something bad, so I'm wondering what could ...
0
votes
2answers
163 views

Is there any way to connect to one server and utilize a linked server using Windows authentication and NTLM?

I currently have SQL Server 2005 (Server A) that has a SSAS 2005 linked server (Server B). The powers that be do not want to enable Kerberos authentication, so I'm stuck with NTLM. The problem is ...
1
vote
2answers
170 views

Addtional configuration when deploying Data Tier Applications?

I'm starting a few new database projects and I'm attempting to create them at Data Tier Applications. There are two items I'm not able to find documentation for. I would like to set the db owner to SA ...
3
votes
2answers
971 views

sp_executesql adds statements to executed dynamic script?

The Question: As far as I can tell, sp_executesql adds statements to the beginning of submitted dynamic SQL script. But, a SQL Profiler trace does not capture the extra statements, and neither does ...
7
votes
1answer
340 views

Strange behaviour DBCC Shrinkfile

I am attempting to run a dbcc shrinkfile in chunks of 1GB against a database where 95% of the data has been archived and deleted. I'm leaft with a 235GB file where 9GB is data/indexes. I want to ...
18
votes
2answers
5k views

Is it a bad practice to always create a transaction?

Is it a bad practice to always create a transaction? For example, it is a good practice to create a transaction for nothing but one simple SELECT? What is the cost of creating a transaction when it ...
0
votes
1answer
838 views

Restoring database backup file gives access error

I am running SQL server 2008 and trying to restore from a backup file. Note: the backup file and folder and read/write access to "everyone". Running the command as "master" Running RESTORE ...
0
votes
1answer
35 views

When does PostgreSQL write logs?

I turned on the configuration parameter log_planner_stats and would like to examine the details in log. But the log file is empty. It seems all the log files are changed at 12:00am of a day. Does ...
2
votes
1answer
51 views

Is there any way to get the optimization time in MySQL?

I'd like to see the time optimizer takes to optimize a query. Is there any way to get that time?
1
vote
0answers
56 views

SQL Server 2008 sp_send_dbmail [duplicate]

I'm using SQL Server's sp_send_dbmail to distribute mail. Everything is working fine; BUT I tried to test a bad email address and it always reports success; and nothing is in the failed sent items ...
6
votes
3answers
296 views

Is using SUM() twice suboptimal?

I know I have to write SUM twice, if I wish to use it in a HAVING clause (or use a derived table otherwise): SELECT id, sum(hours) AS totalhours FROM mytable GROUP BY id HAVING sum(hours) ...
1
vote
2answers
750 views

SQL Server 2008 sp_send_dbmail

I'm using SQL Server's sp_send_dbmail to distribute mail. Everything is working fine; BUT I tried to test a bad email address and it always reports success; and nothing is in the failed sent ...
0
votes
1answer
683 views

SQL Server: subscriber as publisher and hierarchical replication

In Oracle Streams one way replication from one DB to another is a basic block for many replication topologies (N-way, hierarchical, combined and so on), and changes could be captured and applied for ...
1
vote
1answer
133 views

Access 2007 Work in a separate file using ACCDE

Have been working in an Access 2007 application for over 3 weeks and it should be ready now. Anyway, I know (and tried) that "Make ACCDE" can actually split the raw data from the application itself so ...
0
votes
1answer
648 views

Howto shrink an sql-anywhere 12 db?

is there any tool to shrink SQL Anywhere Databases? With MSSQL/MSSQL Express it was an easy task. Just do it, have a faster DB again which has a size which can be transferred over a slow internet ...
1
vote
1answer
333 views

How do I open a Progress .bup file?

I have a .bup file which is supposed to be a Progress database file. My question is, how can I open/restore it and look at the data?
0
votes
1answer
942 views

Changing primary key from varchar to int

I have a user table where I am use varchar as primary key. Now from a different place I got the performance tip that int is better than varchar for primary key. So I would like to change my primary ...
1
vote
3answers
376 views

Copy database to local from server [duplicate]

As I show , I have server database version-10.50.1600 and local database version-10.0.1600 . How can I copy database (with all tables and data(s)) from server to local which has different version ? ...
0
votes
2answers
130 views

How do you store tabular data in an RDBMS?

First: I really haven't got any idea how to google for this. If you got one, leave a comment. If I want to store arbitrarily large tables in a database, how should I set up my database tables? ...
0
votes
1answer
290 views

MySQL asynchronous multi master replication conflict resolution

I have setup Multi Master replication, following this blog thread: http://0wned.it/geek-bits/guides/mysql-multi-master-replication/ And now it synchronizes perfectly, up until the moment the ...
2
votes
1answer
92 views

How to select nodes where all children is satisfied?

I have a tree structure of light bulbs. I want to turn on all the light bulbs starting from the leafs of the tree. A light bulb cannot be turned on unless all its immediate children are turned on. ...
4
votes
3answers
140 views

Check server activity with code

I would like to see the activity on of the SQL server. So I can run a query when the server load is low. I know there is an activity monitor in SQL server but my company doesn't want me to give the ...
2
votes
0answers
78 views

os_buffer_descriptors blocking problem SQL Server 2008 R2

The following query : select (buffer_descriptors.datacache) as 'Data Cache (MB)', case when buffer_descriptors.datacache > 4096 then (((buffer_descriptors.datacache)/4096)*300) else ...
2
votes
2answers
561 views

Can I open a SQL Server 2008 R2 database in SQL Server 2008 R2 Express?

This question has probably been asked a dozen times but I couldn't find them here or at SO. Can I attach/restore a SQL Server 2008 R2 database to my local SQL 2008 R2 Express instance?
1
vote
1answer
665 views

Like with the results of a subquery (multiple values)

What I'm trying to do is the following concept: SELECT field1,field2,field3 FROM table1 where field3 like '%'+(SELECT distinct field from table2)+'%' But this is not allowed because like does not ...
2
votes
4answers
671 views

Shell: How to time a script running in SQLPlus and kill it after x amount of minutes?

I have a little tool which automatically runs a series of SQL scripts when and outputs to .XLS when an appropriate request is made. However, some SQL scripts need to be ran on a live database, and I ...
-2
votes
1answer
103 views

how to count primary key of one table inanother table? [closed]

how to count primary key of one table which is used in another table in 5 to 6 column? If table 1 has primary key srno which is used in table2 in column d1,d2,d3,d4. I want to count how many times ...
-1
votes
1answer
69 views

validate where each parent intermediary is also a parent to itself [duplicate]

I want to validate where each parent intermediary is also a parent to itself. So this query should return invalid parents in SELECT If table has any. I need to do is first of all get all parents ...
1
vote
3answers
412 views

Table clean up taking too long

I am selecting around 10 million rows which are invalid from table grid into ##grid_temp and deleting their related info from grid_info table. I am running this in a python script. It is taking more ...
0
votes
1answer
2k views

pgAdmin3 can't connect properly to Postgres 9.2

I have installed pgadmin3 version 1.10.2, however when it connects to PostgreSQL server version 9.2, it says: Warning: This version of pgAdmin has only been tested with PostgreSQL version ...
1
vote
3answers
208 views

Eliminating duplicate records in data cleansing [closed]

I have a database full of records of people with simple information like first name, last name, email, location, ... . I need to eliminate the duplicate records. As I've search the process is called ...
1
vote
0answers
91 views

Can't get rid of filesort on joined query sorting on second table

For some reason, this query: EXPLAIN SELECT * FROM biz as b INNER JOIN listings as l ON b.id = l.biz_id WHERE l.pub_id = 14 AND b.cat_id=310 ORDER BY l.level DESC, l.random DESC LIMIT 5; says it ...
1
vote
1answer
103 views

Statistical Analysis of Data that has to be done in an order?

Bear with me - that is the first time try that in SQL Server, normally I have been doing that on the front end ;) I a implementing some analysis on time coded data series. This is not super ...
0
votes
2answers
759 views

Cannot see Green Button with white arrow in object explorer; DTC config problems?

I have SQL Servers across locations setup for replication. One of the SQL Server instances that I installed, running locally I can see the green button with the white arrow in the object explorer when ...
2
votes
1answer
347 views

SQL Server Memory for Backup Buffer

In SQL Server 2012 memory for backup buffer comes from buffer pool or non buffer pool (VAS)? Is this behavior changed between SQL server 2008 R2 and SQL 2012? EDIT: Does MAX Server Memory ...
0
votes
1answer
391 views

UTF8 vs ASCII or custom binary format: high-performance optimization on very big tables

The summary of my question is whether there are advantages, even if minimal, to use ASCII, or even a smaller format designed yet created specifically for the situation, instead of UTF-8 for strings. ...

15 30 50 per page