Search Results

Search found 1823 results on 73 pages for 'partitions'.

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

  • How to change partitioning - may involve conversion of a partition from primary to extended

    - by george_k
    I am having trouble thinking through how I can achieve my partitioning goals. Now my partitions are: sda1 (winA) (primary) sda2 (winB) (primary) sda3 (/ for ubuntu) (primary) What I want to migrate into is (obviously partition numbers need not be exactly like that) sda1 (winA) (primary) sda2 (winB) (primary) sda3 (/boot) (primary) sda4 - extended which will contain sda5 (/home) sda6 (/ for ubuntu) sda7 (swap) I know I may be asking too much, but what would a way to do it? One way I have thought is Create a new primary partition for /boot and split it from the root partition into the new one. It shouldn't be too hard. Then the disk will have 4 primary partitions. Somehow convert the root ubuntu partition from primary to extended. Split that last partition in 3 extended partitions (root, /home, swap) and split the contents there. I am obviously stuck on the 2nd part. Another way could be (maybe easier): Create an extended partition (or two) Split /home there Somehow move everything except /boot to the extended partition. This way /boot will stay on the primary partition that exists now, and will be shrunk as needed, and everything else will end up to the extended partitions. This may sound better, but I'm not too sure how to do the 3rd part. Some details: The disk is almost empty, so I have space to move things around in it, shrink the ubuntu partition etc. I don't want to touch the windows partitions in any way. Reinstallation is not an option. Also using a different partitioning scheme with fewer partitions is not an option (for example not having a separate /boot) Any ideas?

    Read the article

  • Way to know if two partitions are in one physical hard disk without WMI?

    - by Alon
    Hey. I have those partitions (in Windows) for example: Hard Disk 1 - Partition C, Partition D Hard Disk 2 - Partition E Is there any way in a program language to know if for example partition C and partition D are in one physical hard disk without WMI? I don't want to use WMI because it's slow - for this example, it took for me 0.5 seconds. I need it to be fast. Thank you.

    Read the article

  • how to mount partitions from USB drives in Windows using Delphi?

    - by user569556
    Hi. I'm a Delphi programmer. I want to mount all partitions from USB drives in Windows (XP). The OS is doing this automatically but there are situations when such a program is useful. I know how to find if a drive is on USB or not. My code so far is: type STORAGE_QUERY_TYPE = (PropertyStandardQuery = 0, PropertyExistsQuery, PropertyMaskQuery, PropertyQueryMaxDefined); TStorageQueryType = STORAGE_QUERY_TYPE; STORAGE_PROPERTY_ID = (StorageDeviceProperty = 0, StorageAdapterProperty); TStoragePropertyID = STORAGE_PROPERTY_ID; STORAGE_PROPERTY_QUERY = packed record PropertyId: STORAGE_PROPERTY_ID; QueryType: STORAGE_QUERY_TYPE; AdditionalParameters: array[0..9] of AnsiChar; end; TStoragePropertyQuery = STORAGE_PROPERTY_QUERY; STORAGE_BUS_TYPE = (BusTypeUnknown = 0, BusTypeScsi, BusTypeAtapi, BusTypeAta, BusType1394, BusTypeSsa, BusTypeFibre, BusTypeUsb, BusTypeRAID, BusTypeiScsi, BusTypeSas, BusTypeSata, BusTypeMaxReserved = $7F); TStorageBusType = STORAGE_BUS_TYPE; STORAGE_DEVICE_DESCRIPTOR = packed record Version: DWORD; Size: DWORD; DeviceType: Byte; DeviceTypeModifier: Byte; RemovableMedia: Boolean; CommandQueueing: Boolean; VendorIdOffset: DWORD; ProductIdOffset: DWORD; ProductRevisionOffset: DWORD; SerialNumberOffset: DWORD; BusType: STORAGE_BUS_TYPE; RawPropertiesLength: DWORD; RawDeviceProperties: array[0..0] of AnsiChar; end; TStorageDeviceDescriptor = STORAGE_DEVICE_DESCRIPTOR; const IOCTL_STORAGE_QUERY_PROPERTY = $002D1400; var i: Integer; H: THandle; USBDrives: array of Byte; Query: TStoragePropertyQuery; dwBytesReturned: DWORD; Buffer: array[0..1023] of Byte; sdd: TStorageDeviceDescriptor absolute Buffer; begin SetLength(UsbDrives, 0); SetErrorMode(SEM_FAILCRITICALERRORS); for i := 0 to 99 do begin H := CreateFile(PChar('\\.\PhysicalDrive' + IntToStr(i)), 0, FILE_SHARE_READ or FILE_SHARE_WRITE, nil, OPEN_EXISTING, 0, 0); if H <> INVALID_HANDLE_VALUE then begin try dwBytesReturned := 0; FillChar(Query, SizeOf(Query), 0); FillChar(Buffer, SizeOf(Buffer), 0); sdd.Size := SizeOf(Buffer); Query.PropertyId := StorageDeviceProperty; Query.QueryType := PropertyStandardQuery; if DeviceIoControl(H, IOCTL_STORAGE_QUERY_PROPERTY, @Query, SizeOf(Query), @Buffer, SizeOf(Buffer), dwBytesReturned, nil) then if sdd.BusType = BusTypeUsb then begin SetLength(USBDrives, Length(USBDrives) + 1); UsbDrives[High(USBDrives)] := Byte(i); end; finally CloseHandle(H); end; end; end; for i := 0 to High(USBDrives) do begin // end; end. But I don't know how to access partitions on each drive and mounts them. Can you please help me? I searched before I asked and I couldn't find a working code. But if I did not properly then I'm sorry and please show me that topic. Best regards, John

    Read the article

  • MaxTotalSizeInBytes - Blind spots in Usage file and Web Analytics Reports

    - by Gino Abraham
    Originally posted on: http://geekswithblogs.net/GinoAbraham/archive/2013/10/28/maxtotalsizeinbytes---blind-spots-in-usage-file-and-web-analytics.aspx http://blogs.msdn.com/b/sharepoint_strategery/archive/2012/04/16/usage-file-and-web-analytics-reports-with-blind-spots.aspx In my previous post (Troubleshooting SharePoint 2010 Web Analytics), I referenced a problem that can occur when exceeding the daily partition size for the LoggingDB, which generates the ULS message “[Partition] has exceeded the max bytes”. Below, I wanted to provide some additional info on this particular issue and help identify some options if this occurs. As an aside, this post only applies if you are missing portions of Usage data - think blind spots on intermittent days or user activity regularly sparse for the afternoon/evening. If this fits your scenario - read on. But if Usage logs are outright missing, go check out my Troubleshooting post first.  Background on the problem:The LoggingDB database has a default maximum size of ~6GB. However, SharePoint evenly splits this total size into fixed sized logical partitions – and the number of partitions is defined by the number of days to retain Usage data (by default 14 days). In this case, 14 partitions would be created to account for the 14 days of retention. If the retention were halved to 7 days, the LoggingDBwould be split into 7 corresponding partitions at twice the size. In other words, the partition size is generally defined as [max size for DB] / [number of retention days].Going back to the default scenario, the “max size” for the LoggingDB is 6200000000 bytes (~6GB) and the retention period is 14 days. Using our formula, this would be [~6GB] / [14 days], which equates to 444858368 bytes (~425MB) per partition per day. Again, if the retention were halved to 7 days (which halves the number of partitions), the resulting partition size becomes [~6GB] / [7 days], or ~850MB per partition.From my experience, when the partition size for any given day is exceeded, the usage logging for the remainder of the day is essentially thrown away because SharePoint won’t allow any more to be written to that day’s partition. The only clue that this is occurring (beyond truncated usage data) is an error such as the following that gets reported in the ULS:04/08/2012 09:30:04.78    OWSTIMER.EXE (0x1E24)    0x2C98    SharePoint Foundation    Health    i0m6     High    Table RequestUsage_Partition12 has 444858368 bytes that has exceeded the max bytes 444858368It’s also worth noting that the exact bytes reported (e.g. ‘444858368’ above) may slightly vary among farms. For example, you may instead see 445226812, 439123456, or something else in the ballpark. The exact number itself doesn't matter, but this error message intends to indicates that the reporting usage has exceeded the partition size for the given day.What it means:The error itself is easy to miss, which can lead to substantial gaps in the reporting data (your mileage may vary) if not identified. At this point, I can only advise to periodically check the ULS logs for this message. Down the road, I plan to explore if [Developing a Custom Health Rule] could be leveraged to identify the issue (If you've ever built Custom Health Rules, I'd be interested to hear about your experiences). Overcoming this issue also poses a challenge, with workaround options including:Lower the retentionBecause the partition size is generally defined as [max size] / [number of retention days], the first option is to lower the number of days to retain the data – the lower the retention, the lower the divisor and thus a bigger partition. For example, halving the retention from 14 to 7 days would halve the number of partitions, but double the partition size to ~850MB (e.g. [6200000000 bytes] / [7 days] = ~850GB partitions). Lowering it to 2 days would result in two ~3GB partitions… and so on.Recreate the LoggingDB with an increased sizeThe property MaxTotalSizeInBytes is exposed by OM code for the SPUsageDefinition object and can be updated with the example PowerShell snippet below. However, updating this value has no immediate impact because this size only applies when creating a LoggingDB. Therefore, you must create a newLoggingDB for the Usage Service Application. The gotcha: this effectively deletes all prior Usage databecause the Usage Service Application can only have a single LoggingDB.Here is an example snippet to update the "Page Requests" Usage Definition:$def=Get-SPUsageDefinition -Identity "page requests" $def.MaxTotalSizeInBytes=12400000000 $def.update()Create a new Logging database and attach to the Usage Service Application using the following command: Get-spusageapplication | Set-SPUsageApplication -DatabaseServer <dbServer> -DatabaseName <newDBname> Updated (5/10/2012): Once the new database has been created, you can confirm the setting has truly taken by running the following SQL Query (be sure to replace the database name in the following query with the name provided in the PowerShell above)SELECT * FROM [WSS_UsageApplication].[dbo].[Configuration] WITH (nolock) WHERE ConfigName LIKE 'Max Total Bytes - RequestUsage'

    Read the article

  • Enumerate all k-partitions of 1d array with N elements?

    - by user301217
    This seems like a simple request, but google is not my friend because "partition" scores a bunch of hits in database and filesystem space. I need to enumerate all partitions of an array of N values (N is constant) into k sub-arrays. The sub-arrays are just that - a starting index and ending index. The overall order of the original array will be preserved. For example, with N=4 and k=2: [ | a b c d ] (0, 4) [ a | b c d ] (1, 3) [ a b | c d ] (2, 2) [ a b c | d ] (3, 1) [ a b c d | ] (4, 0) I'm pretty sure this isn't an original problem (and no, it's not homework), but I'd like to do it for every k <= N, and it'd be great if the later passes (as k grows) took advantage of earlier results. If you've got a link, please share.

    Read the article

  • Tips on self-learning boot-time fundamentals (grub, disks, partitions, LVMs, etc)?

    - by Harry
    Is there any good resource which I can use to self-learn all the low-level system administration details on Grub, Grub2, disks, partitioning, LVM, etc? I'm comfortable with system admin tasks post-boot but I lack knowledge about both the fundamentals and actuals of all that happens during boot on a Linux system such as Fedora. Any recommendations on how to setup a testbed on my desktop for learning the above? I may not be able to get another machine / harddisk, so may have to rely on something like VirtualBox. But don't know if there are other (better) options... so asking for tips from those who have self-learned / mastered this track themselves.

    Read the article

  • Driver for writing to UDF partitions from Windows XP?

    - by davr
    I'm considering using an UDF partition to share data between Windows XP, 7, and Linux. It's more efficient than FAT32, and avoids the 4GB max file size limit. I've found it will also work with Mac OS X, more details in this questions. However, in Windows XP, it is read-only. I'd like to write to it too. Are there any drivers that will allow this? I've found a few that support writing UDF...but they are designed for writing to CDs or DVDs, not specifically for HDDs or USB Flash drives: DLA, InCD, Drag-To-Disc. Will any of those 3 drivers work for HDDs/USB Flash drives? Or is there another driver that will do what I want? Thanks.

    Read the article

  • How can I join non-consecutive partitions on internal hard disk?

    - by Andy
    I recently installed a new, larger hard disk in my PC at work (the office wouldn't spring for an upgrade for my 75GB disk, so I brought my own 2TB disk in from home). I managed to clone the original drive using CloneZilla, but now I have a 75GB partition on my new drive, followed by a 300MB partition, followed by a 1794.65GB of unallocated space. What I want is to add the unallocated space to the 75GB partition, thereby maximizing my C: drive. However, when I right-click on the C: partition, the option to "Extend Volume" is grayed out. How do I get all my fancy new extra space to be part of my C: drive? I also tried booting with GParted, but I get the same deal - cannot adjust the C: drive because there's no contiguous space.

    Read the article

  • should I put my multi-device btrfs filesystem on disk partitions or raw devices?

    - by Glyph
    If I'm going to create a multi-device btrfs filesystem. The official recommendation from the documentation apppears to be to create it on raw devices; i.e. /dev/sdb, /dev/sdc, etc, but this is not explained. Are there any advantages to creating a partition table on these devices first, either GPT or MBR, and then creating the filesystem on /dev/sdb1, /dev/sdc1 et cetera? Does feeding btrfs whole devices have some particular advantage, or are these basically equivalent?

    Read the article

  • Disaster - partitions lost, data seemingly alive, how to recover?

    - by a2h
    I've used TestDisk and it's written my old partition structure of a ~20GiB partition for Vista, ~25GiB partition for 7 (but it now shows up as unallocated) and a ~400GiB partition for documents. What it's meant to be is a 30GiB partition for 7, some unallocated space, and a ~400GiB partition for documents. So currently, I have access to all my documents, but not any of the programs I've installed on C:, or AppData, because my boot partition is now supposedly a 20GB vista partition. I've tried using my Windows 7 install disc's repair function, but that did nothing beyond wasting about 10 minutes of my time. I'm currently posting from an Ubuntu live CD. Any help?

    Read the article

  • How many bootable partitions are possible to have on one hard drive?

    - by draiden
    This may not be the correct place to post this; if that's the case, just let me know and point me in the right direction please! I'm thinking of building a box that needs to be lightweight and portable, and would need to be able to boot multiple installations of windows. I am needing to have multiple installations so that I can, for example, plug the box in to the network at one location, boot in to that location's partition, and have full access to everything I would normally need to do on a computer that has already been set up on that network. Then, when I go to the next client, I would be able to do the same thing, with the new location's partition, and have all of those network settings, drive mappings, etc., available there. Obviously I'd need to go through and set them all up on the different locations/networks, I'm not expecting it to magically know where I am and what I'm doing. It would be like I'm carrying around a computer that is configured for each place I need to go in one little box, instead of having to have multiple computers or having to reconfigure all the settings and such every time I go to another client. Or is there an easier way to do this that I haven't learned of?

    Read the article

  • Does "I securely erased my drive" really work with Truecrypt partitions?

    - by TheLQ
    When you look at Truecrypt's Plausible Deniability page it says that one of the reasons for partition with solely random data is that you securely erased your drive. But what about the partition table with full disk encryption? How can you explain why the partition table says there's a partition of unknown type (With my limited knowledge of partition tables I think that they store all the partition filesystem types) and with solely random data? It seems that if your going to securely erase the drive you would destroy everything, including the partition table. And even if you just wiped the partition, the partition table would still say that the partition was originally NTFS, which it isn't anymore. Does the "I securely erased my drive" excuse still work here? (Note: I know that there's hidden truecrypt volumes, but I'm avoiding them due to the high risk of data loss)

    Read the article

  • How many bootable partitions are possible to have on one hard drive?

    - by draiden
    This may not be the correct place to post this; if that's the case, just let me know and point me in the right direction please! I'm thinking of building a box that needs to be lightweight and portable, and would need to be able to boot multiple installations of windows. I am needing to have multiple installations so that I can, for example, plug the box in to the network at one location, boot in to that location's partition, and have full access to everything I would normally need to do on a computer that has already been set up on that network. Then, when I go to the next client, I would be able to do the same thing, with the new location's partition, and have all of those network settings, drive mappings, etc., available there. Obviously I'd need to go through and set them all up on the different locations/networks, I'm not expecting it to magically know where I am and what I'm doing. It would be like I'm carrying around a computer that is configured for each place I need to go in one little box, instead of having to have multiple computers or having to reconfigure all the settings and such every time I go to another client. Or is there an easier way to do this that I haven't learned of?

    Read the article

  • Active Directory Partition Error

    - by BLAKE
    Right now my active directory is failing a dcdiag test. I can find no info online about this error. When I run dcdiag /test:crossrefvalidation, I get the output: .... Doing primary tests Testing server: Default-First-Site-Name\ad01 Running partition tests on : ForestDnsZones Starting test: CrossRefValidation ......................... ForestDnsZones passed test CrossRefValidation Running partition tests on : DomainDnsZones Starting test: CrossRefValidation ......................... DomainDnsZones passed test CrossRefValidation Running partition tests on : Schema Starting test: CrossRefValidation ......................... Schema passed test CrossRefValidation Running partition tests on : Configuration Starting test: CrossRefValidation ......................... Configuration passed test CrossRefValidation Running partition tests on : mydomain Starting test: CrossRefValidation ......................... mydomain passed test CrossRefValidation Running partition tests on : t Starting test: CrossRefValidation This cross-ref has a non-standard dNSRoot attribute. Cross-ref DN: CN=a3a24d3a-4782-460b-9148-86ac2d86b9ae,CN=Partitions,CN=Configuration, DC=mydomain,DC=com nCName attribute (Partition name): DC=t Bad dNSRoot attribute: dc01.mydomain.com Check with your network administrator to make sure this dNSRoot attribute is correct, and if not please change the attribute to the value below. dNSRoot should be: t It appears this partition (DC=t) failed to get completely created. This cross-ref (CN=a3a24d3a-4782-460b-9148-86ac2d86b9ae,CN=Partitions,CN=Configurat ion,DC=mydomain,DC=com) is dead and should be removed from the Active Directory. ......................... t failed test CrossRefValidation .... I used LDP from the windows support tools. I searched for the dnsRoot attribute in "cn=partitions,cn=configuration,dc=mydomain,dc=com", with the filter "(&(objectcategory=crossref)(systemFlags:1.2.840.113556.1.4.803:=5))" I got the result: ***Searching... ldap_search_s(ld, "cn=partitions,CN=Configuration,DC=mydomain,DC=com", 1, "(& (objectcategory=crossref)(systemFlags:1.2.840.113556.1.4.803:=5))", attrList, 0, &msg) Result <0>: (null) Matched DNs: Getting 3 entries: >> Dn: CN=65502be3-fc90-442a-83d8-4b3b91e82439,CN=Partitions,CN=Configuration,DC=mydomain,DC=com 1> dnsRoot: ForestDnsZones.mydomain.com; >> Dn: CN=a3a24d3a-4782-460b-9148-86ac2d86b9ae,CN=Partitions,CN=Configuration,DC=mydomain,DC=com 1> dnsRoot: ad01.mydomain.com; >> Dn: CN=f0ef5771-6225-4984-acd9-c08f582eb4e2,CN=Partitions,CN=Configuration,DC=mydomain,DC=com 1> dnsRoot: DomainDnsZones.mydomain.com; It looks like the bad partition has the name of my first domain controller 'ad01.mydomain.com'. I have googled for a while and have not been able to find any help or documentation about application partitions in Active Directory. Does anyone have any advice on how to cleanup this partition (or what the partition is for)? Does anyone know the repercussions for deleting this partition?

    Read the article

  • How to change a physical partition system to LVM?

    - by Daniel Hernández
    I have a server with Debian that have 3 physical partitions covering all the disk: boot, root y swap. Now I want to replace that partitions with LVM partitions. I know how install Debian with LVM at beginning, but in this case I can't install the system at beginning because the provider gets me a server with remote access and the system installed in this way. How can I change that partitions using only an ssh connection and possibly other remote server where to put some temporal data?

    Read the article

  • Windows 7 re-installation

    - by GTX OC
    I need to reinstall Windows 7 but the problem is that all my partitions are set to Dynamic disk type.Windows cannot install on Dynamic disc type partitions.During the installation process there is an option to format the drive but I cannot change the disc type.Is there any way to convert the partitions back into primary so that I can re-install Windows?I am a complete fool.I don't even know why I converted the partition in which Windows was installed into dynamic type. I have a 1TB HDD having 4 partitions and all of them are dynamic. Thanks in advance.

    Read the article

  • Can I make my drives visible and change their partition type without losing my data?

    - by user165408
    I have made a lot of mistakes and now I cannot see my hard disk nor I can start my operating system on my laptop. All my passwords and important files on my hdd without any backup. I followed this course of action Changed my hard disk partitions to dynamic just for getting 5th partition. (1st mistake) Decreased partitions to 4 again. Backed up operating system from 4th to 3rd partition with Norton Ghost. Booted from a live CD for Windows XP. Formatted 4th partition and moved my all important data from 1st and 2nd partitions to the 4th partition. Deleted 1st and 2nd partitions and got 1 partition from half of empty space. So I have just 3 partitions and empty space between 1st and 2nd partitions. Tried to install Windows 8 to the first partition but it did not allow because it is dynamic. Also it did not allow to install to other partitions. Tried to install Windows XP to the 1st partition but it said if I continue I cannot use other drivers. Therefore I escaped from installing it. Booted from the Windows XP live CD then increased 1st partiton to less than 400mb of empty space. Therefore I thought it will be adjacent but it was shown as 2 partitions. In my computer I see just 3 drivers. Using Norton Ghost I recovered my OS to the 1st partition. (2nd mistake it was on 4th partition originally) Booted from a Windows XP live CD I tried to install bcdedit to the Windows XP live CD but it did not work. Then I tried to install EaseUS Partition Master Home Edition. It was installed with errors then I start it and it showed me an error like there is no hard disk. I looked to my PC and my drivers were not there. Booted from the Norton Ghost CD and it did not show me my drivers either, but before I was able to see them. I checked numbers of partition shown by the Norton Ghost utility and they are still have same numbers so I have to see my drivers but I cannot see them now. My hard disk is shown as extarnal dynamic now so I cannot see any drive in my PC in the live Windows XP. There are two options; first one is import extarnal disk and second one is convert disk to basic. Will they delete my data? I fear booting from CDs like Windows XP live CD, Norton Ghost CD, and the operating system CD/DVD, because they may overwrite a few MB their data to my data. These recover tools are already exist in Windows XP live CD by The Ultimate Boot CD for Windows. Can any of them help me? CompuAppa SwissKnife V3 DBXtract Disk Investigator Fab's AutoBackup 2.0 FileRecovery Floppy Repair Free Undelete Handy Recovery Recovery Manager Restorastion Restorastion Help File by UBCD4Win UnChk Unstoppable Copier Finally How can I make it so that my drives are visible again without losing my data? How can I convert my dynamic partitions to basic without losing my data?

    Read the article

  • How to recover bitlocker encrypted partition that is now 'unallocated'/'free space'?

    - by Atishay Jain
    My hard drive had 5 partitions(including 1(some 4-5GB) bit locker encrypted one). When I used disk mgmt I could view 2 partitions(24.4GB and 8.94GB) in green colour labeled Empty space. So, I wanted to merge them and I used minitool partition wizard for the purpose. I don't know, what that software did, but all I was left with 2 partitions and lots of green free space. I recovered 2 partitions using EaseUS partition master, but the bitlocker encrypted partition cannot be searched by it(and also minitool partition recovery). Now, the disk mgmt shows 2 free space partitions of 28.36GB and 8.94GB respectively. Here is a screenshot http://s14.postimage.org/4tvij041t/Screen_Shot003.jpg Please, tell me a way to recover the bitlocker encrypted partition that is showing as a free space in disk management. P.S. - It contains very important data.

    Read the article

  • SQL SERVER – Simple Example of Incremental Statistics – Performance improvements in SQL Server 2014 – Part 2

    - by Pinal Dave
    This is the second part of the series Incremental Statistics. Here is the index of the complete series. What is Incremental Statistics? – Performance improvements in SQL Server 2014 – Part 1 Simple Example of Incremental Statistics – Performance improvements in SQL Server 2014 – Part 2 DMV to Identify Incremental Statistics – Performance improvements in SQL Server 2014 – Part 3 In part 1 we have understood what is incremental statistics and now in this second part we will see a simple example of incremental statistics. This blog post is heavily inspired from my friend Balmukund’s must read blog post. If you have partitioned table and lots of data, this feature can be specifically very useful. Prerequisite Here are two things you must know before you start with the demonstrations. AdventureWorks – For the demonstration purpose I have installed AdventureWorks 2012 as an AdventureWorks 2014 in this demonstration. Partitions – You should know how partition works with databases. Setup Script Here is the setup script for creating Partition Function, Scheme, and the Table. We will populate the table based on the SalesOrderDetails table from AdventureWorks. -- Use Database USE AdventureWorks2014 GO -- Create Partition Function CREATE PARTITION FUNCTION IncrStatFn (INT) AS RANGE LEFT FOR VALUES (44000, 54000, 64000, 74000) GO -- Create Partition Scheme CREATE PARTITION SCHEME IncrStatSch AS PARTITION [IncrStatFn] TO ([PRIMARY], [PRIMARY], [PRIMARY], [PRIMARY], [PRIMARY]) GO -- Create Table Incremental_Statistics CREATE TABLE [IncrStatTab]( [SalesOrderID] [int] NOT NULL, [SalesOrderDetailID] [int] NOT NULL, [CarrierTrackingNumber] [nvarchar](25) NULL, [OrderQty] [smallint] NOT NULL, [ProductID] [int] NOT NULL, [SpecialOfferID] [int] NOT NULL, [UnitPrice] [money] NOT NULL, [UnitPriceDiscount] [money] NOT NULL, [ModifiedDate] [datetime] NOT NULL) ON IncrStatSch(SalesOrderID) GO -- Populate Table INSERT INTO [IncrStatTab]([SalesOrderID], [SalesOrderDetailID], [CarrierTrackingNumber], [OrderQty], [ProductID], [SpecialOfferID], [UnitPrice],   [UnitPriceDiscount], [ModifiedDate]) SELECT     [SalesOrderID], [SalesOrderDetailID], [CarrierTrackingNumber], [OrderQty], [ProductID], [SpecialOfferID], [UnitPrice],   [UnitPriceDiscount], [ModifiedDate] FROM       [Sales].[SalesOrderDetail] WHERE      SalesOrderID < 54000 GO Check Details Now we will check details in the partition table IncrStatSch. -- Check the partition SELECT * FROM sys.partitions WHERE OBJECT_ID = OBJECT_ID('IncrStatTab') GO You will notice that only a few of the partition are filled up with data and remaining all the partitions are empty. Now we will create statistics on the Table on the column SalesOrderID. However, here we will keep adding one more keyword which is INCREMENTAL = ON. Please note this is the new keyword and feature added in SQL Server 2014. It did not exist in earlier versions. -- Create Statistics CREATE STATISTICS IncrStat ON [IncrStatTab] (SalesOrderID) WITH FULLSCAN, INCREMENTAL = ON GO Now we have successfully created statistics let us check the statistical histogram of the table. Now let us once again populate the table with more data. This time the data are entered into a different partition than earlier populated partition. -- Populate Table INSERT INTO [IncrStatTab]([SalesOrderID], [SalesOrderDetailID], [CarrierTrackingNumber], [OrderQty], [ProductID], [SpecialOfferID], [UnitPrice],   [UnitPriceDiscount], [ModifiedDate]) SELECT     [SalesOrderID], [SalesOrderDetailID], [CarrierTrackingNumber], [OrderQty], [ProductID], [SpecialOfferID], [UnitPrice],   [UnitPriceDiscount], [ModifiedDate] FROM       [Sales].[SalesOrderDetail] WHERE      SalesOrderID > 54000 GO Let us check the status of the partition once again with following script. -- Check the partition SELECT * FROM sys.partitions WHERE OBJECT_ID = OBJECT_ID('IncrStatTab') GO Statistics Update Now here has the new feature come into action. Previously, if we have to update the statistics, we will have to FULLSCAN the entire table irrespective of which partition got the data. However, in SQL Server 2014 we can just specify which partition we want to update in terms of Statistics. Here is the script for the same. -- Update Statistics Manually UPDATE STATISTICS IncrStatTab (IncrStat) WITH RESAMPLE ON PARTITIONS(3, 4) GO Now let us check the statistics once again. -- Show Statistics DBCC SHOW_STATISTICS('IncrStatTab', IncrStat) WITH HISTOGRAM GO Upon examining statistics histogram, you will notice that now the distribution has changed and there is way more rows in the histogram. Summary The new feature of Incremental Statistics is indeed a boon for the scenario where there are partitions and statistics needs to be updated frequently on the partitions. In earlier version to update statistics one has to do FULLSCAN on the entire table which was wasting too many resources. With the new feature in SQL Server 2014, now only those partitions which are significantly changed can be specified in the script to update statistics. Cleanup You can clean up the database by executing following scripts. -- Clean up DROP TABLE [IncrStatTab] DROP PARTITION SCHEME [IncrStatSch] DROP PARTITION FUNCTION [IncrStatFn] GO Reference: Pinal Dave (http://blog.sqlauthority.com)Filed under: PostADay, SQL, SQL Authority, SQL Performance, SQL Query, SQL Server, SQL Tips and Tricks, T SQL Tagged: SQL Statistics, Statistics

    Read the article

  • Incremental Statistics Maintenance – what statistics will be gathered after DML occurs on the table?

    - by Maria Colgan
    Incremental statistics maintenance was introduced in Oracle Database 11g to improve the performance of gathering statistics on large partitioned table. When incremental statistics maintenance is enabled for a partitioned table, oracle accurately generated global level  statistics by aggregating partition level statistics. As more people begin to adopt this functionality we have gotten more questions around how they expected incremental statistics to behave in a given scenario. For example, last week we got a question around what partitions should have statistics gathered on them after DML has occurred on the table? The person who asked the question assumed that statistics would only be gathered on partitions that had stale statistics (10% of the rows in the partition had changed). However, what they actually saw when they did a DBMS_STATS.GATHER_TABLE_STATS was all of the partitions that had been affected by the DML had statistics re-gathered on them. This is the expected behavior, incremental statistics maintenance is suppose to yield the same statistics as gathering table statistics from scratch, just faster. This means incremental statistics maintenance needs to gather statistics on any partition that will change the global or table level statistics. For instance, the min or max value for a column could change after just one row is inserted or updated in the table. It might easier to demonstrate this using an example. Let’s take the ORDERS2 table, which is partitioned by month on order_date.  We will begin by enabling incremental statistics for the table and gathering statistics on the table. After the statistics gather the last_analyzed date for the table and all of the partitions now show 13-Mar-12. And we now have the following column statistics for the ORDERS2 table. We can also confirm that we really did use incremental statistics by querying the dictionary table sys.HIST_HEAD$, which should have an entry for each column in the ORDERS2 table. So, now that we have established a good baseline, let’s move on to the DML. Information is loaded into the latest partition of the ORDERS2 table once a month. Existing orders maybe also be update to reflect changes in their status. Let’s assume the following transactions take place on the ORDERS2 table this month. After these transactions have occurred we need to re-gather statistic since the partition ORDERS_MAR_2012 now has rows in it and the number of distinct values and the maximum value for the STATUS column have also changed. Now if we look at the last_analyzed date for the table and the partitions, we will see that the global statistics and the statistics on the partitions where rows have changed due to the update (ORDERS_FEB_2012) and the data load (ORDERS_MAR_2012) have been updated. The column statistics also reflect the changes with the number of distinct values in the status column increase to reflect the update. So, incremental statistics maintenance will gather statistics on any partition, whose data has changed and that change will impact the global level statistics.

    Read the article

  • Trying to format drive fails

    - by david
    since I will be doing an internship for which i need to use Windows software, I have decided to ruin my day trying to remove my Ubuntu 12.04, install Win XP SP3 (since the DualBoot theme from ubuntu suggests to first install Windows and then Ubuntu, for problems with the bootloader if you do it the other way around) and then reinstall Ubuntu 12.04 since I would like to keep using it as my primary operating system, using WinXP exclusively for the internship. Other than that, I would like to have a partition for the data, which can be used by both Ubuntu and Windows. So now, I have used the disk utility run from an ubuntu-live cd to format my drive with Master Boot Record (being conscious of the fact that this way I will lose all my data, which I have saved on an external drive before, and that my Ubuntu won't work anymore afterwards), creating partitions for Windows (NTFS), personal data (FAT, since as far as I know both Ubuntu and Windows can deal with this), a Swap partition for Linux, and one partition for Ubuntu (ext4); trying to install Win XP from cd gives me a blue screen, which stops the setup and telling me to remove all recently installed drives and to run CHKDSK. So I thought, that maybe Windows doesn't like pre-partitioned drives for its installation and thus I need to re-format my hard drive in order to have a completely "new" drive, which I can then, during the Windows-installation, partition in order to create the partitions I need. Trying to do this, though, the disk-utility run from the live-CD gives me this warning: Error creating partition table: helper exited with exit code 1: In part_create_partition_table: device_file=/dev/sda, scheme=0 got it got disk committed to disk BLKRRPART ioctl failed for /dev/sda: Device or resource busy I do not understand why it tells me that the hard-drive is busy, because, as stated above, I am doing all this from a live-CD. Thus, my questions are: How can I resolve the error given by the disk utility? Does it make sense to use four partitions in the way mentioned above? And if not so, which partitions should I create? Can I, theoretically, partition my drive from an Ubuntu live-cd in order to create the partitions I want and to install first Windows and then Ubuntu? Thanks for any help, David

    Read the article

  • Test disk recovery

    - by AIB
    I had a 250GB hard disk having several NTFS partitions. The disk was a dynamic disk (created in windows). Now when I formatted windows (which was in another disk), the dynamic disk is shown as offline. I tried using the testdisk tool to recover the data and created a partial backup. Testdisk is able to list all partitions in the disk. All partitions are shown as type 'D' (Deleted). I want to change the 'D' to 'P' (Primary), 'L'(Logical), 'E' (Extended) appropriately and build a new partition table. If I can write the partition table to disk, the disk will be of 'basic' type and should be readable in all OS. What should be the appropriate partition types? I checked the files on the partitions and no OS was ound. So none of the partitions were bootable. Will randomly selecting P,L,E hurt the data in anyway?

    Read the article

  • Ubuntu 13.10 software raid

    - by Piotr Belniak
    I had already Ubuntu OS installed on my desktop PC, where the software RAID 5 is configured ( 3 partitions /, swap and home ). This system was upgraded from the 11.04 till 13.04, it was quite messy, so I decided to install fresh system on existing partitions. 1st of all i found that there is no alternate version of the installer ( which i used to create previous installation ), so i stared with the regular image. I installed mdadm tools, assemble the partitions - fdisk are showing them properly - so i'm starting the installation - and everything i going fine until the GRUB instalation - this part fails - regardless of which partition i use as a target. From the other hand, neither OpenSUse and Ubuntu 12.04 alternate does not have any problems with installing the GRUB - on this configuration, unfortunatelly Ubuntu 12.04 - 12.10 upgrade is failing bacause of some Xorg issues ;(. Maybe someone has an experience with installation of ubuntu 13.10 GRUB on the RAID 5 partitions - and could give me a hint, how to solve my problem. Thanks in advance, Piotr

    Read the article

  • There are no drives listed during windows 7 system recovery

    - by Kragen
    I'm trying to use the Windows 7 system recovery disk to repair a boot sector, however I'm finding that when I boot the recovery disk, it doesn't list / mount any of my disk partitions, and so I can't perform the recovery. The partitions are all NTFS formatted, and the drivers used to read the disks all seem to be fairly straightforward Microsoft drivers, so I shouldn't need to load any extra drivers to see my partitions (its a Dell Latitude D530) Diskpart correctly lists the partitions (complete with labels) - it just that when I attempt to switch to that partition it gives me the "This partition does not contain a recognised file system" message. Has anyone got any idea how I can work out why my partitions are not visible?

    Read the article

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