0
votes
2answers
3k views

Recover a MySQL InnoDB from ibdata1 that won't repair using innodb_force_recovery

We have a MySQL database that we have manage to grab the raw files from a server with a fatal hardware failure. However, this failure seems to have occurred when the DB server was running. As a ...
2
votes
1answer
74 views

How to consolidate script duplication?

I just want to know how you deal with long scripts and redundant information. Here is an example: Suppose you have three tables: table1, table2, and sometable. And you have SELECT id = 1 org ...
1
vote
1answer
155 views

Postgres table size doubles are transaction completes

I have a table with 50 million rows and 40+ text columns. Size of the table is around 17GB. Inside a transaction, I add another integer column to the table and update all the rows with corresponding ...
3
votes
1answer
118 views

Relationship with a default value

Firstly, I know my title is somewhat misleading, but I couldn't think of a better title. Here is my current relationship CREATE TABLE Events ( ID INT IDENTITY(1,1) NOT NULL, Name ...
7
votes
4answers
10k views

Converting RTF in a text column to plain text in bulk

I have a legacy system with about 10 million rows in a table. In that table there is a column of type text, most of them are standard text but about 500 thousand rows have RTF markup in them. I need ...
3
votes
1answer
253 views

Can this be accomplished with Oracles Fine Grained Auditing?

We need to audit when a table is accessed (either select, update or delete) and I know Oracles Fine Grained Auditing can handle that. The issue we are having is that all of our users use the same ...
2
votes
3answers
783 views

Is it OK to create hundreds of databases in SQL Azure versus one big one and run the risk of deadlocking

I need to create highly scalable solution - where field devices in thousands of sites are delivering data in real time to a back end system, and SQL Azure seems to fit the bill nicely in terms of ...
2
votes
1answer
148 views

After dropping the clustered index, it is still attempting to do a clustered insert [closed]

I am trying to convert data from one database system to another. One of the tables I need to transfer and format contains over 10 million rows. I am running the following script to do it: USE ...
1
vote
1answer
504 views

PostgreSQL vs MySQL benchmarks when a 2nd level cache is included

Has anyone been able to find any benchmarks comparing PostgreSQL and MySQL performance when they are used by a system through Hibernate (or another comparable ORM) and the 2nd level cache (backed by ...
3
votes
1answer
3k views

Memory utilization per database - SQL Server

I am trying to find the memory utilization per database(using dmvs) in a sql server instance, ie (Buffer Cache + Procedure Cache) over a period of time. I have the query to get the buffer cache ...
6
votes
5answers
8k views

What is the easiest way to get started using databases with real data?

I have a project that could benefit from using a database, but I have no experience with databases, don't have access to a server, and have relatively little experience working with things living ...
23
votes
3answers
7k views

Which PowerShell technique should I use to talk to SQL Server?

I'd ultimately like to use PowerShell to replace the old KornShell scripts we use for SQL instance monitors. I'm having a hard time, though, getting my brain around all the different ways that ...
4
votes
2answers
1k views

Oracle extents - How can I have so many with this small size?

This is a different question than the one with the almost-identical title. Again, this is more curiosity about how Oracle Database works than anything I need to change (yes I know multiple extents ...
31
votes
4answers
54k views

Which is faster, InnoDB or MyISAM?

How can MyISAM be "faster" than InnoDB if MyISAM needs to do disk reads for the data? InnoDB uses the buffer pool for indexes and data, and MyISAM just for the index?
6
votes
2answers
2k views

Amazon RDS I/O requests - 1 query = 1 billable I/O?

I have an InnoDB database that I'd like to migrate onto Amazon RDS. My current implementation, hosted on my own server, shows roughly 8M queries per month. The RDS site say that I/O Rate $0.10 ...
2
votes
1answer
188 views

Why does OS login not exist in the user table, but I can still login to MySQL?

mysql> select user, password, host from user; +------+----------+---------------------------------------------+ | user | password | host | ...
3
votes
3answers
3k views

Best way to work around NOT IN NULL issue?

There are plenty of explanations of why NOT IN NULL doesn't work, but I didn't see any solutions. (recent question here: Why does NOT IN with a set containing NULL always return FALSE/NULL?) I have 6 ...
1
vote
1answer
70 views

Assignment of Thread IDs?

I'm in the process of decommissioning an old mysql server. Of course there's a few things left connecting to it periodically people had since forgotten about. I turned on general query logging to ...
3
votes
1answer
849 views

Changes the default database owner in SQL Server 2008

How can I change the default database owner when creating a new database in SQL Server 2008.
12
votes
1answer
2k views

Why does NOT IN with a set containing NULL always return FALSE/NULL?

I had a query (for Postgres and Informix) with a NOT IN clause containing a subquery that in some cases returned NULL values, causing that clause (and the entire query) to fail to return anything. ...
0
votes
1answer
369 views

Is any possible way to get warning message through by oracle [closed]

I am working in developing oracle data base tool, I want display warning message when executing function. For example: CREATE OR REPLACE FUNCTION FN_OEDS_CONVERTDATE2( V_DATE DATE) RETURN VARCHAR2 ...
8
votes
3answers
4k views

I have a powerful machine with 70 GB RAM. How many Oracle instances with 20 GB can be created?

I have powerful machine with 70 GB RAM. I created one Oracle instance with 20 GB as sga_target. I am not able to create another Oracle instance with sga_target > 10G even when I keep the ...
1
vote
2answers
1k views

Changing the default schema of a user

In order for an application user (APP_USER) to use another schema (SCHEMA_OWNER) without the need for prefixing queries with the schema name, I have implemented a logon trigger that changes the ...
3
votes
1answer
415 views

Oracle to PostgreSQL

I'm having som test databases running Oracle 10 & 11 that I plan to try to migrate to PostgreSQL. Some googling hinted that the perl script "ora2pg" could be of use, and free of charge. However, ...
2
votes
2answers
115 views

Hosting ASP.Net session database on same same instance as the user database?

We have a web farm using SQL Server sessions. We are seeing occasional timeouts connecting to the session DB even though overall utilization is low. The ASPState session database is on the same ...
0
votes
1answer
279 views

Can't connect to MySQL Cluster Storage (data) nodes [duplicate]

Possible Duplicate: Can't connect to MySQL Cluster Storage (data) nodes I've deployed a MySQL Cluster with a few nodes, and I want to access the storage nodes directly from another ...
1
vote
1answer
2k views

Keeping 2 tables in sync

I need to write a trigger that will keep one table synced with 2 other tables. I have table_a, table_b and table_c on slave. The master has only table_a and whenever this table is updated on master, ...
2
votes
0answers
99 views

Can't connect to MySQL Cluster Storage (data) nodes

I've deployed a MySQL Cluster with a few nodes, and I want to access the storage nodes directly from another machine using NDBAPI. When I tried to connect from the same host it worked, but when I try ...
0
votes
1answer
2k views

Upgrading 10g database to 11g database

Is doing a full data export (expdp) from an Oracle 10g (10.2.0.1.0) database and then doing an import of that dump file (impdp) into an 11.2.0.2 database a valid and acceptable upgrade path from 10g ...
3
votes
2answers
2k views

Looking for example design of using an SQL database as a queue for throttling web service requests of multiple users

I'm designing a system for multiple users to queue their requests to a web service which takes requests such as creating new entries, changing entries, requesting data. Many of the web service calls ...
2
votes
3answers
901 views

Find and remove gaps in sequence across two different columns

I've tried to solve this problem using a set-based approach. However, since I need to look at each row I think I must use a cursor; please correct me if I'm wrong. The table: Project, item, method, ...
-2
votes
1answer
71 views

Who is the original author/creator that took the time to fill/create Northwind SQL server sample database? [closed]

I've used it before, but I never really seen any documentation in SQL server pointing to who actually created it. Is it a person, a group of people? Did Microsoft create it? Who??
1
vote
1answer
2k views

PhpMyAdmin Missing parameter

Everything was working fine until this moment I want to create a new database and I'm receiving this error db_create.php: Missing parameter: new_db (FAQ 2.8) Also when I was trying to export my ...
2
votes
1answer
344 views

FLUSH TABLES stays in the processlist even after execution

Here is my code from Stored Procedures in Mysql FLUSH TABLES; TRUNCATE TABLE tbl_cdrload; TRUNCATE TABLE tbl_cdrdetails_temp; Then i execute a query to load a file in to database as below LOAD ...
5
votes
1answer
1k views

Which mysql storage engine to choose?

I'm confused about which mysql engine should I choose (lets talk about the most used : MyISAM and InnoDB). The theories say: Both work with BTree indexes, but MyISAM can work with FULLTEXT index ...
7
votes
2answers
798 views

Can Availability Groups replace transactional replication?

I've been looking at the new features of SQL Server 2012, and how it can help my current situation. Currently we're on SQL Server 2008 R2, and replicate two OLTP servers' databases to a single ...
50
votes
4answers
31k views

How can I monitor the progress of an import of a large .sql file?

I am importing a 7 GB foobar.sql to restore a table in a local database. $ mysql -h localhost -u root 'my_data' < foobar.sql $ mysql --version /usr/local/mysql/bin/mysql Ver 14.12 Distrib ...
1
vote
1answer
558 views

Finding Duplicates in LEFT JOIN

Here is my table structure: create table table_a (emp_name varchar(100), dept_name varchar(100)); insert into table_a values ('amar', 'finance'); insert into table_a values ('akbar', ...
5
votes
1answer
2k views

In a CASE Statement, which is faster: “WHEN [field] in (0)” or “WHEN [field] = 0”?

I'm looking at a stored proc that another guy has written and every WHEN clause is using an IN statement instead of =. My gut tells me this isn't as fast, efficient, etc. For example: CASE WHEN ...
4
votes
1answer
4k views

I want to know about the IOPS (I/O Per Second) and How it influences the DB CRUD operation

I want to get a dedicated server for my Database (MySQL) which runs InnoDB Engine. There is this option in InnoDB capacity that you can define the IOPS in it. Let's say that I have a SATA 72K-RPM HDD ...
2
votes
2answers
435 views

Is it possable to do a ALL SERVER DML Trigger?

My department works on converting a client's database when a client switches from another company to us. We have a RDP session they can connect to and see our software with their data. Once they ...
0
votes
1answer
851 views

How to convert data from XML format into Excel workbook or database table [closed]

I have some data that is given in a consistent XML format (which I can't change). I would like to import it into a database so that I can work with it, and then search, identify and export certain ...
1
vote
1answer
6k views

Problem with View When Restoring a MySQL Backup

I have a database (InnoDB) with some tables, views and routines... Periodically I do a backup using the command line: mysqldump -u user -ppassword --routines db_name > backup.sql But I have a ...
2
votes
1answer
398 views

PostgreSQL schemas, select same table from all schemas

My app is used by about 80k users every month. I want to create separate PostgreSQL schemas for each user (a-la SaaS, for protection). My app allows users to search other user's profiles, via: ...
2
votes
0answers
4k views

SQL*Plus, @, and relative paths

Somehow, it seems that SQL*Plus (at least on Windows) is unable to locate a script with a relative path when called with @@ and when the path starts with a single or double dot. For example, under ...
1
vote
1answer
4k views

Clarify - Need to add Multiple foreign key constraints

I am not sure if I am thinking about this process the wrong way. Just to Surmise if I create a table(TeamList) whose sole purpose is to capture the coaches team list of players and positions for a ...
2
votes
1answer
582 views

Service Account Groups in SQL Server 2012

I was tracking down some permissions issues on SSRS 2012 and I started looking for the local groups that I am used to seeing for SQL Server. I noticed something I had not seen before, the groups have ...
3
votes
3answers
2k views

View foreign key constraints so I can delete a table

I have copied a database I was working on so I could change some key elements of its design for my new version. I want to delete totally some tables from the database however I cannot due to some ...
9
votes
0answers
4k views

Fast SQL query with * but extremely slow with specific columns? [closed]

We have a query that we're running on SQL Server 2008 in the Management Studio. I can't give the exact query details, but let's say it's equivalent to this: SELECT * FROM MyView a (nolock) INNER ...
0
votes
1answer
258 views

Write Access Client App for SQL Server 2005 Backend [closed]

I'm writing an inventory/payroll system, and I'm storing all the records on a remote server running SQL Server 2005 on Windows Server 2008 R2. I was wondering how I could start writing forms(very ...

15 30 50 per page