Search Results

Search found 5380 results on 216 pages for 'primary'.

Page 12/216 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • MS SQL: Primary file group is full

    - by aximili
    I have a very large table in my database and I am starting to get this error Could not allocate a new page for database 'mydatabase' because of insufficient disk space in filegroup 'PRIMARY'. Create the necessary space by dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup. How do you fix this error? I don't understand the suggestions there.

    Read the article

  • Set primary key with two integers

    - by user299196
    I have a table with primary key (ColumnA, ColumnB). I want to make a function or procedure that when passed two integers will insert a row into the table but make sure the largest integer always goes into ColumnA and the smaller one into ColumnB. So if we have SetKeysWithTheseNumbers(17, 19) would return |-----------------| |ColumnA | ColumnB| |-----------------| |19 | 17 | |-----------------| SetKeysWithTheseNumbers(19, 17) would return the same thing |-----------------| |ColumnA | ColumnB| |-----------------| |19 | 17 | |-----------------|

    Read the article

  • Foreign Keys and Primary Keys at the same time

    - by Bader
    hello , i am trying to create table (orderdetails) , the table has two FKs and PKs at the same keys here is my code create table OrderDetails2 ( PFOrder_ID Number(3) PFProduct_ID Number(3) CONSTRAINT PF PRIMARY KEY (PFOrder_ID,PFProduct_ID), CONSTRAINT FK_1 FOREIGN KEY (PFProudct_ID) REFERENCES Product(Product_ID), CONSTRAINT FK_2 FOREIGN KEY (PFOrder_ID) REFERENCES Orderr(Order_ID) ); i am using Oracle express , a problem pops when i run the code , here is it ORA-00907: missing right parenthesis what is the problem ?

    Read the article

  • Using a user-defined type as a primary key

    - by Chris Kaminski
    Suppose I have a system where I have metadata such as: table: ====== key name address ... Then suppose I have a user-defined type described as so: datasource datasource-key A) are there systems where it's possible to have keys based on user-defined types? B) if so, how do you decompose the keys into a form suitable for querying? C) is this a case where I'm just better off with a composite primary key?

    Read the article

  • How to renumber primary index.

    - by Kamil Mroczek
    I have got a simple MySQL table and primary index (id) is not numbered one by one (1, 31, 35, 100 etc.). I want them to be numbered like (1, 2, 3, 4). Please tell me how to do it. I would also like to point that I am aware of possible consequences of the operation, but I just want to tidy up the table.

    Read the article

  • Table in DB for generating primary keys?

    - by Sapphire
    Do you ever use a separate table for "generating" artificial primary keys for DB (and why)? What I mean is to have a table with two columns, table name and current ID - with which you could get new "ID" for some table by simply locking the row with that table name, getting the current value of the key, increment it by one, and unlock the row. Why would you prefer this over standard integer identity column? P.S. The "idea" is from Fowlers Patterns of Enterprise Application Architecture, btw...

    Read the article

  • django convert list of objects to list of primary keys

    - by John
    Hi, As the title says I have a list of Django objects and I want to get a list of primary keys. What is the best way of doing this? I know I could do my_list = [] for item in object_list: my_list.append(item.pk) but was wondering if there is Django or Python specific way of doing this better. Thanks

    Read the article

  • Entity Framework and associations between string keys

    - by fredrik
    Hi, I am new to Entity Framework, and ORM's for that mather. In the project that I'm involed in we have a legacy database, with all its keys as strings, case-insensitive. We are converting to MSSQL and want to use EF as ORM, but have run in to a problem. Here is an example that illustrates our problem: TableA has a primary string key, TableB has a reference to this primary key. In LINQ we write something like: var result = from t in context.TableB select t.TableA; foreach( var r in result ) Console.WriteLine( r.someFieldInTableA ); if TableA contains a primary key that reads "A", and TableB contains two rows that references TableA but with different cases in the referenceing field, "a" and "A". In our project we want both of the rows to endup in the result, but only the one with the matching case will end up there. Using the SQL Profiler, I have noticed that both of the rows are selected. Is there a way to tell Entity Framework that the keys are case insensitive? Edit:We have now tested this with NHibernate and come to the conclution that NHibernate works with case-insensitive keys. So NHibernate might be a better choice for us.I am however still interested in finding out if there is any way to change the behaviour of Entity Framework.

    Read the article

  • 2-column table with two foreign keys. Performance/design question.

    - by Emanuel
    Hello everyone! I recently ran into a quite complex problem and after looking around a lot I couldn't find a solution to it. I've found answers to my questions many times before on stackoverflow.com, so I decided to post here. So I'm making a user/group managment system for a web-based project, and I'm storing all related data into a postgreSQL database. This system relies on three tables: USERS GROUPS GROUP_USERS The two first tables simply define all the users and all the groups on the site, and the last table, GROUP_USERS, stores the groups every user is part of. It only has two columns: USER_ID GROUP_ID Since every user can be a member of several groups, I decided to make a separate table for this purpose, rather than storing a comma separated column in the USERS-table. Now, both columns are foreign keys, and I want to make them both primary keys as well, this since each combination of USER_ID and GROUP_ID has to be unique, and if I give them the constraint UNIQUE pgAdmin tells me that each table should have at least one Primary key. But now I am stuck with what seems to be a lot of indexes and relations to a very small table only containing numbers. In the end, I want this table to be as fast as possible, even if containing tens of thousands of rows. Size on disk shouldn't be a problem since its just all numbers anyway, but it feels quite stupid to have a full-sized index refering to a smaller table. Should I stick with my current solution, store comma-separated values in a column in the USERS-table or is there any other solution I should be aware of. PS. I don't want to use an array-column, even if they are supported by postgreSQL. I want to be as generic as possible so I can switch database later on, if necessary. EDIT: I other words, will using a compound primary key and two foreign keys in one table with only two columns have a negative impact on performance rather than the opposite due to the size of the generated index? Thank you!

    Read the article

  • Other then DDNS, can a fake primary DNS server break anything else?

    - by Nimmy Lebby
    I am aware that the primary server listed in SOA record has to be valid for DDNS to work. Is anyone aware of any other application that uses the SOA listed primary DNS server in one way or the other? By a fake primary server I mean either: Inaccessible by anything else other than secondary servers (this is called hidden primary correct? unsure). A completely fake domain name like dig +short soa spamhaus.org

    Read the article

  • What is the right way to Windows 7/Ubuntu 10.10 Dual-Triple Boot Partitioning for Laptop OEM?

    - by Denja
    Hi Linux Community, I find my self struggling with the ever slow and buggy windoze OS once again. It's Time to change with the Ubuntu 10.10 64bit as a really faster Operating System. My Hard Disk laptop as a RECOVERY and HP_TOOLS partition they are both Primary. I Have the System Recovery DVD for Windows 64bit should anything happen. Here's the layout I used with windows before: * (C:) Windows 7 system partition NTFS - 284,89GB (Primary,Boot,Pagefile,Dump) * HP_TOOLS system partition FAT32 - 99MB (Primary) * (D:) RECOVERY partition NTFS - 12,90GB (Primary) * SYSTEM partition NTFS 199MB (Primary) Here's the layout I want to make based on your answers * (C:) Windows 7 system partition NTFS - 60GB (Primary) (sda1) * (D:) Windows DATA partition (user files) NTFS - 120GB(Primary)(sda2);wanna share with Linux * Linux root Ext4 - 100GB (Primary)(sda3) (Ubuntu 10.10 64bit) * Linux swap swap- RAM size, 3GB (sda4) * Linux root Ext3- 15,9GB (Extended)(sda5) (OpenSuse or Puppy) Here is my New Ubuntu 10.10 64bit layout in use now: * SYSTEM partition NTFS 199MB (Primary) (sda1) **Partition 1 does not end on cylinder boundary.(?)** * (C:) Windows 7 system partition NTFS - 90GB (Primary) (sda2) * (D:) Windows 7 RECOVERY partition NTFS - 12,90GB (Primary) (sda3) * Linux system partition EXTENDED - 195GB (Logical) * Linux root Ext4- 10GB (Extended) (sda5) * Linux home Ext3- 185GB (Extended) (sda6) I didn't know if I could wipe all previous partitions when i installed Ubuntu because of the RECOVERY partition so I just made the space for my extended partition by deleting the HP_TOOLS (Fat32). By doing this I managed to make and successfully install Ubuntu 64 but I couldn't actually make the partition for the swap or a third Linux OS. Question 1: What is the right way to Windows 7/Ubuntu 10.10 Dual-Triple Boot Partitioning for Laptop OEM?? Thank you in advance for your advises and suggestions and Happy New Year to All!!

    Read the article

  • ETL Operation - Return Primary Key

    - by user302254
    I am using Talend to populate a data warehouse. My job is writing customer data to a dimension table and transaction data to the fact table. The surrogate key (p_key) on the fact table is auto-incrementing. When I insert a new customer, I need my fact table to reflect the id of the related customer. As I mentioned my p_key is auto auto_incrementing so I can't just insert an arbitrary value for the p_key. Any thought on how I can insert a row into my dimension table and still retrieve the primary key to reference in my fact record? Thanks.

    Read the article

  • Setting the primary key of a object type table in Oracle

    - by Rek
    I have two Oracle questions. How can I set the primary key of a table when the table is made up of an object type? e.g. CREATE TABLE object_names OF object_type I have created a Varray type, CREATE TYPE MULTI_TAG AS VARRAY(10) OF VARCHAR(10); but when I try to do SELECT p.tags.count FROM pg_photos p; I get an invalid identifier error on the "count" part. p.tags is a MULTI_TAG, how can I get the number of elements in the MULTI_TAG?

    Read the article

  • use of EntityManagerFactory causing duplicate primary key exceptions

    - by bradd
    Hey guys, my goal is create an EntityManager using properties dependent on which database is in use. I've seen something like this done in all my Google searches(I made the code more basic for the purpose of this question): @PersistenceUnit private EntityManagerFactory emf; private EntityManager em; private Properties props; @PostConstruct public void createEntityManager(){ //if oracle set oracle properties else set postgres properties emf = Persistence.createEntityManagerFactory("app-x"); em = emf.createEntityManager(props); } This works and I can load Oracle or Postgres properties successfully and I can Select from either database. HOWEVER, I am running into issues when doing INSERT statements. Whenever an INSERT is done I get a duplicate primary key exception.. every time! Can anyone shed some light on why this may be happening? Thanks -Brad

    Read the article

  • Add login / logout to drupal menu that's not a primary or secondary menu

    - by user367766
    Hello, Im trying to append an item to a menu that I created. I know its get the primary and secondary menus using "menu_secondary_local_tasks()" etc, and then add items within preprocess page. How would I go about this with a menu that I created? Here is the code I am using to check is the user is logged in... function themeName_check_login() { global $user; if ($user->uid) { print l("Log out, " . $user->name,"logout"); } else { print l("Log In ","user"); } } Thanks in advance, -Matt

    Read the article

  • "Primary Filegroup is Full" in SQL Server 2008 Standard for no apparent reason

    - by Anton Gogolev
    Our database is currently at 64 Gb and one of our apps started to fail with the following error: System.Data.SqlClient.SqlException: Could not allocate space for object 'cnv.LoggedUnpreparedSpos'.'PK_LoggedUnpreparedSpos' in database 'travelgateway' because the 'PRIMARY' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup. I double-checked everything: all files in a single filegroup are allowed to autogrow with a reasonable increments (100 Mb for a data file, 10% for a log file), more than 100 Gb of free space is available for the database, tempdb is set to autogrow as well with plenty of free HDD space on its drive. To resolve a problem, I added second file to the filegroup and the error has gone. But I feel uneasy about this whole situation. Where' the problem here, guys?

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >