3
votes
4answers
5k views

How To change the column order?

How To change the column order in sql server 2008 R2? Eg: My table order is Eid------Ename-----Esalary Know i want this format like Eid---Salary----Ename Thanks.
1
vote
1answer
2k views

How to connect client applications to SQL SERVER 2012 cluster?

Following are the environment Details : Database Server : SQL SERVER 2012 Operating System : Windows Server 2012 Single instance of SQL SERVER 2012 is installed in cluster configuration with 2 ...
1
vote
1answer
487 views

Where does Oracle Enterprise Manager derive the “User Logon Time” metrics from?

Oracle's enterprise manager has a metric named "User Logon Time" and will show an alert if that exceeds a certain threshold. I would like to retrieve the numbers stored for this metrics directly ...
2
votes
1answer
270 views

How SQL determine page exists in Buffer pool (internal)

When we execute SQL query, then Relational Engine optimize it and pass query plan to Storage Engine which then ask for a page with actual data. If data page isn't in memory, then SQL pull those pages ...
1
vote
1answer
116 views

Transaction Log usage by transaction

Is there a way to find out how much of the transaction log a specific transaction uses? I have a database with simple recovery model and a log file with max size 500 MB. During our tests we ran into ...
0
votes
2answers
73 views

When installing mysql in linux, why do we create a mysql group and user?

When installing mysql in linux, why do we create a mysql group and user ? The installation step tells to create a user and to change the ownership of mysql folder to mysql.
0
votes
1answer
76 views

Transfer Oracle 10g Database From Linux to Windows

Can anyone tell me how to restore Oracle 10g Database backup created in Linux to the Oracle 10g version for windows...
1
vote
1answer
1k views

Do I need to set tcpip_socket = true to allow remote connections to a postgresql database?

I am trying to enable remote connections to my postgresql 9.1 db running on ubuntu 12.04. This tutorial says to "set tcpip_socket to true" -- but it is for a centos server. I am on ubuntu. I ...
0
votes
1answer
4k views

Import data from a CSV file without creating a table first in MySQL

I want to import CSV data into mysql database. Additionally, I dont want to create a table first and then import. That means, if my csv file name is test.csv, and its contents are like ...
0
votes
1answer
466 views

Take query results and insert into new table [closed]

So I have the following query: DECLARE @tbl TABLE(value int) *--The same function but with the number of the random numbers ;WITH Nbrs (n) AS ( SELECT 1 UNION ALL SELECT 1 + n FROM ...
0
votes
0answers
64 views

How to analyze incoming DML in SQL Server 2005?

I have database and specifically one table that is used for batch data transfer from another organization. With each run the table is truncated and rows are re-inserted. I want to handle that process ...
1
vote
2answers
114 views

Three databases : one instance or three?

I am a new DBA working for a charity and I have project to consolidate the multiple databases scattered across the organization. I have identified the main databases that are mission critical to the ...
0
votes
2answers
144 views

SELECT first value from 3 tables that is not null

Having 3 tables with name(varcahr) value(varchar) pairs how do I select the value for a given name from one of the table with respect to the following conditions select value from tab_1 if it exists ...
5
votes
1answer
430 views

Why does InnoDB table by default uses the UNIQUE constraint instead of the PRIMARY KEY?

In my MySQL database I have a table with 4 columns, the PRIMRAY KEY, two columns with a FOREIGN KEY CONSTRAINT and one UNIQUE index on all fields except for the PRIMARY KEY. The SHOW CREATE TABLE: ...
1
vote
1answer
208 views

Resolving Cyclical Reference in Referential Relationships

I'm designing a small SQL Server Compact Edition database and am attempting to enforce referential integrity. The database is a simple backend for a small desktop application that functions as an ...
-2
votes
0answers
230 views

How to make make my query run fast? [closed]

How to make this query run faster? Table contains over 2 million rows of data and takes around 30 to 120 seconds to process the query. SELECT INET_NTOA(blocks.startIpNum), ...
1
vote
2answers
974 views

Maintenance Plan Job running at additional unscheduled times?

I have a situation that has left me really scratching my head. This is a SQL Server 2008r2 instance, used as the database server for a substantial corporate SharePoint service. As my company is ...
2
votes
2answers
2k views

Optimized query to fetch a record from 10 million entries

A table has 2 fields | UniqueKey | TimeStamp | ------------------------- | xfsddddq | 1024125412 | | xfstttdx | 1024125413 |< | xfsdxxau | 1024125415 | Estimated, there are 10 million ...
0
votes
0answers
1k views

How can I create a view in a stored procedure on MySQL?

I am trying to dynamically create views based on an SQL query and have a trigger recreate them when the fields in the view are to change. When I call the procedure I end up with a permission denied ...
2
votes
2answers
3k views

SQL service does *not* start, port 1433 in use

Sorry to raise if this has been asked before. The SQL Server service is defined as manual, whenever I start it I get (event viewer): > Server TCP provider failed to listen on [ 'any' 1433]. Tcp ...
0
votes
2answers
161 views

Is there any disadvantage to using Oracle's Easy Connect syntax?

Oracle allows a few different syntaxes for specifying where to find your database service. The one I've seen most commonly (in the few short years I've been developing software professionally) looks ...
1
vote
0answers
228 views

ODBC Connection Not Refreshing

I am trying to connect FedEx Shipping Manager Integration Assistant to a SQL 2008 R2 database. I have a view created that has all the necessary fields to populate in the Integration Assistant. The ...
4
votes
1answer
641 views

Do SQL Server Views update their data types automatically based on what tables feed them?

Someone mistakenly created a bunch of nchar fields in database tables. I noticed this, and after examining the issue, we're moving these fields to nvarchar types and trimming the values inside. In my ...
1
vote
1answer
423 views

When tables are locked does MySQL queue queries?

I have a small production website, but it's live 24/7. When running the Optimize, Analyze or Repair commands, MySQL locks the table it is working on. QUESTIONS How would this effect users trying ...
3
votes
1answer
527 views

Inserting a 30 million row table from a linked server

I have a large table that needs to be updated on a nightly basis from a linked server. Initially I had simply truncated the table and inserted all of the records but this was taking too long. I'm ...
3
votes
1answer
313 views

Three Node Cluster that Allows For Two Failures

We are creating a three-node three-instance cluster with SQL 2008 R2 (not cutting edge, but that is what the application supports) and think it should be able to maintain quorum with two physical ...
3
votes
2answers
3k views

How to Log Debug Information About a Stored Procedure

We have a group of fairly complex stored procedures that process a transaction queue on a pretty much round the clock schedule. Currently these scripts use a number of print statements to document ...
0
votes
1answer
662 views

row_number over partition at Version < Firebird 3

I´m currently at the end. Given facts: ID ID2 FROM TO COSTS 4985 501671 2013-07-25 00:00:00 2013-12-30 00:00:00 17.8 4985 501671 2013-09-05 00:00:00 ...
2
votes
1answer
782 views

Database Backup from 2008 R2, Restore on 2012 Failover Cluster Instance

I have a production database server having sql server 2008r2. This is an old server and considering our load, we are moving to a better hardware configuration, Now the new environment is a cluster ...
1
vote
1answer
1k views

How to get list of tables, views etc. a users has rights to on Sybase IQ?

I'm looking for a way to get a list of views, tables, procesdures etc, a user has been granted to. A select onto SYSROLEGRANTS helped me to find basic role of users -- but not more like this. So ...
1
vote
1answer
393 views

GETDATE() uniqueness when used on INSERT

Recently I was reading this blog post: http://blogs.msdn.com/b/sqlazure/archive/2010/05/05/10007304.aspx which contains this section: Picking a Clustered Index There are a couple of ...
1
vote
2answers
281 views

How to delete list of email addresses from MySQL database?

I have a list of invalid email addresses parsed in the following format; There are roughly 1500 invalid addresses, and I need to remove them from my myBB users. What SQL query can I run to remove ...
1
vote
0answers
1k views

Cannot read property Collation.This property is not available on SQL Server 7.0. (Microsoft.SqlServer.Smo) [closed]

I am new to databases and Microsoft SQL. I just installed SSMS today and am getting this error while trying to add new login in security or rightclick-> view properties on user logins already there ...
0
votes
1answer
234 views

Add 0 into array_agg if there is no matching data

I wrote this view, and it is selecting almost everything I want, but I do not get results for all: project_keywords(which has_many project_report(keyword_id, project_id)) So a project_keyword has a ...
0
votes
1answer
208 views

remote connection to mysql

have two machine PC#1 with db mysql and appache and PC#2 with a c# form try to connect to this db here is my connection string used in PC#2: SERVER=My_public_ip;PORT=3306;DATABASE = my_test; UID = ...
2
votes
1answer
915 views

Designing a reservation system schema

I am not sure if this has been asked before, however I am tasked with designing a new reservation system for my organization We have an older system which simply stored the booking in a table, and it ...
1
vote
1answer
33 views

Suggested ways to route traffic between master / slave

I have multiple Postgres servers up, running in master / slave streaming replication mode. I was wondering what the suggested methods of routing write traffic to the master, and the read traffic to ...
0
votes
1answer
814 views

MySQL: Use Sysbench on Windows

Sysbench is a tool to analyze the MySQL performance. I downloaded it and extracted but there is no executable file. Files having extensions like .sh or .c or .h are available. I gone through the ...
1
vote
1answer
237 views

Can't find stored procedure for updating after creating it

I'm trying to create a procedure to update my table create proc UPDATE_PRODUCT @ID_CAT INT, @ID_PRODUCT VARCHAR(30), @LABEL NVARCHAR(30), @QTE INT, @PRICE VARCHAR(50), @IMG IMAGE AS UPDATE ...
1
vote
0answers
43 views

is there a DB client which supports oracle editions?

We are using a clever feature or oracle 11gr2 called edition-based redefinitions. This means each stored proc and view looks different depending on the edition you set in the session. There are ...
0
votes
1answer
141 views

How to convert database mysql4 to mysql5

I have mysql dump file named booster.dump. It was export from 4.0.27-standard mysql server. Now I want to convert this database to mysql 5.1.73-cll. How can I do it? I search about this topic in ...
0
votes
1answer
384 views

MySQL: Transaction and Deadlock

I have table "tbl_data", where have a lot of rows (3 - 5 million). I have JAVA (*.jar) module from which I INSERT/UPDATE data into this table. If I start *.jar file (for example, "run.jar") and after ...
0
votes
2answers
59 views

CASE_SENSITIVE on ORACLE DB

I have a ORACLE DB and when i try inserting "INDIA" and "india" as values into column which is carrying unique constraints on it , it is allowing the value to insert . It looks like case sensitive ...
1
vote
1answer
51 views

How to resynchronize replication for a single database

I have two MySQL 5.5 servers in a master/slave replication setup. The server hosts about 10,000 databases, but the replication is messed up for only a couple of databases. To fix the replication I ...
0
votes
1answer
2k views

After installing postgresql and postgres-xc with apt-get, I have psql but not postgres, initdb, pg_ctl

I used apt-get on Linux Mint to install postgresql and postgres-xc. I have access to psql, the postgres user exists, it's possible to create databases. However, the server seems to be running on ...
4
votes
4answers
13k views

Displaying the list of all tables in all database

How can I display a list containing all the tables of all the database in a SQL Server 2008 R2 server?
0
votes
1answer
61 views

Fetching User Recent Status

I am running mysql with MyISAM storage engine to store user status(user updates data). To load user recent updates data i am using this query: $limit = 20; $uid = 3; SELECT * FROM userstatus WHERE ...
1
vote
1answer
64 views

Is this diagram possible or correct?

just starting to learn to design. I don't know the term in english to describe this type of design, so I'm here for some help. Can this "specialitzations" have a relation like this one? Thanks!
0
votes
3answers
515 views

Changing MySQL auto_increment_offset

Sorry for the wall of text, but I don't know what's relevant and what's not. I have MySQL a MySQL database that it is being replicated from our production environment to our development/test ...
2
votes
1answer
56 views

Find the SQL query that caused an event in the past

I have a database in which I noticed that one of my tables is missing. I haven't used this database for over three months and now I want to find out who caused this, when this happened, how it ...

15 30 50 per page