0
votes
3answers
530 views

MySQL InnoDB Sorting Issue

I was surprised to see MySQL's InnoDB showing an interesting behavior, which I cannot fully explain. According to the official MySQL InnoDB Documentation: "All indexes other than the clustered ...
1
vote
1answer
93 views

Powershell and SQL Script Execution in selected schemas

Any one please help me on this one also..I have got many schemas under one database. And in that database I have some SQL Scripts to be executed. My issue is that I should be able to execute those sql ...
-2
votes
1answer
89 views

Select data one by one from table and data need to repeat custom number of times [closed]

I have table data like data1 data2 data3 data4 and I need to select these rows like this: data1 data1 data1 data1 data2 data2 data2 data3 data3 and how to perform this in SQL Server 2005?
1
vote
1answer
1k views

Check if postgresql database is exists (case insensitive way)

Is there a "elegant built-in" case-insensitive way to check if db is exists? I've found only SELECT datname FROM pg_catalog.pg_database WHERE datname='dbname', but this is a CS check. The first thing ...
0
votes
1answer
386 views

How can I send HTTP requests from SQL Server 2012 to a non-.Net application? [duplicate]

I know basic only concepts (DDL,DML queries) of the SQL Server 2012. I explain the workflows of both my application and the database below. Workflow of the application: I build web application in ...
0
votes
0answers
25 views

Secure the jdbc and remote MySQL(windows) server connection [duplicate]

I'm a student doing a project which uses jdbc and mysql(on windows). I have an app with connects to mysql server on remote host. I just this connection to be a little secure. I found this : ...
0
votes
0answers
162 views

How to enable SSL in MySQL on Windows?

I'm a student doing a project which uses JDBC and MySQL (on Windows). I have an application with connects to a MySQL server on a remote host. To have a secure connection, I found this : ...
11
votes
3answers
3k views

SQL Server Agent Jobs and Availability Groups

I'm looking for best practice in dealing with scheduled SQL Server Agent jobs in SQL Server 2012 availability groups. Maybe I missed something, however at the current state I feel that SQL Server ...
0
votes
1answer
519 views

Oracle shared memory exception ORA-04031 [duplicate]

I'm trying to establish an Oracle database connection. It throws the following exception: ORA-04031: unable to allocate 4048 bytes of shared memory ("shared pool","unknown object","sga ...
2
votes
1answer
128 views

PowerShell to get database schemas

I am able to connect to a remote SQL Server with the instance name using PowerShell. I am using an XML file (something like a configuration file) which includes all my database details. PowerShell ...
1
vote
1answer
201 views

Relative cost of two similar queries involving XML columns

I have two queries as shown below which do the same thing. Here xmlcolumn is a column with datatype XML. I use these queries to search for a string anywhere in the XML column. I checked the execution ...
1
vote
3answers
646 views

copy only tables with data from one database to another database [closed]

I have two database , dbOne(version - 10.50.1600 - locate in office server ) and dbTwo(version - 10.0.1600 - locate in my local server) . I want to copy dbOne's tables with data to dbTwo . Is there ...
0
votes
1answer
325 views

Postgresql table with one integer column, sorted index, with duplicate primary key

I want to have a table in PostgreSQL with these properties: One column with an integer Allow duplicates in this column. Duplicates will be rare. Duplicates have no meaning logically and will be ...
0
votes
1answer
614 views

Insert missing rows to subscriber of Transactional Replication

I have established SQL Server Replication between SQL Server 2005 and 2008 R2. SQL Server 2005 is the publisher while SQL Server 2008 R2 is the subscriber. The replicated database is about 40GB. ...
3
votes
0answers
156 views

How to properly troubleshoot Merge Replication False Conflicts

We have SQL Server 2008 R2 Merge Replication setup. Lately I started getting conflicts for some tables, and when I check the conflict viewer, I can see that the winner & the loser column values ...
-3
votes
3answers
95 views

Trigger for database [closed]

As far as I understand Trigger can be written for the table of the database. Now I want the trigger for database. The database can contain multiple table, If there is any change even in one table the ...
1
vote
1answer
2k views

Analyse MySQL General Query Log in Real-time?

We want to use mysql general query log to do real-time monitoring and auditing. Currently our approach is: set general_log=on; sleep 15m; set general_log=off; scp & rm xxx.log; set ...
1
vote
1answer
575 views

Capture Data Change Vs Triggers [closed]

I am constructing a database that needs to keep track of historical data. It is a Electronic medical system. All data needs to be updated in real time so the user can see what changes happened in the ...
3
votes
2answers
111 views

How to determine that the chain of log degraded

SQL Server 2005. I have DB with full recovery model. If i execute on my base ALTER DATABASE test SET RECOVERY SIMPLE ALTER DATABASE test SET RECOVERY FULL or BACKUP LOG test WITH truncate_only ...
1
vote
1answer
263 views

Migrating Oracle packages to SqlServer

I'm moving database from Oracle to SQLServer (2012 if that matters). The process of migrating tables/views is more or less straightforward and automated. Triggers are also not an issue since I don't ...
2
votes
1answer
339 views

Cannot connect to server. Too many symbolic links. Postgres Error [closed]

I get this error when I try connecting to a PostgreSQL server: psql: could not connect to server: Too many levels of symbolic links Is the server running locally and accepting connections on ...
0
votes
2answers
6k views

max_allowed_packet in mySQL

I tried all three method explained here to max_allowed_packet. But no one changes its value in my MySQL 5.6. I use show variables like '%max_allowed_packet%' to see its current value. But it always ...
0
votes
1answer
102 views

csv file handling

I am using an EAV like structure to store CSV files. There aren't any predetermined columns, so it needs to be able to expand the columns / data on demand. Is this a fairly good way of handling such a ...
0
votes
1answer
282 views

xml queries with exist and contains giving unexpected results

I have a query as shown below. DECLARE @tbl TABLE ( id INT, col XML ) INSERT INTO @tbl VALUES (1,'<Root> <Row> <User>xyz</User> ...
4
votes
1answer
285 views

Why aren't my Postgres WAL segments (up to the point of turning on archiving) being archived?

The pg_xlog directory for my master cluster looks like this: -rw------- 1 postgres postgres 16M Jun 21 21:42 000000010000000000000001 -rw------- 1 postgres postgres 16M Jun 21 22:42 ...
1
vote
1answer
278 views

In Job Step > Properties, only see two tabs: Package and Configuration

I am trying to set a job step that executes a package to use the 32-bit runtime, as it uses the SQL 10 driver against a SQL 2000 database. The job is running on SQL Server 2012. I see all kinds of ...
0
votes
1answer
2k views

Update existing SQL Server 2008 table via Flat File using SSIS

I am trying to update existing records or add any new ones to a SQL Server table using a flat file. Also I need it work as an SSIS package. I don't get an option to do a source query like I do for ...
2
votes
0answers
124 views

How to gracefully handle a source database restore from backup in a data warehouse

We are facing a challenging situation with our data warehouse source databases. Frequently these sources databases will be restored from backups. There is a high turnover of data entry persons who ...
1
vote
1answer
498 views

Mitigating MySQL replication delay in single master/multiple slave setup

For a particular web application that requires high availability I am thinking of scaling out by setting-up MySQL replication with one "write" master and multiple "read" slaves (as explained here ...
7
votes
2answers
385 views

Seek predicate not using all available columns

I have a strange query compilation issue which is hard to reproduce. It only happens under high load and cannot be easily repeated. There is a table T with columns A,B,C,D. There is a non-unique ...
3
votes
4answers
301 views

Changing the representation of NULLs in pg_dump plaintext output

I'm trying to convert a large-ish Postgres DB (500 GB) to SQL Server 2012. After investigating a few third-party tools and being disappointed in features, performance, or both, I started pursuing a ...
10
votes
4answers
8k views

Formatting T-SQL in SSMS 2012

According to this Microsoft document: http://msdn.microsoft.com/en-us/library/ms174205.aspx I am supposed to be able to use ctrl+K then ctrl+D to format my SQL documents in SQL Server Management ...
0
votes
1answer
72 views

Chaining System Query in MySQL

I have a table which maintains a user chain Here is the table structure +------+--------+ | id | user | +------+--------+ | 2 | 4 | | 10 | 4 | | 11 | 4 | | 1 | 2 | ...
1
vote
1answer
352 views

How does Postgres know which logs have been archived?

I'm asking this because Postgres was hard-stopped yesterday, and I fear that there could be partial / corrupt data in one of my archived log segments. I'd like to simply delete the logs from my slave ...
2
votes
2answers
1k views

Finding the last command issued by a blocking process

I've developed an interface from ERP SAP Business One to warehouse management, and am facing problems concerning database locks. My program includes direct write operations into the ERP database (a ...
1
vote
2answers
893 views

Indexes Size 20 times bigger then the table itself and very slow queries

The table I want to query has only about ~3000 rows with 3 columns: int/varchar(100)/varchar(100) yet it takes ~30 sec to query them all! Then I saw that the table size is 1331MB but the indexes ...
1
vote
2answers
61 views

Can a database detect that data is out of sequence if each datapoint has a sequential ID

Can a database detect that data is out of sequence if each datapoint has a sequential ID? E.G A trading DB server receives trade ID 9, and next receives trade ID 11. In this case, I would like the DB ...
0
votes
1answer
929 views

What are safe characters to use in SQL Server Full Text Search? [closed]

I've been playing with full text search on SQL Server 2012. I must say my attempts to target special characters in search queries were futile - SS does not understand them. What's more, sometimes the ...
2
votes
2answers
5k views

Dynamic Oracle Pivot_In_Clause

I'm kinda stuck. I want to do a user-role-relationship pivot table and my query so far looks like this: WITH PIVOT_DATA AS ( SELECT * FROM ( SELECT USERNAME, GRANTED_ROLE ...
1
vote
0answers
312 views

Search for string in xml column

I am using sql server 2008 r2 express. I have a table with column name 'xmlmycolumn' which is of datatype xml. I want to search for string in that whole xml. So to do this i am casting column as ...
1
vote
2answers
398 views

Query for master in Postgres replication

I'm trying to find out if there is a way to query for the master, from a slave PostgreSQL server that has been set up with server replication. From a slave, I can: SELECT pg_is_in_recovery() And ...
0
votes
2answers
1k views

Cassandra in multiple data center - EC2MultiRegionSnitch

I was reading article from : http://www.datastax.com/docs/1.0/cluster_architecture/replication#networktopologystrategy and I have a question about - EC2MultiRegionSnitch. I did not understand it well. ...
1
vote
1answer
959 views

mongodb replication node stuck at “STARTUP2” with optimeDate as 1970

i have just setup replica sets with three nodes . the third node is stuck at stateStr STARTUP2 with "optimeDate" : ISODate("1970-01-01T00:00:00Z"). However its showing no error message. Is this ...
0
votes
1answer
597 views

How to convert Postgres from 32 bit to 64 bit

I would like to convert from PG 32 bit to 64 bit. I am testing with pg_upgrade (in several scenarios) but I think it cannot do that. With pg_upgrade, I can upgrade PG version 8.5 to v.9 (both of ...
0
votes
3answers
517 views

Replication Options with data subsets

We have an application that makes of of a SQL Server 2012 (ServerA) database. Some data that we need to display, though, comes from another database, but it's SQL Server 2008 (ServerSOURCE). The ...
0
votes
2answers
229 views

Update primary SQL Server in mirrored environment using transaction logs from old environment

I'm currently migrating a large (~40gb) database to a new environment. The new environment is a HA/mirrored set up with primary, mirror and witness nodes. I'm backing up the database in the old ...
3
votes
1answer
472 views

Running functions in parallel

This is for SQL Server 2012. We have some import processes for FTP files that are picked up and read into a staging table, from there we massage/check the data before moving into production. One of ...
2
votes
1answer
68 views

Make sure slave has finished reading from master

I am planning to have a master-slave system in which occasionally the master and slave will reverse roles. To do this, I will stop further updates to master, and redirect traffic to the slave. But, ...
4
votes
2answers
3k views

Create table group sub-folders in Management Studio

When I was exploring the master database in SSMS I noticed that under the Tables folder there is another folder called Systems Tables that houses a bunch of tables. Is it possible for us to create a ...
1
vote
1answer
339 views

SQL Import/Export defaults to byte stream on export

So, I've done some research and I can't seem to figure this out. I'm not sure if it's some setting that I'm missing or what. For the basic info, running SQL2012, 64 bit, all that good stuff. I ...

15 30 50 per page