0
votes
0answers
5 views

Putting some calculations on a database entry from phpmyadmin

I am creating an online store website for sale/purchase. I have to put a specific percentage of an amount (User enters) in database. for example If user enters 100. I have to deduct 30% of it and I ...
1
vote
0answers
9 views

Minimal grants for readonly single-table access on PostgreSQL

Following is a list of commands that seems to work to create new user (login) and grant readonly access for one specified table on PostgreSQL. Let's assume that these commands are executed on login ...
-1
votes
0answers
8 views

Update Open Query for Oracle linked server

I return an open query for updating table data in oracle.whether i can use condition (CARD_NUMBER=tb3.cardno) inside openquery..?below is my query update openquery(link,'select ...
1
vote
0answers
10 views

Cannot Enable DTC For SQL Server to connect to oracle by linked Server

i've SQL server database 2005 and oracle database each one located in separated server . both databases have 1 table with the same structure i need to make sure that when a record added to the sql ...
0
votes
1answer
12 views

How to view the original script that built a materialized view and that was created by another user?

In the Oracle database server use, another user (called MIMIC2DEVEL) created a materialized view and made it public. How to view the original script that was used to built it? Here are the grants on ...
1
vote
1answer
32 views

Cannot connect to SQL Server from Management Studio (both 2012)

I installed SQL Server 2012 Express. It seems to be running fine. My SQL Server Configuration Manager looks like this: From what I understand it means that my instance is called MSSQLSERVER. ...
2
votes
2answers
27 views

Mysql slow query log always include “# Time:”

I am trying to parse the mysql slow log with logstash so it's important that the format is consistent. I have noticed that if statements execute at the same time, the line # Time: yymmdd is only ...
0
votes
0answers
10 views

PostgreSQL - Calculating opening and closing balances

I am having the following scenario some time right after midnight I'd like to calculate was the closing balances were for the day before and the opening balances for the current day. Those two values ...
0
votes
1answer
28 views

SQL 2008 R2 error on database engine

Database 'msdb' cannot be opened. It has been marked SUSPECT by recovery. See the SQL Server errorlog for more information. (Microsoft SQL Server, Error: 926)
0
votes
1answer
21 views

postgresql rename a foreignkey after renaming a table

I renamed a table, and apparently a foreignkey in it doesn't get changed, and causing problems, Although when I \d error I get: "error_test_id_fkey" FOREIGN KEY (test_id) REFERENCES test(id) ON ...
0
votes
1answer
15 views

The SQL Server Network Interface library could not deregister the Service Principal Name

After windows patching (windows 2008 R2 , SQL Server 2012 Sp2). I could not start SQL Server Service . I get error 1067 and this from the error log* The SQL Server Network Interface library could not ...
1
vote
0answers
11 views

creating deadlock for distributed database in mysql-(Testing purpose)

I need to create a deadlock for distributed database in MySQL for testing purpose with a simple sql query(without front end), can anyone good with MySQL query help me out in this with sample query. ...
1
vote
1answer
14 views

How can I detect the availability of sp_addextendedproperty on sql server

How can I find out if sp_addextendedproperty is available before trying to use it in a sql script? I gather it's not available on Azure. (I'm working on this bug, if you're interested).
2
votes
0answers
25 views

Output in SQL Profiler has results with Database ID as NULL

I ran profiler to filter out certain applications connecting an environment but the results has application for Database_id "NULL".. Am I missing anything ? Also another question , does all the ...
1
vote
0answers
14 views

Is Service Pack 2 completely installed on Passive Node of SQL Server 2012 Instance?

We are applying SQL Server 2012 Service Pack 2 (SP2) to a two-node active/passive cluster, starting with the passive node (as per best practices): How to install a Service Pack at a SQL Server 2012 ...
-1
votes
2answers
53 views

When there is a composite index and those columns are in query, does it use index seek?

I have a table staff having columns, name, year,month and date. I have a composite index on year,month and date. If I have a query like below, will it use index seek scan? select * from staff where ...
1
vote
1answer
24 views

Auditing database administrator actions with SQL Server 2014 Standard

We have a requirement to audit database administrator access to customer databases - at a minimum, knowing which customer database they were accessing (and ideally why). Without upgrading to SQL ...
0
votes
0answers
8 views

How to open a file in ms/access 2013 [on hold]

I have an access 2013 form and want to be able to select a file form a local drive and upload it to an external drive. I need to show a user the usual open window, then he selects a file and I can the ...
0
votes
0answers
11 views

Login Roles not showing at previleges tab

Im migrating to a new server , created my login roles using plain sql querys on PgAdmin . Now when trying to grant privileges on database to the created login roles they don't show up as selectable ...
0
votes
0answers
10 views

how can you determine the exact time for a daily Scheduled Jobs on Oracle

i have a daily scheduled job, how can you determine the exact time it will run on the scheduled day?
1
vote
0answers
17 views

Most efficient way to bulk insert or upsert data into multiple related tables

Given a PostgreSQL 9.4 schema with 3 related tables: CREATE TABLE a ( id BIGSERIAL PRIMARY KEY, a_name VARCHAR(80), a_field INTEGER ); CREATE TABLE b ( id BIGSERIAL PRIMARY KEY, b_name ...
0
votes
1answer
21 views

Use Create Trigger to create New table using calculated values from common groupid column values

I have a TABLE_A in Database1 the contains rows with a common group id. I am wanting to use the CREATE TRIGGER function to generate a new TABLE_B in the same Database1 that contains calculated values ...
1
vote
0answers
28 views

Performance impact in orders of magnitude with Dynamic SQL

This started as a problem debugging a SSRS performance problem where I found reports were timing out when they previously weren't. Finally I traced down the SQL the report server was submitting, and ...
0
votes
0answers
6 views

Log large queries with PGbouncer

Is there a way to ask pgbouncer to log any query that generates a result set larger than, say, 5MB?
0
votes
0answers
7 views

Is there an easy way to update a mysqldump file from version 9.11 to 10.11?

We have a client that has had their servers for soo long, they were still running MySQL 4.0.24. Now that they are refreshing their servers, we took a mysqldump of their current database to put into ...
0
votes
0answers
7 views

Multiple images but one user

Hello i am trying to build a small website. I have a database(MS Access) with two tables images and user Images has userID and filename. User has email password etc.. A user can upload multiple ...
0
votes
0answers
9 views

Database Importing Collation

Migrating from DB2 found this error message: Error message: Incorrect string value: '\xF2\xAC\x9F\xB0or...' for column 'column_name' This is when trying to import an XML to MySQL. I should have a ...
0
votes
0answers
6 views

SQL 2005 Cluster Service pack 4 upgrade failure at remote user account

I built SQL Server 2005 ENT Cluster on Windows Server 2008 R2. I need to upgrade it to SQL Server 2005 SP4. However, I get this error at the Remote User Account screen" "Enter the remote user account ...
0
votes
0answers
8 views

Mongo Shard with Negative Average Size?

I'm seeing the following behavior from a shard in mongo: mongos> db.fs.chunks.getShardDistribution() Shard SH0 data : 740.29GiB docs : 5003098 chunks : 32949 estimated data per chunk : 23MiB ...
3
votes
0answers
16 views

Launching SQL Agent Job from stored procedure not on [msdb] database, or, How Necessary is SET TRUSTWORTHY ON?

(With apologies in advance since I've been asked to pick up a project written by someone with more skills than me but who I can no longer ping for questions. If it sounds like I may be using ...
0
votes
0answers
7 views

SQL Query to compare (HL7) value at certain position in string based on delimiters (not position)

This is complicated by the fact that I don't know what DBMS the backend uses. I know it's Cache, but I don't seem to be able to do anything but the most basic commands. I cannot seem to SET or ...
-2
votes
0answers
11 views

Pointing SOA10g to OUD [on hold]

We were using OID, but have changed to a LDAP OUD server. When we follow the documentation we don't find our fix. Does anyone know the process to make this change?
1
vote
0answers
16 views

SQL Agent AD account gets permission denied for ODBC connections in SSIS packages

We have an AD account specifically created for the agent service and when running SSIS packages that connect to databases we get permission denied even though we have granted that account access to ...
2
votes
1answer
27 views

Regular expression in a SQL case statement

I have records formatted as such: CBS405/505 Fourth Week(Wtr Qtr) BR 404-504-604 Fifth Week(Fall Qtr) AP490-QB-09 Weekly Sessions(Spr Qtr) APR501 Fourth Week(Wtr Qtr) MP 300 Fourth Week(Wtr Qtr) ...
0
votes
0answers
4 views

xampp php my admin showing loading icon constantly

I am wondering why next to first_db , a loading icon is not disappearing ?
0
votes
1answer
12 views

Using If /then statements in SQL server computed column specification

I have two fields in a SQL Server database called "Species" and "Species _other" that stem from a front end data collection software dropdown values. I am trying to use a computed column using an ...
-1
votes
2answers
27 views

How to use aggregate function and group by with inner join? (Postgres 9.3)

I would like to select "extra" payments made in association with normal appointments for a one week period and SUM them up by contractor when calculating payroll. Here's what I attempted: SELECT ...
4
votes
1answer
27 views

MySQL overhead of calling a Stored Procedure

Within Java, we access MySQL (v5.5.40) via JDBC -- a prepare statement, setting parameters then calling the stored procedure. It appears that every execute() has the overhead of 4 meta-calls (per ...
0
votes
0answers
6 views

MySQL log shows excessive meta queries on SP calls [duplicate]

We access MySQL via JDBC -- a prepare statement, parameters binding then invoking the actual stored procedure. It appears that every execute() has an associated "overhead" of 4 meta-calls (per MySQL ...
1
vote
0answers
20 views

Unable to install SQL named instance as it says RS feature exist, even after dropping it

We are trying to Un-install a named instance from one of our servers. But, don't know why it did not un-installed the reporting services even after proper selection was made during uni-install. ...
0
votes
2answers
40 views

Unable to open SQL Server database file (.mdf)

I have a SQL Server 2005 .mdf file that I am trying to open in SQL Server Management Studio so I can add a field to a table, but I am unable to open the file. I can't say that I really understand how ...
1
vote
1answer
37 views

Is there a performance hit for querying two different databases?

I have two tables, A and B, which are located in different databases on the same MySQL server. I would like to create a derived table C from tables A and B, as an inner join between the two tables. ...
0
votes
0answers
20 views

concept of foeign key from composite primary key in sql server 2012 [on hold]

Suppose i have 2 tables. Table 1 say tbl1 has composite primary key. Table 2 say tbl2 has foreign key, that has one of the primary keys of table 1. Can anyone provide a query on how to ...
-3
votes
0answers
21 views

Cannot connect to database server 2008-r2 [on hold]

I installed SQL Server 2008 r2 but when I try to connect to Db instance with any application, (Sql management, Sharepoint ecc) I got the message that cannot find any Sql database Server. Every SQL ...
0
votes
2answers
14 views

Structure database(s) dealing with different time points

I have few data sets that give a score for a specific account at a specific point in time. So, account A might have a different score each quarter going back 5 years so. There aren't a ton of data ...
0
votes
0answers
51 views

Table-valued Function XML Reader [on hold]

What makes the Table-valued Function XML Reader so slow? We are using SQL Server 2012 Standard to shred XML columns into tables and find it to be unacceptably slow for our business environment. The ...
3
votes
0answers
50 views

How to track DML events ocurred in the current day

I have the following query to track what tables are modified in the current date: SELECT TABLE_OWNER, TABLE_NAME, INSERTS, UPDATES, DELETES, TIMESTAMP AS ...
1
vote
1answer
22 views

removing sql logins from one server, after migrating to another server, but all the databases were not migra

Here are the details of the production environment: I have 2 serevrs, A1 and A2. I have completely transfered 100 logins from server A1 to A2. Server A1 contains 5 DATABASES. But I moved only 2 ...
0
votes
0answers
6 views

Convert date in date list condition to list of date ranges

I want to look for all the records that occur on specific dates. SELECT * FROM table1 WHERE date(column) in ($date1, $date2, ...); But as many of you know this kind of comparisons doesn't get ...
0
votes
0answers
13 views

How to avoid frequently needing to re-grant permission in Hue?

My organization has a cluster/environment with the following: Component Version Hue 2.5.1-695 HDP 2.1.2 Hadoop 2.4.0 Pig 0.12.1 Hive-Hcatalog 0.13.0 ...

15 30 50 per page