6
votes
1answer
977 views

When performing a cross-database transaction, in which transaction log(s) is the information stored?

Given the following snippet: -- error checking omitted for brevity begin tran exec database1..my_stored_procedure exec database2..my_other_stored_procedure if (@@error <> 0) rollback ...
5
votes
4answers
98 views

How do I check if a certain SQL statement is being run?

Using SQL Server Management Studio, how can check or see who is running a certain SQL statement?
1
vote
1answer
676 views

How do I refresh SQL server cross database references after a database is reattached with a different name? (Are there hidden synonyms?)

I have 2 seperate SQL databases on the same SQL instance. Database1 references tables on Database2 in its views and stored procedures. Everything was working fine until we had to create a fresh ...
4
votes
2answers
5k views

Is it okay to use rsync on InnoDB database if the MySQL server is shutdown?

Is it okay to use rsync on InnoDB database if the MySQL server is shutdown ? For example : /etc/init.d/mysql stop rsync -av /home/mysql/mydb/ root@newserver.com:/home/mysql
0
votes
1answer
3k views

Plugin 'FEDERATED' is disabled

Im trying to start Mysql using easyPHP : the response is an alert window to a log file. The main error is <-- Plugin 'FEDERATED' is disabled -->. Through my research on internet i found that the ...
-1
votes
1answer
118 views

Why is this mysql query wrong? [closed]

I try to run the following sql query in mysql SET @rank:=0; WITH TEMP ( SELECT @rank := @rank + 1 AS ROW_ID , UUID() as RANDOM_VALUE,D.* FROM house_information_new D ORDER BY ...
1
vote
1answer
2k views

Using a Having clause with an outer join

I want to use a "having" clause with an outer join, using a column that is used in the outer join. This is my query: SELECT I.CARD_BIN BIN FROM GE_ICA_BIN I LEFT OUTER JOIN GE_PAYEE_VALIDATION ...
2
votes
1answer
139 views

WorldWide site - should I save UTC or in fixed time?

Let's say I have a world wide website ( I mean it has uses from all around the world). I have 1 server which is in germany ( at some city). it will never be moved from germany - ever. My question ...
1
vote
1answer
86 views

Inhibit Sql Server Log Shipping Alerts during certain times

There are batch jobs that occur in the middle of the night, which cause log shipping backups to be delayed such that they exceed the alert threshold, and alerts are then emailed. How can I disable ...
4
votes
2answers
2k views

Is there a difference in performance between @date and getdate()?

Usually I use the getdate() function in my where clauses to go back in time. Something like: DOC.DATUM >= DATEADD(DD,-1*SSN_SDO.DANA_ZA_POVRAT,GETDATE()) Will SQL Server 2008R2 perform faster ...
0
votes
1answer
2k views

Lock wait time out exceed restart transaction

I had got error on the lock wait time out so below I got 3 samples taken. One I took before the increase innodb_lock_wait_timeout to 120. So is there anything else I must tweak based on the logs ...
0
votes
1answer
254 views

Tool to view intermediate query results

I am using SQL Server 2008 Express edition and I've worked two days on a problem where seems to be a cross join in running a query. I would want to know the set returned per join operation visually. ...
5
votes
3answers
3k views

Cannot rebuild index, but there's no reason why not?

I've created a process whereby I am able to only rebuild indexes that need rebuilding(the process takes an hour and a half if I rebuild them all), and while it works beautifully, it gets stuck on one ...
1
vote
2answers
600 views

mysqlslap chokes on strings that contain “;” delimiter?

I'm having a problem passing preexisting files full of SQL statements into mysqlslap. For example, I have a file named create.sql that contains my table structure (as dumped by mysqldump), with ...
0
votes
2answers
368 views

Can I recover CDC tables from transaction logs?

Is there anyway to restore CDC tables from transaction logs? My basic understanding is that CDC reads these logs, and entries that are specially marked, are grabbed by CDC. Once this has happened ...
0
votes
1answer
145 views

Writing with multiple psql processes to database seems to damage data

I have a couple terabytes of CSV data that I am trying to import into a PostgreSQL 8.4 database (on a RedHat 6.2 server), whose data directory is initialized on a multipath hardware RAID. There are ...
3
votes
3answers
186 views

pros/cons of different ways to store whether a record is one of two options?

I am trying to store whether an address is a Work address or a Home address. There will never be another type of address. I'm wondering what the pros/cons are of the different ways to store this, ...
3
votes
3answers
4k views

Transfer data from DB2 to Oracle

I want to transfer data from an old DB2 system to a new Oracle database. How should I go about doing this?
2
votes
4answers
14k views

How can I query data from a linked server, and pass it parameters to filter by?

I have a really big query that needs to be run on multiple databases, and the results appended to a temp table and returned. The basic syntax looks something like this: INSERT INTO #tmpTable (Id, ...
5
votes
5answers
9k views

TokuDB not much faster than MySQL

I have converted a MySQL database with 80.000.000 rows to TokuDB. Now when I run: select count(id) from xxx where active=1 it takes 90% of the time of the normal MySQL request. What do I have to ...
4
votes
1answer
118 views

Log file growth issues

We're consolidating data from a bunch of databases into four reporting databases each night. Because the entire dataset is imported each night we do not need to be able to restore the data to a point ...
3
votes
2answers
1k views

Can I get notification when event occur?

SQL Servers has Traces and XEvents. These are used to capture and analyze what is going on with our SQL Server Instances. Events are stored in the stack for later analysis. For example, If I decide ...
3
votes
1answer
58 views

How should permissions for anonymous users be modelled?

I'm designing a web application. There will be users who log into the site, but also anonymous, non-authenticated users, i.e. any member of the public who accesses the site. Users will be assigned to ...
2
votes
1answer
1k views

Table corruption: How to perform Innodb Checksum checks in MySQL 5.5 for Windows?

Having a corrupted Mysql 5.5.31 (Windows) database, my question relates to the the top solution provided in How do you identify InnoDB table corruption? , more precisely to the following script that ...
4
votes
2answers
33k views

Converting Non Unicode string to Unicode string SSIS

I am creating a package where I will be exporting data from a database into an empty excel file. When I added only the source and destination components and I ran the package I got a conversion error ...
4
votes
1answer
2k views

Is replication from SQL Server 2008 to PostgreSql possible?

Is it possible ? Sql Server as publisher(master) and PostgreSql as slave(subscriber) ? Any type of replication really.
3
votes
1answer
4k views

MySQL high CPU usage (MyISAM table indexes)

I have a problem with an inherited MySQL database. From time to time mysqld uses up to 2300% CPU.. The only solution is to service mysql stop and run an myisamchk -r on a table. After the indexes have ...
3
votes
2answers
10k views

Total Memory used by SQL Server (64 bit)

My knowledge on the subject suggests that perf counter SQL Server:Memory Manager: Total Server Memory only gives you buffer pool memory. There is a column called physical_memory_in_use in a DMV named ...
2
votes
1answer
108 views

Backing up SQL Server 2008 database in different recovery model

We currently have a production environment with 10 SQL Server 2008 databases in Full recovery mode (for obvious reasons). We back these databases up fully at a frequent interval, but due to the Full ...
2
votes
1answer
2k views

Testing AFTER INSERT Trigger

I have the following table: CREATE TABLE Train( Train_No integer PRIMARY KEY, Loco_No integer REFERENCES Locomotive(Loco_No), Back_Loco_No float REFERENCES Locomotive(Loco_No), ...
3
votes
1answer
126 views

SQL Server database schema (and likely, some data changes) - how to auto-distribute over many database instances

Our development involves a SQL Server database (also might be Oracle or Postgres later) and we would sometimes make database schema changes or some other interventions in database. What solutions ...
0
votes
1answer
98 views

Index optimization

I'm building a 'tag' system for my blog posts. Currently my tags table has columns tagid - MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY and tag VARCHAR(30) NOT NULL UNIQUE. And I have another table ...
12
votes
2answers
11k views

Why doesn't DELETE + REORG free diskspace (DB2)?

In DB2 I have a table containing large binary data. Now i purged the whole table and ran runstats, reorg, runstats, but the amount of disk space taken does not change. What could be wrong here? The ...
8
votes
2answers
2k views

How to design this database to avoid cyclic dependency?

There are two tables: User Address User contains a reference to Address. Address contains the columns CreatedBy and ModifiedBy, which is reference to User. How do I design this database to avoid ...
2
votes
1answer
1k views

Trigger doesn't run when value of a column changes from null to 1

I have this trigger: delimiter $$ create trigger tr after update on t1 for each row begin if new.col1 !=old.col1 then update t2 set col2 =1 where t2.col3=t1.col3; end if; end $$ This ...
0
votes
1answer
1k views

Is it there anyway to restore updated records in Microsoft SQL Server 2008 R2?

We have an test database configured with our web application. Due to internal web application error the entries were get updated in the database. Is it there any way to recover the updated records? ...
1
vote
1answer
1k views

selecting the month day and year from a transaction table

i want to create two queries for my table which has fields name,surname and amount paid,the first query should select the day,month and the amount paid,the second query should select a month,year in ...
0
votes
1answer
2k views

pg_dump from 9.2 to 8.4 [closed]

I'm trying to restore a db dump from PostgreSQL 9.2 to PostgrSQL 8.4 (from separate machines, both are running Windows 7). I followed the instructions in this answer: Use pg_restore to restore from ...
0
votes
1answer
5k views

How to connect a SQL Server 2012 to the internet [closed]

As you know you can create a database with SQL Server using the SQL Server configuration manager and SQL Server Management Studio. You know this - just typing that to tell that I checked the whole ...
-7
votes
2answers
541 views

Challenge: Build MySQL table that's not in first normal form [closed]

I have read numerous books and articles about database design and SQL in which it is said that a database should be in first normal form (1NF). (Some then go on to describe situations in which it may ...
0
votes
2answers
6k views

Find Underlying Data Type (int - integer) of Oracle Table instead of number

I can create an example table using following syntax. CREATE TABLE "TABLE2" ( "COLUMN_INT" INT NOT NULL, "COLUMN_INTEGER" INTEGER NOT NULL, "COLUMN_SMALLINT" SMALLINT NOT NULL, ...
0
votes
1answer
3k views

User with dba privs can't login to APEX, but can from SQL*Plus

I'm using Oracle 11gR2 XE. A user with dba privileges can't log in to the APEX interface, but can from the command line with sqlplus. I just created user: CREATE ROLE administrators; GRANT dba TO ...
0
votes
0answers
1k views

MySQL installation broken after Windows crash - how to repair MySQL and recover data?

recently my PC powered off abruptly for no apparent reason, leaving my Windows 7 installation severly damaged. I can still log onto the machine, but tons of Windows system files have been corrupted ...
4
votes
3answers
7k views

Issue after moving the ib_logfile1 and ib_logfile0 files

I wanted to increase the innodb_log_file_size for better performance. And I increased it from the default value to 256 MB. As usual I got the error saying InnoDB: Error: log file ./ib_logfile0 is of ...
3
votes
1answer
131 views

Question about MySQL Semisynchronous Replication

I was researching about MySQL Semisynchronous Replication, my understanding about the workflow is the follow: Master Receive a successful transaction from a client session. Master write it to his ...
0
votes
0answers
460 views

Duplication Oracle Database to remote host

I have two scenarios. 1 ) Let's say , I have the same file system and same SID on both nodes. I've created any directories necessary for start the duplicate database. First I used command below. ...
0
votes
0answers
403 views

DBA_SCHEDULER_Job is not giving any result

I have created one procedure that is supposed to trigger on 5th date of every month.for that i have used dba scheduler job.but its not triggering. select job_name,status from dba_scheduler_jobs; ...
1
vote
2answers
613 views

Mysql Connection Pooling Similar To PostgreSQL's PgBouncer

I'm looking for a pooling solution for mysql that is independent of the language. I am using PGBouncer as an example because it Resides on the server the database is on Just change the connection ...
0
votes
0answers
665 views

InnoDB errors after having deleted “ibdata1”

By accident, I have deleted the ibdata1 file in the MySQL directory because MySQL wasn't functioning correctly. After reading so many forums, I found a post that recommended deleting the 3 files ...
10
votes
2answers
17k views

Maximum memory setting in SQL Server

I'm running SQL Server 2008 and a web based application, on a single dedicated server, with only 2Gb of memory available. As is noted elsewhere, SQL Server regularly takes up to 98% of physical ...

15 30 50 per page