[how to] Executing sys.dm_fts_parser without sysadmin server role |
- Executing sys.dm_fts_parser without sysadmin server role
- Cannot create perlplu function
- How do I design a database for a resource scheduling and allocation application?
- Retrieving Alternating Values
- Getting next and previous document
- Database design - do I need another table?
- mysqlworkbench after cmd mysql startup went wrong
- Insert from one row to another using cases
- Understanding MySQL Integer Types?
- mysql trigger on update with insert statement
- How to Shrink Oracle SYSTEM Tablespace?
- Oracle trigger to update columns daily
- Run Multiple Postgres Server
- How do I fix the definer problem The user specified as a definer ('fred'@'192.168.0.%') does not exist
- SQL Server update query on linked server causing remote scan
- Mysql - How to optimize retrival time in a table
- MySQL specific database configuration file
- SQL Server 2005 Replication
- Mysqldump tables excluding some fields
- How to do something like UPDATE DELAYED in MySQL
- SQL Server 2012 database backup successfully report but no backup file
- Sybase SQL Anywhere 12 - Get all indexes which are unique -> ambigious sysindexes error
- Replication master binlog rotation when network is unavailable
- Issues installing SQL Server 2008 on Windows Server 2008 R2
- Take individual MySQL database offline
- Choosing shard key and friendly URL Ids for my MongoDB
- Mongo connection failing with 'Transport endpoint is not connected'
- Modify DEFINER on Many Views
- SQL: SELECT All columns except some
Executing sys.dm_fts_parser without sysadmin server role Posted: 30 Mar 2013 08:41 PM PDT A web application needs to execute
http://msdn.microsoft.com/en-us/library/cc280463%28v=sql.105%29.aspx Since it would be most unwise to grant that server role to the web server's user, I attempted to create a stored procedure that runs as a separate user that is in that role. I then created a user
and attempt to allow the web server's DB user rights to impersonate that user:
When I attempt to execute
Why do I get this error? How can I accomplish my goal of executing |
Cannot create perlplu function Posted: 30 Mar 2013 05:01 PM PDT Running PostgreSQL 9.1.8 on Xubuntu 12.04, installed from the repos. From the shell, I have executed: As the superuser running The When I create the following function: I receive the following error: Yet the following works: The following Perl script works as expected from the shell: I tried to run the function as an anonymous block: This returned the same error as before, with this additional information: From the documentation, error 42601 is a syntax error. I see no syntax error. Furthermore, the function loaded fine with the superuser account when I imported the database: I tried to simplify the code to no avail: Same error as before. What I don't understand is why, according to the error message, PostgreSQL is trying to load the code into Any ideas? Update #1Note that the postgres user is a Superuser: |
How do I design a database for a resource scheduling and allocation application? Posted: 30 Mar 2013 02:39 PM PDT I have two entities: Now if I create two tables ( Any help is much appreciated! |
Posted: 30 Mar 2013 07:39 PM PDT I have a column with two values in my database, I want to retrieve the two values alternately, for example I have: I want to display them as: |
Getting next and previous document Posted: 30 Mar 2013 09:53 AM PDT In a mongo collection I have a list of words (millions words). I need to get lexical adjacent of a word. I am looking for most efficient method. |
Database design - do I need another table? Posted: 30 Mar 2013 06:18 PM PDT I am trying to make a database that follows a form that the company uses. When a client walks in the membes of staff have to fill in a form and the data is recorded. The form on paper is 10 pages long. The first time a client is seen the entire form is filled in and the client gets a clientID. I have split the form into sections that make sense like accommodation and employment. I know I can link these tables together with the clientsID. Thats the simple part. Now when a client returns the form comes out again but this time only certain parts are filled in, what ever the clients needs are. The records for most parts don't need updating but a new record needs inserting. what would be the best way around this. So at the moment I have for example a table called client with an id and name another table called accommodation with clientid and address and another table employment with clientid and employer. But how do I go about it when a client comes in to let us know he has a new employer. I cant update the current one as that is needed but I would need to add new record for the client. Would this mean I would have to add a look up table for all my current tables? |
mysqlworkbench after cmd mysql startup went wrong Posted: 30 Mar 2013 05:18 PM PDT i have problems with my mysql server. I have installed the newest mysqlserver but having problems after starting my server from command line on localhost. Before that i was running xammp. The problem is that when starting from command line and not from xammp, mysqlworkbench shows me tables from another datadir when connecting with database . I really don't know how to fix my problem. |
Insert from one row to another using cases Posted: 30 Mar 2013 01:38 PM PDT My original table was(being used since 2005): Since, it was neither good management of table nor appreciable by me, I created a newer table: What I want to do now is: SELECT data from first table and insert as follows:
My query: My question is
the format is the same: For now, I am thinking of using PHP for the task but I wanted a clean MySQL solution if possible. |
Understanding MySQL Integer Types? Posted: 30 Mar 2013 03:39 PM PDT Please could someone explain to me how the MySQL integer types and lengths work as it is somewhat confusing. Which different integer types and lengths should I use for each of the following ranges to keep them as efficient as possible? What is the difference between TINYINT(5), SMALLINT(5) and INT(5), are they the same? |
mysql trigger on update with insert statement Posted: 30 Mar 2013 10:16 AM PDT I am trying to create a simple trigger which is handled on update operations. The trigger is checking before update if a record of an update exists, then if not it is created. Why is it not adding a record if update is trying to update some non existing record? |
How to Shrink Oracle SYSTEM Tablespace? Posted: 30 Mar 2013 02:32 PM PDT SYSTEM Tablespace grow out of control because of SYS.AUD$ table. SYS.AUD$ truncated but datafile still very big= 30G Resize doesn't work because file contains used data beyond requested RESIZE value What should I do here? |
Oracle trigger to update columns daily Posted: 30 Mar 2013 11:14 AM PDT I'm trying to create a trigger that would run twice daily and do updates based on a specific condition. To be run on Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi We have Table A and Table B with columns
For a specified set of Primary Keys in Table A, until Table A.Status==Completed, I want the Date fields to be copied over from Table B to Table A twice daily. The same primary keys will be already setup in Table B. The number of records to update will decrease over time as more records in the primary keys list reach completed status. The purpose is to maintain certain static values on the Date fields till status==completed. We are unable to control an external system that keeps over-writing them. As a stopgap we want to rewrite them at frequent intervals to have the notion of maintaining static values. Once all PKs in our list reach completed status, we want to turn off the trigger. |
Posted: 30 Mar 2013 02:58 PM PDT Hello I am new to postgres, i wanted to run postgres anyone help me how to do it simply. |
Posted: 30 Mar 2013 05:04 PM PDT I dumped an existing database from my web site into a new MySQL setup on my laptop. Everything works except pages that use a view, when the error message above appears. There is only one view on the system. I assumed that this was caused because the user was not in the system, but looking in the users database of MySQL the user is listed correct with the password. The dump was from an earlier version of MySQL (5.0) into the latest one that comes with Xamp 5.527. At first I thought it could be that the latest version was incompatible with the existing one. Looking on this forum, there are some existing answers covering this problem that refer to making changes to the database and then dumping it again. However, my on line database works fine, so I dare not make changes to it in case I kill it. That is assuming that I understood what changes I should make and how to do it. I have PHPmyadmin. Can I modify it on the existing dumped database,or do I have to change it on the on line one and then export it? And exactly what do I need to do to modify it. The original database was a Microsoft Access one, converted to MySQL, and it has worked without error since 2003. |
SQL Server update query on linked server causing remote scan Posted: 30 Mar 2013 08:01 PM PDT I have a SQL Server 2012 setup as a linked server on a SQL Server 2008 server. The following queries executes in less than 1 second:
However, if I run this query to do a remote update, it takes 24 seconds, and 2 rows is affected: I tested using The table joins are identical in both queries, why is it using Remote Scan for the second query, and how do I fix this? |
Mysql - How to optimize retrival time in a table Posted: 30 Mar 2013 06:04 PM PDT I have query like this! which has 200 million Records in a single table.. I am using BTree Indexes in my table...
I am not satisfy with this timing ..! how can I reduce the result time less than 30sec. Kindly give me any suggessions! It will be more helpful to me! thanking you! |
MySQL specific database configuration file Posted: 30 Mar 2013 01:58 PM PDT In MySQL's configuration file I've globally disabled autocommit as so. I need to turn MySQL's autocommit on for a specific Ruby on Rails database though. It could be for the user or the database itself (doesn't matter). Thinking it would look something like this. |
Posted: 30 Mar 2013 04:58 PM PDT I am in the process of creating Replication between 2 Remote Servers, server 1 is the Distributor and Publisher and server 2 is the Subscription. server 1 windows 2003 server 192.168.10.1 connected by vpn SQL Server 2005 domain1.local server 2 windows 2003 server 192.168.10.6 connected by vpn SQL Server 2005 domain2.local When I setup up Replication everything looked fine until I looked at the sync status and it said: From user sa refused because the job is already running from a request by user sa changed database context to technical error 22022. I have cleared jobs in the server agent as well as restarted the service. Could this be something to do with authentication between two non trusted domains as I can browse and even control each sql server via SQL studio but just not setup replication? Yes I can manage each SQL Server in SSMS and we are using merge with snapshot. |
Mysqldump tables excluding some fields Posted: 30 Mar 2013 12:58 PM PDT Is there a way to mysqldump a table without some fields? Let me explain: How can I do this? |
How to do something like UPDATE DELAYED in MySQL Posted: 30 Mar 2013 02:58 PM PDT I have an averages table that should keep track of an average value over time. I don't want to have a row for each value, just a single row that continuously updates the average. What I've come up with is this: Many clients may be doing this at the same time, and I don't want there to be any locking issues. I don't care what order the updates are run in, since in the end it will all end up the same. I just want to have a query that sends the UPDATE to the database, and it will process it eventually, similar to an |
SQL Server 2012 database backup successfully report but no backup file Posted: 30 Mar 2013 07:58 PM PDT I have created maintenance plan in SQL Server 2012. And every day, the maintenance plan should backup the database. There is no database backup file when I look in the folder where the backups must be stored. But SQL Server logs history about this maintenance plan are successful. What is the problem? I am using SQL Server 2012. The operating system is Windows Server 2008 R2. Thank you for paying attention. |
Sybase SQL Anywhere 12 - Get all indexes which are unique -> ambigious sysindexes error Posted: 30 Mar 2013 06:58 AM PDT we are using a Sybase SQL Anywhere 12 db. In the db there are indices, which are unique, but shouldn't be unique. Therefore I search for a quick way to list all tables with unique primary keys. I tried The result was an error message: Anweisung konnte nicht ausgeführt werden. Tabellenname 'sysindexes' ist mehrdeutig SQLCODE=-852, ODBC 3-Status="42S13" Zeile 1, Spalte 1 Roughly translated: sysindex is ambiguous. I found on internet the query: Which looked what i wanted. But there was still the same result of ambigious sysindexes. What dows ambigious indexes mean in this context? Will/Can this cause any error in future? As workaround I used sybase central (which by the way opens always on first monitor, not on the one where it was closed - ugly behaviour), and found that a item indices showed what i searched for. But I still want to know how a programmatically solution looks like. |
Replication master binlog rotation when network is unavailable Posted: 30 Mar 2013 03:58 PM PDT I recently experienced an issue where the binlog file in master rotated because network connectivity between the slave and master was unavailable. After solving the network issue, the slave was not able to follow the master as it was doing through previous binlog and position. That was solved by purging the binlog to last binlog in master and pointing the slave to that last binlog and previous binlog's position which was following. I am wondering if this issue is normal? |
Issues installing SQL Server 2008 on Windows Server 2008 R2 Posted: 30 Mar 2013 09:58 AM PDT I am trying to install SQL Server 2008 on Windows Server 2008 R2 Cluster. While installing the first node, I keep on getting the following error:
Has anyone seen this issue before? I have uninstalled it multiple times and tried re-installing it but same results. |
Take individual MySQL database offline Posted: 30 Mar 2013 06:58 PM PDT MySQL does not have any SQL commands or internal mechanisms for
Thtis being the case, how can you take an individual database offline? |
Choosing shard key and friendly URL Ids for my MongoDB Posted: 30 Mar 2013 08:58 PM PDT I have decided to use MongoDB as my Database for a web application. However, I have some difficulties to get started and I hope that you can help me out with a few questions. I am developing my application in ASP.NET and with MongoDB as the back-end. I intend to start with a single server + 1 replication but wanted to built it right so I won't have problem sharding the database in the future if I have to. One of my biggest problems is choosing the right shard key and friendly URLs for my website. I have a I will also will use paging in my application, so I need to query the data (also in a sharded environment) and get for example: the last 10 records, page 2 with 10 records - all ordered by the last time the were inserted/updated
Help will be very appreciated, as I am stuck and can continue until I solve this. |
Mongo connection failing with 'Transport endpoint is not connected' Posted: 30 Mar 2013 08:58 AM PDT I have a 2 server installation. A web server with Apache and a DB server with MongoDB. I am load testing it, and on ~300 RPS I am getting this error:
The only thing I am noticing is that right before the fail, I am getting a lots of connections on Mongo: Almost 500 connections here... but never more than that! Mongo is 2.0.3. PHP is 5.3.x (latest of Debian install...) Help! |
Posted: 30 Mar 2013 05:06 PM PDT I have am having problems backing up my databases after an update. I have been poking around on my system trying to figure out why. One query I ran returned this result. After some investigation it appears that the definer for these views is an old developer account that has been purged from the system. The databases and views with this problem are used very infrequently, and most being kept around for archival purposes. There is about 40 views with a definer that no longer exists. Is there an easy way to change the definer to a different account on everything at once? Is there a way to get mysqldump to simply dump all the views out to a file so I could edit that file and recreate the views? |
SQL: SELECT All columns except some Posted: 30 Mar 2013 05:09 PM PDT Is there a way to Something like:
|
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