0
votes
0answers
11 views

How to group rows and order each item from every group sequentially?

DB table is like this id ordernumber item 1 o_12 i_1 2 o_11 i_1 3 o_13 i_2 4 o_14 i_2 5 o_15 i_3 6 o_16 i_3 7 o_18 i_2 8 o_19 i_2 9 o_18 i_2 10 o_100 ...
0
votes
0answers
4 views

Powershell DSC And Runtime Errors During LCM Check

Does anyone know what process or executable I need to create a .net config for to force Powershell DSC to execute running the latest .Net runtime? I get the following error when executing certain ...
0
votes
0answers
5 views

Replacing the results of a row

I'm working with Microsoft Reporting Services 2008. In our database, we have a small group of confidential students that need to be taken into account for several queries. If they are a confidential ...
0
votes
0answers
4 views

MySQL Cluster online backup vs mysqldump. Automatization of cluster backups

There is some special kind of backups in MySQL Cluster: online backup It creates copies of data at Data Nodes. If I understand correctly this is backup of all data that can be stored at Data Nodes, ...
0
votes
0answers
2 views

Set method to change StartMode property using SqlServer.Management.Smo.Wmi.Service

I'm trying to change SQL server Configuration manager settings using Microsoft.SqlServer.Management.Smo.Wmi.Service. Microsoft provided with a list of methods & properties here. I used the ...
1
vote
0answers
8 views

I am not able to create/reindex a unique index in a table

I have a table that contains user locations (called public.user_location) and is the following: Column | Type | Modifiers id | ...
0
votes
0answers
8 views

Does MySQL have a visual tool for suggesting indexes like SQL Server's “Include Actual Execution Plan”?

SQL Server has a remarkably useful feature called "Include Actual Execution Plan" which not only gives you a visual diagram of your query, but also automatically suggests indexes that can improve ...
0
votes
0answers
2 views

Will I still benefit from provisioned IOPS in RDS on a smaller non-PIOPS-Optimized instance type?

Quote from the docs: If you are using Provisioned IOPS storage, we recommend that you use the db.m3.xlarge, db.m3.2xlarge, db.m1.large, db.m1.xlarge, db.m2.2xlarge, db.m2.4xlarge, ...
0
votes
0answers
12 views

MySQL - Database has huge overhead but tables don't

I have some problems with two MySQL databases. The databases have huge overheads but none of the tables do. When I recreated the tables the overhead just reappeared aswell. I hope you can help me. ...
0
votes
0answers
2 views

PGadmin3 pgagent centralized console for jobs?

I'm running multiple Postgresql servers versions 8.4, 9.2, 9.3 respectively. I recently discover pgagent and installed in 9.2 server, it runs perfect on it, but I wish I could use this server as the ...
0
votes
0answers
13 views

SSIS permissions for specific databases

I'm quite new to SSIS. Is it a straightforward to grant SSIS permissions in the AD environment so that that a user can only create/manage/run ETL tasks on specific databases/Analysis Services ...
1
vote
0answers
6 views

“Failure occured while attempting to connect to the Principle server” from CLR procedure

I have a Windows Service running under a domain account which calls a stored procedure which then calls a CLR stored procedure. Initially I had a problem where database ownership chaining wasn't ...
0
votes
1answer
19 views

SELECT count vs DELETE JOIN. Why/how are they different?

Can someone explain in what way these queries could be different and the results are not the same? > begin; Query OK, 0 rows affected (0.01 sec) >select count(*) from tableA a JOIN tableB ...
0
votes
1answer
11 views

how can I insert a long string into a blob using an insert statement?

ORA-06502: PL/SQL: numeric or value error: raw variable length too long ORA-06512: at "SYS.UTL_RAW", line 224 the datatype is BLOB here's my insert statement insert into system_value (type, ...
0
votes
0answers
6 views

Modeling Conversion Events in a Data Warehouse

How should I model conversion events? For instance, if a sales opportunity goes from "stage: prospecting" to "stage: validating", should that be treated as a changing dimension, or a conversion event ...
0
votes
0answers
5 views

query_cache_limit and query_cache_limit, fine tuning for Magento

I was tuning the config in my.cnf yesterday, and I ran across these two settings. Currently the cache query_cache_limit is set to 128mb, and query_cache_limit is 4mb. Basically I want it to cache as ...
1
vote
1answer
91 views

Why dropping all foreign keys from a script is not working?

I have sysadmin rights on a SQL Server 2008 R2 box. I found a script that can drop all foreign keys and re-add them for us when we need to after a testing import. So I execute the below code with no ...
1
vote
1answer
22 views

How to obtain SQL feature list from the command line

Is there a command at the CLI or in PowerShell that will list the components installed for SQL? I'm looking for something like the Feature List you can get from running the discovery report from ...
0
votes
1answer
20 views

What happens when you have two events scheduled to run after identical n seconds?

I am running a survey and i am getting lots of data and i need to process that data quickly from within mysql.I am using a mysql events to help me process the hundreds of rows that i have. I have ...
0
votes
1answer
5 views

Validate hierarchy of two tables

I have two tables in my mysql database: Questions question_id Answers answer_id parent_question_id child_question_id Basically, I'd like to pass in a question_id, and have all child ...
0
votes
0answers
16 views

Emulate regex matching in ANSI SQL

I'm working in an ANSI SQL environment (no regex) on a script that is supposed to take the first 8-10 consecutive digits out of a text field that could: have alphanumeric characters, and some other ...
2
votes
0answers
53 views

Why does a simple select query produce a deadlock?

I am trying to analyze randomly occurring deadlock problems on an SQL Server 2008 R2 database. The deadlocks occur in very rare cases when SSRS tries to access one of 5 different stored procedures. ...
0
votes
2answers
57 views

Can't see some stored procedures in sys.procedures

Documenting a database and find that I cannot see stored procedures in sys.procedures, even though I can see them in Object Explorer. select p.name, x.value, p.modify_date from sys.procedures p left ...
0
votes
2answers
25 views

Calculating average with AVG for a list of numbers

This is probably a newbie question (bear with me) but how can I calculate the average for a list of numbers using SQL and the AVG function? I mean, I can add together numbers in SQL like: SELECT ...
-1
votes
0answers
23 views

trigger that will not allow insert if age is less than 18

I am trying to create a trigger that will check if the age is less than 18 or does not exist and will not allow insert. This is my trigger but i keep getting errors! Can some one help ! CREATE OR ...
0
votes
1answer
15 views

Trouble backing up remote database from local server

I have 2 servers LOCAL and REMOTE. REMOTE has a database 'remotedb'. From REMOTE the following statement backs up the database just fine. BACKUP DATABASE [remotedb] TO DISK = ...
1
vote
2answers
13 views

Compare Indexes/Constraints between two SQL Server databases

I have two databases on one SQL Server that I would like to compare Index/Constraints. The two databases should be identical but I have a suspicion that one database is missing a index or constraints. ...
0
votes
1answer
16 views

Single Virtual Drive Vs Multiple Virtual Drives for SQL Server files

Hi guys I have question about how two different Hard disk setups can possibly affect performance of my database. I have two Options. Option 1: One Physical Harddisk and then Multiple Virtual hard ...
0
votes
0answers
9 views

Best practices for relating NoSQL data to RDMBS

I am looking to use both a NoSQL solution (Redis, Mongo, etc) with a mySQL/Laravel application. My reasons for this is that I need a schemaless key value storage to go with my relational data. I could ...
0
votes
0answers
9 views

Bidirectional transactional replication for failover system: Managing sql server jobs

I have set up Bidirectional transactional replication for failover system. I have taken care of Identity columns (have reseeded their values from a higher value) and all other things. But how can I ...
0
votes
1answer
16 views

Is reading a single record always an atomic operation?

Is reading a single record always an atomic operation? I mean, when e.g. a read (select) and write (update) query are simultaneously carried out on the same record, is it possible for the read ...
0
votes
2answers
9 views

Using MySQL/PHP PDO, is there a 'simulate' or dry run option?

Does MySQL (or, ideally, PHP PDO) have some way of simulating transactions without actually committing them? (Can I get MySQL or PDO to act as if data is inserted/deleted/updated, without actually ...
0
votes
0answers
30 views

Is it possible to learn (and make a career out of) SQL without official training? [on hold]

I'm really interested in learning SQL (SQL server or Oracle) as I already have a bit of experience with the databases at work (mostly select statements). I don't have a technical background since I ...
0
votes
1answer
27 views

Does SQL Server handle databases on SMB shares different than on Hard Drives?

Does it, for example, automatically recover from network hiccups, perhaps? If so, would masking the file share under a symbolic link change that behavior, or does SQL support symlinks to file shares, ...
0
votes
0answers
4 views

MongoDB - Replica sets - Syncing and DC issue

I have 3 instances of MongoDB running on my local machine. One is native and the other two are on a Virtualbox Windows 7 VM. LocalMongo = My local mongo. VM1a and VM1b = My two instances of mongo ...
0
votes
0answers
14 views

Get upcoming Birthdays including Jan 1st

I currently have a script that can get up-and-coming birthdays within "x" number of days: SELECT * FROM persons WHERE datediff(date_add(birthday, INTERVAL (YEAR(curdate()) - YEAR(birthday)) YEAR), ...
0
votes
0answers
18 views

Internal server error while doing data refresh in PowerPivot

This occurred while performing "data refresh" in the PowerPivot window. How can I troubleshoot this problem?
0
votes
0answers
14 views

MS Acces database corruption

I have been searching for an answer to this, but no luck. Has anyone ever seen the below error when loading an Access 2010 database? "[database name] has detected corruption in this file. To try to ...
0
votes
2answers
32 views

How to monitor flat file for changes then run a SQL import job

I have a file that is a flat text file that needs to be imported into my SQL Server every day. The problem is that I have to wait for someone else to download and place the file before I can import ...
0
votes
2answers
63 views

What is faster, one big query or many small queries?

I have been working for different companies, and I have noticed that some of them prefer to have views that will join a table with all its "relatives". But then on the application some times, we only ...
0
votes
0answers
7 views

Does Postgres have a function for converting text into ASCII escaped or HTML escaped text?

Is there a builtin Postgres function that converts multi-line text into ASCII escaped or HTML escaped form and vice versa? I need to store multi-line text as name=value pairs, basically line .ini ...
0
votes
0answers
6 views

Why some queires hang while others work in redshift

We have our redshift cluster due to some strange reasons it started to be slow. And in the same time if I just query something very simple it will give me results for some tables and will never return ...
0
votes
1answer
19 views

Oracle remote OS authentication, security risks with domain users

What security risks can be with domain users? create user "OPS$KA\USERNAME" identified externally. grant create session to "OPS$KA\MARIK"; Then MARIK that is in KA domain, can logon to the ...
1
vote
1answer
14 views

Run stored procedures from specific package/with specific tag at lower priority

I have this requirement to run "Maintainance Jobs" for a web application. These jobs will just call a stored procedure from a set of specific packages. Running these jobs can consume quite a bit of ...
0
votes
1answer
46 views

Removing secondary data files. DBCC SHRINKFILE: Page could not be moved because it is a work table page

I have too many secondary data files (.ndf) created for tempdb. To remove the excess files, I need to empty the file (content will be moved to other files): DBCC SHRINKFILE('tempdbfile8', EMPTYFILE); ...
-1
votes
1answer
37 views

Sum of two columns from pivot

I have the following query: DECLARE @columns NVARCHAR(MAX),@columns1 NVARCHAR(MAX), @sql NVARCHAR(MAX),@columns2 NVARCHAR(MAX),@columns3 NVARCHAR(MAX); SET @columns = '1,2,3,4'; SELECT @columns1 = ...
1
vote
0answers
14 views

Optimization suggestions for db2 materialized view

I have a view for db2 9.7 which has consolidated o/p from few tables. The view is built and it is working fine I want optimization suggestions on the view SQL CREATE VIEW XYZZ AS SELECT ...
1
vote
1answer
21 views

postgresql 9.3: two instances on same port and two different ip adresses don't work

i'm setting up multiple instances of postgres 9.3 on the same machine (centos 7). I have 2 virtual ip addresses, one instance is bound to first address and second is bound to second one. Same ...
0
votes
0answers
6 views

DBMS_CRYPTO - ORA-06521 PL/SQL: Error mapping function

PACKAGE: user/password -- SYSTEM/SYSTEM CREATE OR REPLACE PACKAGE enc_dec AS FUNCTION encrypt (p_plainText VARCHAR2) RETURN RAW DETERMINISTIC; FUNCTION decrypt (p_encryptedText RAW) RETURN ...
1
vote
1answer
30 views

Update tag range on MongoDB range shard

Let say I set a min and max key for shards using range tags. Later I find out that the tag range I defined will not balance. Then I have to change the tag range value. I have searched MongoDB's ...

15 30 50 per page