1
vote
2answers
301 views

Setting up a CDBMS server

I read something in wikipedia about CDBMS. I have no idea how to setup a CDBMS server! Is it comparable to how I am currently using mysql? I have some extremely large databases and I want to ...
1
vote
1answer
1k views

How can I alter the type of a money-column to decimal in PostgreSQL?

I have a table in PostgreSQL where one column "vat" has type money but I would like to alter it to decimal instead. How can I do it? I tried with: alter table my_table alter column vat type ...
3
votes
1answer
1k views

In MS SQL how do I find out what tables have not been queried or updated in a long time?

I'm maintaining a database that is being shared by a few systems. Over the years a few of those systems have been deprecated and lots of the tables are actually orphaned. Is there a query I can run to ...
3
votes
2answers
689 views

Should I move to InnoDB during a planned migration?

I'm shortly migrating a Debian Lenny webserver to another host and Debian Squeeze. The standard MySQL installation even on Squeeze is 5.1 and therefore would default to MyISAM - I'm inclined to stick ...
0
votes
0answers
331 views

Reconfigure the registry for new Oracle installation

I have the following oracle homes installed on my Windows machine Oracle Developer Suite Oracle Discoverer Oracle 10G Client I installed Oracle 10G database manually by following the following ...
2
votes
1answer
909 views

Are master/slave replication relationship between different versions of SQL Server possible?

I have a database server, SQL Server 2005, that's inside a private network. Now i need to make a database there available for a webserver, so i want to replicate this db to an external server, which ...
5
votes
4answers
595 views

How do you cope with Database Server Inventory Management

Is it common for SQL Server DBAs to have to struggle with Server Inventory Management due to multiple parties / departments bringing online their own instances of SQL Server? If so have you been able ...
2
votes
1answer
858 views

PL/SQL + after login seems Not see tnsnames.ora file on my PC

I get the following error when I login in by PL/SQL - please advice how to fix this? Data character set (UTF8) and client character set (IW8MSWIN1255) are different character set conversion may ...
7
votes
3answers
1k views

I am using the MEMORY storage engine but MySQL still writes to my disk…Why?

I am using the MEMORY Engine for all tables associated with a particular MYSQL query because speed of access is paramount to my project. For some reason, I have noticed that a large amount of disk ...
2
votes
1answer
277 views

MySQL data modeling help

I've been struggling with this model for weeks, going in circles from one type of solution to another. I'd like some advice on the best approach. One or more organizations can sponsor an event or ...
8
votes
4answers
2k views

How can I optimize this MySQL query further?

I have a query that is taking a particularly long time to run (15+ seconds) and it is only getting worse with time as my dataset grows. I have optimized this in the past, and have added indices, ...
4
votes
2answers
4k views

stored proc to handle XML as input param for multiple record inserts

i have updated my proc from taking typical data types to take a single XML param so that i can call it once instead of multiple times for inserting multiple records. here is a sample of my proc that ...
6
votes
3answers
4k views

Add Oracle Label Security to an existing Oracle installation

We are using Amazon EC2 to host some Oracle database instances while we are evaluating and prototyping some software. We are using the AMIs provided by Oracle - specifically, Oracle Database 11g ...
3
votes
5answers
4k views

Why is MySQL caching data on our dynamic PHP site?

We are having an annoyance with our PHP/MySQL site in that it seems to cache data from the database and our PHP pages are showing out of date records. In fact, there are pages that link to URLs that ...
6
votes
3answers
7k views

How do I identify tables that have a foreign key to a specific table in Sybase?

I am looking for (preferably) an SQL statement that selects the table/and column names for any table with a foreign key to a given table in Sybase. I think it should be somehow possible with the ...
2
votes
2answers
9k views

How to improve sql server 2008 table scan speed? [closed]

I have a table with 1.5 million records.It takes 24 seconds for one table scan.It's too long.
2
votes
4answers
2k views

How do you change the location of the data files in SQL Server 2000?

I have an old SQL Server 2000 machine in a clustered environment. The data files are on Disk S: which is running out of space. I have another Disk B: in the same disk array which has lot of space. I ...
1
vote
3answers
367 views

Insert to particular location in Oracle DB table?

Suppose I have a table containing the following data: Name | Things ------------- Foo | 5 Bar | 3 Baz | 8 If I want to insert a row, so that the final state of the table is: Name | Things ...
6
votes
3answers
7k views

How can you tell if a table in DB2 has a Primary Key?

We are using a tool that requires specific tables in our DB2 database to have a Primary Key defined. Is there a way using a select statement on the DB to see if a given table has one? Thanks.
12
votes
3answers
3k views

Why don't my .my.cnf settings work?

I have a .my.cnf file in my home directory on my desktop that includes: [dbid] user = myusername password = mypassword database = dbname host = server.location.com If I recall correctly, before ...
3
votes
3answers
946 views

SQL Server 2008 on Hyper-V Virtual Machine with Multiple instances

Running SQL Server 2008 instance on a Virtual Machine (Hyper-V) on a Windows 2008 R2 OS. Currently has a few production DBs. The whole VM itself is on RAID 5 volume (so are the DB files etc). We ...
7
votes
2answers
5k views

How to extract Procedure, Function, etc. Source Code from an Oracle Export

I have generated an EXPDAT.DMP file of an Oracle database with the command: exp userid=usr/pass@db owner=own rows=n compress=n I then ran the following command to generate a file containing the ...
14
votes
5answers
27k views

How can I use a default value in a Select query in PostgreSQL?

I would like to use a default value for a column that should be used if no rows is returned. Is that possible in PostgreSQL? How can I do it? Or is there any other way I can solve this? E.g. ...
3
votes
1answer
174 views

Mysql constraint problem

I'm using MySQL5.5 and for this question I have 3 simple tables t1, t2 & t3 designed like this: +------------+ +------------+ +------------+ | t1 | | t2 | | t3 | ...
36
votes
2answers
46k views

How do I get the current unix timestamp from PostgreSQL?

Unix timestamp is the number of seconds since midnight UTC January 1, 1970. How do I get the correct unix timestamp from PostgreSQL? When comparing to currenttimestamp.com and timestamp.1e5b.de I ...
8
votes
4answers
298 views

What would I need to do to make sure my DB policies have to pass a security audit?

I have an audit coming up, and I was wondering what physical, electronic, and logical access controls an auditor would look for when auditing a database for an ERP system. I'm really new to this ...
1
vote
1answer
172 views

What is the 'repair code' in MySQL?

OK I was adding an index to a table, and I checked on progress using show processlist and under state it output Repair by sorting. From the MySQL docs: Repair by sorting The repair code is ...
4
votes
3answers
1k views

How much could sequential scan gain by GPU?

I am considering hiring someone to implement GPU processing in Postgres to speed up sequential scans on a database located on a ramdisk. How much do you believe I could gain using this approach? I ...
7
votes
3answers
854 views

Do I need to add a new single column index to a table if a multi-column index on that field already exists?

I've a table with a multi-column UNIQUE index on _job_id__ and __keyword_id__. Would I also need to add another index to __job_id__ if I have a frequent query which performs a GROUP BY on that ...
0
votes
2answers
1k views

Error Msg 823, Level 24, State 2, Line 1 [closed]

We have been recieving the error below in one of our server during restoring a database. Has anyone experienced the same problem? If yes can you please share how you fixed it? The operating system ...
8
votes
3answers
4k views

Does making a field unique make it indexed?

If I make a unique constraint on a field, do I also need to make an index on that field in order to get a scalable insert time? Or is this done for me (even if the index it uses isn't publicly ...
1
vote
2answers
349 views

Shared memory connection experiencing network wait type

I have a poorly written application running a SELECT *, resulting in a 2MB result set every few seconds. I cannot correct this. I am confused though,by the connection encountering ASYNC_NETWORK_IO ...
0
votes
2answers
834 views

SSAS: Move tempdb database

For sQL server 2008 R2 Analysis services, how can I move tempdb database files from one drive to another. At the time of installation, I didnt the seperate drive for tempdb. Now that I do have one, I ...
3
votes
1answer
3k views

sqloledb vs sqlncli - Performance difference or just feature set?

I've been running through some Classic ASP code recently and was wondering if there was a performance difference between connecting using: ...
1
vote
2answers
3k views

how to get a boolean value into a select based on another table?

i have 2 tables Message and Attachments as follows (note: this is a one to many relationship: message: messageId, from, to, subject, body Attachments: messageId, filename i want to select the ...
5
votes
1answer
4k views

Passing an array or record to a stored procedure in PostgreSQL

I have a task to pass arrays, records and in some cases array of records as a parameter to the stored procedures in PostgreSQL. Any ideas?
11
votes
7answers
7k views

Are there any good tools for monitoring postgresql databases [closed]

I am planing to have very soon few highly loaded postgresql databases. I have some expirience managing mysql databases with high load, but now we have to use postgresql. I want to know what are the ...
5
votes
1answer
667 views

Why can the target of the OUTPUT INTO clause not be a view?

Here is my statement: DELETE FROM table1 OUTPUT deleted.col1, deleted.col2 INTO view1; It gives me this error: The target 'view1' of the OUTPUT INTO clause cannot be a view or common table ...
4
votes
3answers
15k views

Set “lock wait timeout” in MySQL

Where would I set the maximum time a query will wait for a lock in MySQL 5.0.68 before timing out?
3
votes
2answers
406 views

Plpgsql seems to be deleting and inserting instead of updating - Why?

I am using postgreSQL 7.4. I have a large table , call it table_a: key1 INT NOT NULL, key2 INT NOT NULL, data INT NOT NULL, itstamp INT NOT NULL DEFAULT (date_part('EPOCH'::text, ...
8
votes
2answers
33k views

How to get the timestamp column in only milliseconds from PostgreSQL?

I have a column "created" with type timestamp without time zone default now() in a PostgreSQL database. If I select colums, it has a nice and readable format per default: SELECT created FROM ...
21
votes
4answers
7k views

Why does MySQL not have hash indices on MyISAM or InnoDB?

I have an application that will only select on equality, and I figure I should use a hash index over a btree index. Much to my dismay, hash indices are not supported on MyISAM or InnoDB. What's up ...
5
votes
2answers
11k views

Relational Design - Multiple tables into one foreign key column?

Take a table that tracks meat purchases. It has a "meat_id" foreign key column to indicate what type of meat the purchase was. But, the different types of meat are unique in some way (such as USDA ...
1
vote
2answers
540 views

Granting permission to SQL database

How do you grant a user xp_cmdshell, sp_OACreate, sp_OAmethod, and sp_Destroy on SQL server 2008? What is the prons and cons of granting this permission? Please let me know. Thank you!
1
vote
3answers
3k views

SQL Server service unresponsive

I am unable to connect to the SQL Server instance. Logging into the box remotely I can see both CPU and MEMORY are maxed out. I have tried to restart the SQL Server service which has resulted it in ...
2
votes
2answers
3k views

MySQL won't start after upgrading to PHP 5.3

Just upgraded to PHP 5.3 with the latest version of mysql, but now mysql won't start. Below is mysqld.log 110516 22:24:46 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 110516 ...
2
votes
2answers
1k views

In Microsoft SQL Server's linked server configuration, what does the “RPC” setting do?

I'm not talking about "RPC Out". That setting works as I expect it to: when "false", I can't call stored procedures on my linked server. When it's "true", I can. The specific option I am referring to ...
3
votes
2answers
3k views

How can I get a list of column names and types from a resultset?

Say I get a resultset back from the following query: select * from sys.database_files; For any given resultset, I want to be able to query the column names and types so I can then create tables to ...
1
vote
1answer
1k views

Inner cursor performance issues

Before I tried to avoid using cursor because of performance issues. But now I have to do some calculations to reach some goals. I have a stored procedure that has a code like this: DECLARE ...
1
vote
1answer
130 views

Can SQL profiles be deployed to other Oracle Databases?

When using The SQL Tuning Advisor in SQL-Developer. I get often some recommendations to accept a SQL-Profil. I guess it is a good idea to do so. But is this similar to proposed indexes, which I can ...

15 30 50 per page