4
votes
1answer
2k views

Not enough space for MySQL optimize; do new rows overwrite existing data?

My MyISAM table consumed most of my disk space. I deleted a significant portion of the table, but the optimize command (to clean out the deleted data) does not have sufficient space. Is there any ...
1
vote
1answer
2k views

Heterogeneous queries error using stored procedure

Stored procedure ALTER PROCEDURE Proc_DayShift AS insert into #Punching_History SELECT * FROM SERVER2.MARS.DBO.TABLE1 GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS OFF GO SET ANSI_WARNINGS OFF ...
0
votes
3answers
11k views

How to add linked server SQL Server 2008 R2

I have two SQL Server 2008 located in different cities. I have physical access to one of them and I can exec SQL Server Management Studio there. For second server I have following parameters: ...
1
vote
1answer
266 views

mysql event running at wrong time

I created an event to run every 24 hours and be run at 14h. Its selects some data from tabels and writes it as to a file (csv format) The query and writing to file goes ok. The event is triggered. ...
1
vote
1answer
569 views

how to transfer data from table to table

I have two tables Table1, Table2. From Table1 want to transfer data to Table2. Suppose I have the following query: Select * from Table1 where UserID between 5 and 10 I want to store above ...
2
votes
1answer
295 views

Rman not replacing logs with same name on networked drive

Historically, rman saved logs by replacing files of the same name so that the most recent set was always there, and logs from backup of older than the most recent set simply went away. Rman is ...
2
votes
1answer
4k views

RMAN & Archivelog Deletion Policy confusion

Never been able to fully grasp the notion of delete input/delete input all when backup up Archivelog with rman. Tied to the same issue is the configure Archivelog deletion policy to backed up X times ...
3
votes
1answer
653 views

mysql change schema on the fly

Recently I faced the problem that my Db became very huge and I cannot allow to myself downtime every time when I want to change the schema. This caused me to start looking for solution that do schema ...
9
votes
2answers
7k views

move data folder and drive mysql centos

i need to move the data to a different folder and drive on my cent os db server. i added new hard drive (since we ran low on space), i have a 1tb of hard drive and i have a new 2tb i want to put the ...
3
votes
2answers
2k views

How does name resolution work in Oracle 10g?

In Oracle 10g (10.2.0), there are 4 types of names resolution: Easy Connect(10g added this new method) Local naming Directory External naming It is said that if Easy connect is used by the ...
3
votes
2answers
565 views

read before write transaction

Talking about transactions (db transactions), does a read operation have always precede a write operation? That's obvious, isn't it? Thanks in advance *Of course my question doesn't take into ...
0
votes
2answers
50 views

Failure to log in using just the server name

I have more than one PC connected by LAN that I access from Server Management Studio. When I try to connect with the DB server, if I place the server IP instead of the server name in the serverName ...
2
votes
1answer
450 views

How to get server event notification

I'm just getting into sql-server, so forgive me if this is a basic question. I'm building an application using .NET 4.0 and VS 2010 and ms-server2008. For my application I need to detect the server ...
0
votes
1answer
346 views

Which file is PostgreSQL log file 0?

In my PostgreSQL logs, I find this message: LOG: invalid magic number 0000 in log file 0, segment 1, offset 16121856 Which file is log file 0? Here is my pg_xlog directory: -bash-4.1$ ll ...
3
votes
2answers
1k views

Should arrays of IDs stored in Postgres use varchar, int, or another type?

What is proper convention for creating a field that will hold an array of foreign keys? In this particular case, I'm creating a field called "owners" that will hold an array of user IDs. I want to ...
3
votes
1answer
3k views

Postgresql: Move database to new tablespace

I'd like to completely move a database (tables, indexes, etc.) to a new tablespace. I know how to move each item individually but is there a way to move it all in one go? I'm using postgresql 9.1.
0
votes
1answer
135 views

Help me to better design my query so I can gain more performance

I need to find so called first entry in database for items regarding their partners. I wrote query and it is giving me correct results but it sucks with performances. I suspect that I have missed ...
1
vote
1answer
397 views

ERDs: How do you indicate mutually-exclusive encounters?

If you have a character_instance and character entity in an ERD for a video game, and you want to indicate that something happens when a character entity encounters a character_instance entity, how do ...
4
votes
2answers
1k views

How can I speed up a query that orders by a calculated field?

I will try and give an example - this is not my table structure - I'm simply trying to outline the issue in order to find a solution... Person Id, Name BrothersNames Id, Name SistersNames Id, Name ...
7
votes
3answers
6k views

Executing Stored Procedure that accesses another SQL instance

I apologize if this question repeats another already asked. I have searched for hours and have not found one that fits my situation. Desired Outcome A user using SQL authentication has execute ...
1
vote
1answer
359 views

SSAS -> MDX -> Create a price comparision against resellers

I want to write an MDX query that will do a price comparison for a product against each re-seller and return a count which a 'greater', 'lesser' or 'equal' for a given month. Measure: ...
1
vote
1answer
731 views

MySQL Cluster: cannot start the management node

When I try to start the management node of MySQL Cluster on Windows platform, I get the following error: Could neither create or open key ...
1
vote
1answer
913 views

I am getting an error while trying to download binary for mysql 5.5.11

I am trying to upgrade MySQL 5.1 to 5.5.11 on Ubuntu 10.10. Everytime I try the wget command I get this error: wget ...
3
votes
4answers
5k views

Is MySql locking table during backup and how to avoid?

I have a scheduled backup that runs daily in MySQL and I have noticed that during the backup a lot of queries that query a frequently used table seem to take forever to complete. This causes the ...
2
votes
1answer
2k views

importing myisam 5.0 database into a 5.5 innodb server

I have MySQL 5.0 and 5.5 servers (but not a 5.1 server). The 5.0 server is myisam only, the 5.5 default is innodb. I need to move a database from the 5.0 server to the 5.5 server. The database is ...
0
votes
2answers
452 views

SQL Server 2005: Job scheduled every 4 hrs, but sp_help_jobactivity shows unexpected value for next_scheduled_run_date

I have done a lot with sql and jobs, and this is throwing me off. My job is scheduled as shown below. I can run the job interactively from SSMS by starting the job, it runs, all is well. It is ...
4
votes
2answers
526 views

Installing oracle RAC 10.2.0.1 install and patch to 10.2.0.5 directly or install CRS ASM and RDBMS then patch?

I'm installing my first RAC and I was wondering if I should install CRS 10.2.0.1 (we are still at 10g for compatibility reasons) then patch to 10.2.0.5 before I install ASM (then patch) and finally ...
2
votes
2answers
10k views

MySQL - CSV UPDATE (not INSERT) into existing table?

I have a table with the following columns: id | name | city The table has 1000 entries in it. I have a CSV file with a limited number of lines like this: id,city 34,Denver 45,Kansas City 145,New ...
3
votes
1answer
4k views

I have lots of free memory. How do I use it to increase performance?

I am running Litespeed (with suExec, PHP SAPI), MySQL, DirectAdmin, named on a VPS with a 16-core Xeon CPU and 2GB RAM. Currently, only 300 MB out of 2048 are used. It might sound a stupid, but how ...
0
votes
1answer
73 views

Transaction question

I have a question. c stands for Commit, a stands for Abort, T is a transaction (db Transaction) Is the following sentence true? either c or a belong to T In my opinion the sentence is true since ...
1
vote
1answer
219 views

Sending mail using DatabaseMail in SQL Server 2008

I have a profile called GPMail, and previously there was an account called comments@guitarplayer.com, which was working as expected. Now I want one more account with the same site, so instead of ...
2
votes
3answers
2k views

SQL Server Max number of Times a table can be referenced as a foreign key?

Is there any maximum on the number of times a single table can be referenced in a SQL Server database via foreign key? IE Table A A_ID Table B ~ B_ID, A_ID Table C ~ C_ID, A_ID Table D ~ D_ID, ...
6
votes
2answers
1k views

securely exposing sql server 2008 for windows authentication

My company wants to have approximately 100 of their sales people (distributed around the country) to be able to run stored procedures from excel and return the data onto the spreadsheet. We have sql ...
17
votes
1answer
10k views

SLEEP_TASK Wait Type in SQL Server - What does it indicate?

I haven't seen the SLEEP_TASK wait type before, and today I seem to be getting a ton of them. I'm not the official DBA, just a SQL Server developer who knows some DBA stuff. We upgraded our servers ...
4
votes
1answer
655 views

Mysql crashed once with an “Assertion failure” this morning, how worried should I be? best way to diagnose this?

So for the first time our production system produced the below assertion failure. The system came up without issues after mysqld automatically restarted itself and rolled back some transactions.. ...
1
vote
1answer
2k views

updating mysql primary keys

I need to be able to swap values that are used in a primary key. Meaning, in one update statement, I need to change id 1 to id 2, and id 2 to id 1. In other relational databases, (Sql Server and ...
2
votes
2answers
544 views

T-SQL tool that requires a semicolon to end statements

I have what is probably a rather unusual question. Is there a T-SQL tool that requires using a semicolon to terminate statements? I know that it's not required to use semicolons with SQL Server 2008 ...
8
votes
3answers
2k views

SQL Server - Multiple running totals

I've got a base table with transactions and I need to create a table with running totals. I need them to be per account and and also have a few running totals for each account (depending on the ...
2
votes
2answers
1k views

MySQL Replication via DNS Failure

I'm having some trouble using replication when the machines are configured to use host names instead of IP addresses. The "skip-name-resolve" is OFF. If I use IP addresses, everything is fine. Using ...
2
votes
1answer
317 views

Immediate e-mail alerting for error 229 (permission denied)

For a few reasons, I'd like to have all permission denied errors (number 229) emailed to me. Checking master.sys.messages shows that is_event_logged for this error is 0. Thus that rules out using SQL ...
3
votes
2answers
743 views

Database Modelling of Type, Subtype Relation

I'm trying to model the type and subtype relationship described here. The best approach I could come up with would look like this: CREATE TABLE Card_Types ( card_type varchar(12) PRIMARY KEY ...
8
votes
5answers
14k views

Why is DROP DATABASE taking so long? (MySQL)

New CentOS installation. I was running an import of a large DB (2GB sql file) and had a problem. The SSH client seemed to lose the connection and the import seemed to freeze. I used another window to ...
1
vote
1answer
271 views

SQL Server 2008 Analysis Management objects work with SQL Server 2005?

Can SQL Server 2008 Analysis Management objects API work with SQL Server 2005 install?
1
vote
5answers
733 views

Frequent or Infrequent Commit

I'm trying to run an update query but still taking to long I have a commit in it. Is it better to set the commit to a higher value (5000) or lower (1)? I have to update 15 million records in a table ...
1
vote
1answer
270 views

Oracle, Stored and External procedures

Could someone give me a brief explication about these two mechanisms in oracle : stored and external procedures. Are they distinct ? Are they differ when we integrate in some language (Java, C++ or C ...
3
votes
1answer
170 views

How can I find the user who performed a database transaction?

I am using MySQL database. Suppose a database "X". It is used by multiple users. I want to find those users who performed any transaction of data into this database. Is it possible? Can I find it ...
6
votes
2answers
255 views

Design: How do you decide when items are related vs when they are attributes?

I've been trying to figure this out for a while. Let's say you have a person, for example. An attribute of a person is his or her social security number, right? But a person also has a social ...
3
votes
2answers
537 views

Performance impact of having gaps in Identity Column in SQL Server 2005

We have a number of tables in our database with an identity column as the primary key & clustered index. Over the years records have been added and deleted from these tables and of course there ...
2
votes
1answer
279 views

Do you need to include all foreing keys of a parent table in the child table?

Suppose you have a table my_table ----------- id name foreign_id And you are creating another table that will reference my_table. I think that this would be enough: other_table ----------- id name ...
5
votes
3answers
1k views

SQL Server making arithmetic abort enabled

I am using SQL Server 2008. In my stored procedures, I often have to call for XML data type, functions (like split). Is it possible to permanently enable arithmentic abort for a database? I know it ...

15 30 50 per page