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
960 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
518 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
475 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 ...
1
vote
2answers
501 views

MySQL bin log missing data?

I'm trying to make heads and tails of my binary logs and am coming up short. I have many entries similar to the following from mysqlbinlog but I'm missing log data that I know should be there. # at ...
0
votes
2answers
132 views

Azure compatible client tools [closed]

I'm building a DB for someone as a favor and whilst I'm perfectly OK to create a DB in Azure SQL for them and do the requisite TSQL coding they require I do also need to give them a client based way ...
6
votes
5answers
12k views

Error 3154 while restoring a backup using WITH REPLACE

I have SQL 2012 with SP1 installed on my computer. I made a backup of a database test.bak. I have a database with the name test2 which is the same database, but the data changed. I want to restore ...
1
vote
2answers
2k views

MYSQL matching one column to another in a different table via a FULLTEXT index

I current have two different tables. The first table has a list of titles and IDs associated to these titles, the second table is a list of random heading. What I would like to know is if there is a ...
2
votes
4answers
1k views

SQL Server grant permissions to STANDBY database

So, first: the setup. We have SQL Server 2012 (ServerA) running in domain A. We have SQL Server 2012 (ServerB) running in domain B, separate subnet, no trusts. These are completely separate domains ...
7
votes
1answer
1k views

Estimated vs Actual rows differences (actual much smaller than estimated) - sort

I'm running a query that is processing some nodes out of an XML document. My estimated subtree cost is in the millions and it seems it all comes from a sort operation sql server is performing on some ...
14
votes
2answers
20k views

Good explanation of cascade (ON DELETE/UPDATE) behavior

I don't design schemas everyday, but when I do, I try to setup cascade updates/deletes correctly to make administration easier. I understand how cascades work, but I can never remember which table is ...
3
votes
2answers
167 views

Can I grant privileges to a role without specifying an object?

I am trying to create a role to simplify granting a set of privileges that I often give to users. I am wondering if there is any way to grant these privileges on only the objects owned by their schema ...
0
votes
3answers
1k views

Space used by databases file through linked server

I need to find out space used by database file for multiple databases through linked server(from one central server to multiple client SQL servers). I created view on client size, for all databases: ...
1
vote
1answer
195 views

Any way to estimate the required space for a SQL dump file?

I want to import a Wikipedia XML dump file into MySQL. The uncompressed XML dump file is 65GB. Does this mean I should free up almost 64GB in the MySQL data path? Is there any way to estimate the ...
0
votes
1answer
500 views

MySQL query optimizer ignoring smaller scan on TIMESTAMP column, cardinality?

I've got a complex multi-join query where the optimizer won't pick an index on a TIMESTAMP column even though it results in a smaller index/table scan. If I force the index on the TIMESTAMP column, ...
0
votes
1answer
103 views

How we take dump with batch of records option?

we have 30 GB database.we want to take backup of this database. here the question is we want to take the backup batch of every 10k records. How we can take batch of records backup using mysqldump
3
votes
1answer
3k views

Transaction Log Maintanance While Using AlwaysOn Availability Group

We are using HADR ( AlwaysOn Availability Group) feature of SQL Server 2012. Server and AG Configuration as below: SQL12_SRV1 --> AG1(PRIMARY) - SYNC -->> DBTest SQL12_SRV2 --> AG1(SECONDARY) ...
0
votes
2answers
739 views

SQL Server Maintenance Plan TSQL query to log the backup databases

Does anyone know how to use the TSQL task in SQL Server 2008 Maintenance Plan to log (insert) the databases that where backed-up? Imagine a Maintenance Plan that does the backup for DB1,DB2 and DB3. ...
2
votes
1answer
287 views

SQL Server connectivity and script execution using PowerShell

I am designing a PowerShell script that can execute some sql scripts in a folder. Actually this must be done remotely. I am able to connect to the particular server remotely using: $SqlConnection = ...
0
votes
0answers
40 views

How can I use Query notification and what are the requirement? [duplicate]

I want to use Query notification in my app to get the notification from database for updated data, so that app will fire the query to get updated data instead of monitoring the database for every 5 ...
2
votes
0answers
236 views

How to push the data from database?

I want to push the data from database to application instead of application pull the data.I have installed ms sql server and apache tomcat server. I have my application in apache tomcat, here I made ...
0
votes
1answer
96 views

'mysql' execute statment returns 'NULL'

Could you please advise why this query returns 'NULL' on BASH shell, basically I need to script it so could you please also advise what's the best practices to execute queries in BASH script? MySQL ...
0
votes
1answer
1k views

Permissions on sys.syslogins

I've got the following scenario: ( loggend in on SQL-Server with full admin-privileges ) Creating LogIn, User, Role and associate them. IF NOT EXISTS( SELECT "name" FROM "master"."dbo"."syslogins" ...
0
votes
0answers
169 views

Delete backup directories using RMAN

Is there any way RMAN can delete empty backup directories?
0
votes
3answers
2k views

trouble creating a database with postgreql [closed]

I just installed Postgresql on my Windows laptop. I am now trying to create my first database. I launched the Windows PowerShell and tried the following: PS C:\Users\Chris\Documents\test> & ...
1
vote
1answer
607 views

Issues starting Postgres server [closed]

I'm trying to go through the book "7 Databases in 7 Weeks" and I'm completely stuck at starting a Postgres server. My current issue is that when I run pg_ctl start I get the following error: LOG: ...
1
vote
1answer
683 views

Count number of common column names among all tables in a database

Is there any way to compare every table with each other in a database, listing the number of common columns between each tables? I prefer using join over subquery and information_schema.columns over ...
12
votes
2answers
11k views

What is the actual behavior of compatibility level 80?

Could somebody provide me with a better insight about the compatibility mode feature? It is behaving different than I expected. As far as I understand compatibility modes, it is about the ...
0
votes
2answers
533 views

SQL Server AD groups membership seems cached - how to flush to test? [duplicate]

I am configuring a new, fully AD group based security scheme on an existing SQL Server 2008. When I change the group to which I belong to test my configs, it seems that there is quite a delay between ...
2
votes
1answer
561 views

Will certain Database Compatibility cause performance degradation?

I'm running a variety of SQL Servers from 2005 to 2012 across several machines. I have many of these databases running in SQL Server 2000 compatibility mode. Will using an older compatibility in a ...
4
votes
2answers
632 views

SQL server agent SSIS error

I get the following error when I execute my package as a SQL server agent job. It is an SSIS 2008 package running on a SQL Server 2008 instance. My package security is DontSaveSensitive. I don't ...
0
votes
2answers
982 views

How do I interpret the log when I run DBCC TRACEON (3502, 3504, 3605, -1)

I have been using DBCC Traceon (3502, 3504, 3605, -1) because it was recommended in a blog for discovering performance issues related to I/O. I'm running MS SQL Server 2008 R2 SP1 Results in my SQL ...
2
votes
1answer
1k views

MySQL exception after upgrading from Java 6 to Java 7

I've been trying, for a long time, to find a solution for the issue. Recently I've updated my JDK from 6 to 7. Now my grails app doesn't start up, I keep getting the follow exception: Caused by ...
4
votes
1answer
669 views

ORDER BY optimization for a large table

I am currently aggregating posts from different social networks. Currently I have 50-100 million posts from Facebook, Twitter, Youtube, Instagram , Pinterest. Consider a table posts posts { id ...
2
votes
2answers
8k views

MySQL using too much CPU

I'm studying to be a DBA right now because I have a massive live database that is very sensitive that I manage. Here's the current system stats of my dedicated database server: CentOS 5.9 24gb Ram 8 ...
1
vote
1answer
44 views

query to get list of tables that has same columns from information_schema.columns?

idea is to list all the tables that has redundant columns across database using information_schema.columns! let's say table1 = dbo.ABC columns = id, name, department, designation table2= dbo.DEF ...
0
votes
1answer
65 views

MySql Replication in two directions

I am successfully able to set up master-slave replication of database with MySQL. So, whenever I am updating my database on master, It will automatically replicated on the slave. Now, I have situation ...
2
votes
2answers
2k views

Optimizing mysql queries running on 50 million rows

Is there any technique/advice in order to optimize the performance of the queries below? According to my needs, my average db size will be approximately 30mill. rows per day, so every second less, ...
7
votes
1answer
7k views

SIMPLE or FULL recovery model for databases?

When should I use the full recovery model and when should I use the simple recovery model for databases? I always used the full recovery model because it is the default, but today i encountered this ...
2
votes
2answers
142 views

Using Change Data Capture with a frequently changing schema

We are following an agile development process, which in this case means that we frequently make changes to the database schema, e.g. adding new columns, moving data to other columns, etc. Is there a ...
1
vote
2answers
91 views

Rearranging the output of mysql query

When I run the following Query: SELECT ticket.id, th.ticket_id , th.id, th.name, th.create_time FROM ticket_history th JOIN ticket ON th.ticket_id = ticket.id WHERE ( th.name LIKE ...
2
votes
1answer
113 views

Is it ok to let users add new columns and tables to your database?

I'm basically making a database of databases. An administrative User can go in and hit "Create Database" (which is basically a table) and set up the column types and how many columns. Other users can ...
9
votes
2answers
4k views

How to select specific rows if a column exists or all rows if a column doesn't

I'm writing a script that gets a count of rows for a few tables, however for some tables I want to only get a count of rows where a flag is set (in this case active=1). Is there a way I can do this ...
1
vote
1answer
757 views

Create spfile from pfile

I'm having a problem in creating spfile from pfile.I think I don't have permission to write on Oracle Home. I'm using Windows 8 SQL> startup nomount pfile='initlittle2.ora.txt'; ORACLE instance ...

15 30 50 per page