[how to] Trouble with ACE.OleDB.12.0 connection across domains |
- Trouble with ACE.OleDB.12.0 connection across domains
- Optimizing ORDER BY for simple MySQL query
- Validate Primary Key and Index Selection
- Linked Server Risks
- How to insert binary data into a PostgreSQL BYTEA column using libpqxx?
- If an account has REQUIRE SUBJECT, does it still need a password?
- MySQL "hangs" after every restart.. corrupted tables every now and then.. (5.1.68-cll)
- sql server 2008 error in working
- How do I execute an Oracle SQL script without sqlplus hanging on me?
- viewing the population? (sql server full text search)
- Using postgres with the command line without pgAdmin
- Prevent users from using power pivot excel connections to a database
- MySQL: Join one Row in a table with two Rows in other table
- Query runs slow in test site on first execution. Why?
- Is high Extent Fragmentation a problem?
- Referencing multiple tables from a single table and store additional data
- db2 tables altered, reorg
- MySQL: CAST + SUBSTR vs. FLOOR + MOD
- MongoDB master - slave not syncing anymore
- How to disable oracle's MAX_ENABLED_ROLES limit
- How can I convert an Oracle dump file into SQL Server?
- Databases list not showing up?
- Lock escalation problem on a trigger
- "Variant" values structure and their use for multiple columns
- How can I verify I'm using SSL to connect to mysql?
- MySQL Replication using SSL
- Delete word, its meanings, its meaning's example sentences from DB
- Query to find and replace text in all tables and fields of a mysql db
- When should a primary key be declared non-clustered?
Trouble with ACE.OleDB.12.0 connection across domains Posted: 16 Apr 2013 09:13 PM PDT Here is the situation: I have two servers, for simplicities sake we'll call them database-server and website-server. The database-server is to hold an Access database that we're using during development of a web application. The website server has it's own domain and is isolated from the database-server for security reasons, save for a VPN connection to the shared folder that the database is held in. I have confirmed that I can create, edit and delete files within that folder from the website-server. (The website, it's it's relevant is ASP.Net front end with VB.Net back end.) When the database is put into the |DataDirectory| on the website server it works exactly as supposed to. However, if I modify my connection string to point at the database across the VPN, it doesn't work, saying there is either open exclusively or there is insufficient read/write permissions. It is definitely not opened exclusively. Here is the connection string: "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=\database-server\database\db.accdb;" Things I've tried:
All resources I've read (and since I've been trying to resolve this problem for days now, it's been a lot) indicate it should work. |
Optimizing ORDER BY for simple MySQL query Posted: 16 Apr 2013 07:04 PM PDT I'm trying to optimize this really simple query, and it gives me grief for a day now :( Seems pretty straightforward, I need to select with a JOIN from 2 tables, and get top X results sorted in a particular order. Here's the query: However, it runs really slow (half a second to 2 seconds). Here are table structures: Running EXPLAIN reveals the issue: Can you help me figure out how I can optimize this to run faster? I have index on the column I sort by. I have index on columns I join by. If I remove the JOIN - it's crazy fast. If I remove ORDER BY, it's crazy fast. Why am I getting this dreaded temporary + filesort? |
Validate Primary Key and Index Selection Posted: 16 Apr 2013 06:42 PM PDT I have a table that will store transaction data from store sales registers, I have read quite a bit on index and key choice and below is what I have concluded is the best option but I am new to this level of table design so advice would be greatly appreciated. The table will be queried mainly on looking for a specific transaction (TrxDate, StoreNo, RegNo and TrxNo) or summarising data by TrxDate/ StoreNo. Do my indecies look correct? Should the UX_POS_eCommTrx_TrxDate_StoreNo_RegNo_TrxNo_SeqNo index be a primary key? Is it worth adding another index just to cover looking for specific transactions (same a UX but without SeqNo)? This is going to be a key table as the database grows and I really want to avoid having to change things round once the table has grown significantly. Thanks in advance. |
Posted: 16 Apr 2013 02:57 PM PDT I'm implementing a new feature which requires data from databases on multiple servers. I just need to union data from all these servers and sort it. The two options that come to mind are:
We run our servers in active/active clusters in SQL Server 2008 r2. All the databases have the same permissions, if you have access to one database/server, you have permission to them all. This is a public facing application (which requires user login). What are the risks of using linked servers? Are there any security flaws I should be concerned with? Are there any issues running linked servers in active/active clusters? Would there be any significant performance issues compared to the alternative? There seems to be a general negative "buzz" about linked servers, but I cannot find anything concrete that would lead me to believe there are any real concerns there. |
How to insert binary data into a PostgreSQL BYTEA column using libpqxx? Posted: 16 Apr 2013 02:51 PM PDT I'm a newbie at SQL, and even greener when it comes to using the PostgreSQL C++ API libpqxx. What I'd like to do is insert some binary data into a BYTEA column, but I find the Doxygen output is lacking in details. The fact that http://pqxx.org/ has been down for the past few days isn't helping me... How would I go about inserting the contents of What I have is along these lines: If it makes a difference, I'd like to use the new |
If an account has REQUIRE SUBJECT, does it still need a password? Posted: 16 Apr 2013 02:53 PM PDT I'm in the process of setting up SSL-secured replication between two servers. Each server has its own public/private keypair, and the CA cert is just the concatenation of the two public certs, like this answer. Now I'm updating the replication account with REQUIRE SUBJECT "exact subject of the client" Is there any practical value to also having a password on the replication account (IDENTIFIED BY "secret")? |
MySQL "hangs" after every restart.. corrupted tables every now and then.. (5.1.68-cll) Posted: 16 Apr 2013 02:30 PM PDT I was seeking an advice in forums about a problem that we face last days. We have a vBulletin forum, we never had any problems in general, but the last couple of days MySQL server hangs and when we are going to restart it, the vbpost table is becoming corrupted (it says that some connections didn't closed properly). Is there any way to restart MySQL without having such issues or a way to close the whole connections properly in case we need a restart? We probably think that it's about the setting of my.cnf but we are not sure, we had someone who did a new config but since we bought the server we have problems.. We have a very good machine of 24gb ram Intel quad core HTT. Any ideas if this is causing the problem and / or any recommendations to avoid corrupted tables on each restart? Thanks! Our my.cnf settings are: |
sql server 2008 error in working Posted: 16 Apr 2013 08:27 PM PDT I have Windows 7 professional and SQL Server 2008 Standard In management studio when press connect it shows this error
I did these after got error
|
How do I execute an Oracle SQL script without sqlplus hanging on me? Posted: 16 Apr 2013 12:35 PM PDT For an automated task I would very much like to run some SQL scripts and make sure that
How can i do this with Oracle (and |
viewing the population? (sql server full text search) Posted: 16 Apr 2013 12:21 PM PDT I'm thinking that when we are working on full text search, we might want to view how sql server FT engine breaks the data and indexes it. For my case the column being indexed are simple nvarchar strings with spaces (no punctuation). I'd want to be able to take the "tokens" out. Any idea if this is possible? |
Using postgres with the command line without pgAdmin Posted: 16 Apr 2013 09:15 PM PDT I started working with postgresql and till now I only had issues with it ( pgAdmin3 issues the most ) now I work a lot with MySQL and sometimes on the command line by just doing
Is there also a way to download postgres database without the pgAdmin and run it trough the command line (terminal) (I am working on OSX mountain Lion) p.s. I am also not a real big fan of letting postgresql create a user. It annoys me when I start up my mac and see Postgres as user in the login screen. Is it possible to avoid that? |
Prevent users from using power pivot excel connections to a database Posted: 16 Apr 2013 11:45 AM PDT A couple of weeks ago my boss connected to our production database via excel and was able to query the database. Because of how we're doing security to the database (AD groups) he should have access to the database. I'd rather not have users just willy nilly creating pivot tables against our OLTP databases. Is there a way to prevent these sort of connections? The way our security works, when a user accesses the application, it checks the AD group, and if the user is in the group the application lets them in. We use the same AD group to allow access to the database, the application passes the user's information to SQL Server. |
MySQL: Join one Row in a table with two Rows in other table Posted: 16 Apr 2013 03:19 PM PDT In my MYSQL Database COMPANY. I have two tables, like below in my diagram (arrow shows relations):
All fields are [Query] Input to my query is I need a query If I give user_name value it return me information from user table ( Suppose my user table is: And user_login is Then for the input user_name = 'grijesh' output details should be from user table about For this I written a query like below (that is working fine): its output is like: [QUESTION]: Can we have better efficient query equivalent of my above. I tried to think a solution with Joins but its hard to me for this query because for a row in user_login I need to join with two rows in user table. I tried with join but I couldn't. I need a solution with Join instead nested query like I did. Any help or suggestion will be great help. |
Query runs slow in test site on first execution. Why? Posted: 16 Apr 2013 12:51 PM PDT I found this query by watching a test site with sql profiler for anything taking over 10 seconds. I plopped the code right out of sql profiler and into sql studio, where it was able to execute quickly. The slow "first run" behavior can be reset by using DBCC DROPCLEANBUFFERS. Here's the slow query: Here's the table definition, with indexes: Here are the timings and IO: The test site and production site are setup the same way - database files are on a single virtual harddrive, which is backed by a many-disk load balancing SAN. Execution plan: |
Is high Extent Fragmentation a problem? Posted: 16 Apr 2013 09:21 PM PDT I have read that Scan Density = 100% is very good, and Logical Scan Fragementation <1% is also great. 77% Extent Scan Fragmentation troubles me, but the internet says to ignore it. I'm analyzing a single-table slow performing query. It runs ~30 seconds on first execution, then 200 ms on second and subsequent executions. I can reset this behavior with Is the high Extent Scan Fragmentation an important clue? (If not, I'll likely add another question about my single-table query). |
Referencing multiple tables from a single table and store additional data Posted: 16 Apr 2013 01:30 PM PDT I have a database where I want to store lap time information from a racing game. I have tables for car, track, game, tuning and upgrade data and want to put all these together to create a single dataset, so that I can e.g. display all times for a track, or detailed information about a lap time on a specific track in a specific car. My schema is: To achieve that, I created a table What is the proper way to do this? I'm working with SQLite 3 on Android. |
Posted: 16 Apr 2013 02:25 PM PDT When I alter a table in DB, I need to reorg it: if I had done many modifications, how can I know which tables need a reorg? |
MySQL: CAST + SUBSTR vs. FLOOR + MOD Posted: 16 Apr 2013 01:33 PM PDT I have a field in a mysql database where dates are stored as SELECT x hour, ... FROM table WHERE ... GROUP BY x ...
I built a quick benchmark (did 1000 querys with each version) and both of them seem to be equally quick so I'm really interested in what database designers would advise me to do? |
MongoDB master - slave not syncing anymore Posted: 16 Apr 2013 12:47 PM PDT I have a setup with two MongoDB instances, one master and one slave. The sync worked perfectly fine for quite a while now, but suddenly stopped. The major problem is, that the guy who setup the servers is not here anymore. So I started to dig into the problem, without having much MongoDB know-how. Strangely the initial sync does work. If I stop the slave instance, empty the dbpath directory and start the MongoDB again, it does sync the data. So the instances can see each other and they know about the master-slave setup. If I let them run for a while and check the replication information the slave says: Startup options of the slave instance: We use MongoDB version 1.8.1. We do have a test setup, same version, same configuration. Things work just fine there. I'm out of ideas :-( What did I miss? |
How to disable oracle's MAX_ENABLED_ROLES limit Posted: 16 Apr 2013 01:06 PM PDT How to disable oracle's MAX_ENABLED_ROLES limit or expand the value of limitation. [oracle 10g (win32)] |
How can I convert an Oracle dump file into SQL Server? Posted: 16 Apr 2013 05:20 PM PDT I want to ask about converting Oracle dump files ( I've searched for related technologies, such as Oradump to SQL Server. Do you have another suggestion to solve this? Open source ones I mean. Thanks for both of your response. I see how difficult it will, but is there any possibility to use another way in converting oracle dump file? because all of solution's converter tools always provide a connection database server. I'm so thankful what if you can suggest another tool. thanks anyway |
Databases list not showing up? Posted: 16 Apr 2013 08:32 PM PDT This morning when I logged into SQL Server Management Studio (v 10.0.16) I clicked on the databases node and saw all by db's (they are hosted remotely) as I have done for the last 3 years. This evening, when I click on the databases node I see NOTHING - except the system databases. According to my hosting company, this is an issue with my local permissions. I have searched everywhere and found nothing to help me. I'm now desperate and and help would be massively appreciated. |
Lock escalation problem on a trigger Posted: 16 Apr 2013 01:33 PM PDT I've inherited a SQL Server 2005 database that is getting 2-3 deadlocks a day. I've tracked it down to a scheduled job that runs during the day and inserts into a table with a trigger. The trigger consists of 10 updates to another table for slightly different criteria. The deadlock occurs in the trigger. When a person makes an application and the job is running that's when the deadlock occurs. The application inserts into the same table as the scheduled job. Looking at the trace it seems to happen when process 1 obtains a key lock, process 2 obtains a page lock, then process 1 escalates the key lock to a page lock and process 2 tries to obtain a key lock. I've added missing indexes which seems to have helped but its still happening. I'm not a DBA so any advice on an approach to solving this would be appreciated. I've added a link to the deadlock xml - this is from a test I did to duplicate the problem. |
"Variant" values structure and their use for multiple columns Posted: 16 Apr 2013 07:40 PM PDT note to the edit: the question originally was only about the opportunity of using a single "variant" structure for multiple columns, but all initial comments asked clarifications about the actual structure itself, something I hoped to eventually discuss later, it is probably hard to separate the two matters so now I want to discuss both the best implementation of a "variant values" structure and the convenience to use them for more than one column. I reworked the old question because it would get too messy otherwise. Previous readers do not need to re-read the question, although that may clarify some things. ReasonsSometimes you have columns that legitimately can have values of any simple type at all the times but your DBMS does not support a variant type. Probably this can occur only for metadata or other exotic uses of databases, let's not discuss about the appropriateness of these things, assume there can be legitimate reasons for them. Just note that I'm meaning to use the system for a limited set of columns for complex functionalities, not as a convenience for OTLT or such things. You can find more information on my present specific case in the comments to this question and to this answer. ClarificationsI want a column to be able to have one single value for each row, and I don't want ways to restrict the types accepted by single rows - the value for every row can legitimately come from any of the types supported by the structure at all the times. There are cases when you want for example another column to determine the type of the valid values, but in this question I'm considering only the unrestricted case. Note: most of the times the information you store cannot truly accept any type, for example if you store metadata about another database where each row is about a column from that database that column has obviously a defined type, but if you don't need the type information for other uses it is not necessary to store a separate "Type" column, unless you assigned different security permissions it would be exactly equivalent to set a value in a "Type" column or to directly choose a value from one of the supported types. Structure example / proposalThis structure uses a table for the values' IDs ( Note: if you used a structure for multiple columns you would always only allow types all valid for all of the columns, the minor number of tables in the single structure per table I just mentioned would only be due to including only the expected types, but it wouldn't be a catastrophe to set by mistake one of the less-expected types in the single-structure case. The referential constraints to
Alternative "variant" structures and reasons for my exampleThe alternative "variant" solutions I can think of are:
UseI would delete old values when they're not referenced anymore, thus forbid their direct external use in queries, and when needing values already used allow at user will to either reference the existing record or insert a duplicate value (thus in general the values should never change, only be deleted - although maybe a functionality to give a precise meaning to a record, using appropriate additional flag columns, could be useful, though probably confusing). Questions
ThanksThank you if you read all this |
How can I verify I'm using SSL to connect to mysql? Posted: 16 Apr 2013 02:22 PM PDT I have configured my server to allow SSL, and have modified my client ~/.my.cnf so I use SSL: When I log in with my client and view the status, it lists a cipher on the SSL line: Without installing something like wireshark to verify that the connection is secure, can I assume that I'm connecting via SSL based on this information? |
Posted: 16 Apr 2013 02:27 PM PDT I am in the process of replicating my database so i can have a master slave configuration, one of the issues i have is with security i am basically generating my server/client keys and certificates using openssl i also generate my own CA key and certificate to self sign, i understand the issues with self signing certificates on a public website, but do you think this will be as a serious problem when used in replication? |
Delete word, its meanings, its meaning's example sentences from DB Posted: 16 Apr 2013 01:02 PM PDT I have three tables as below (simplified for demonstration): where, Edit1: I am using SQLite3 as the database. Edit2: I figured the following solution which requires 3 sql queries in order: I'm still looking for the answer to my question: is the whole process possible to be done in one query? |
Query to find and replace text in all tables and fields of a mysql db Posted: 16 Apr 2013 03:02 PM PDT I need to run a query to find and replace some text in all tables of a mysql database. I found this query, but it only looks for the text in the tbl_name table and just in the column field. I need it to look in all tables and all fields: (everywhere in the database) |
When should a primary key be declared non-clustered? Posted: 16 Apr 2013 03:44 PM PDT While creating a test database for another question I asked earlier, I remembered about a Primary Key being able to be declared When would you use a Thanks in advance |
You are subscribed to email updates from Recent Questions - Database Administrators Stack Exchange To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google Inc., 20 West Kinzie, Chicago IL USA 60610 |
No comments:
Post a Comment