Splitting across multiple files

I am creating large, image-heavy documents, in the zone of 40+ pages with at least 10-11 embedded PDF files (equations from LaTexiT and images from Grapher, mostly) per page. The individual files are not large, but having so many seems to make opening the files a very slow process.
I could save each of my sections as a separate file, as I usually only need one section at a time, but I'd be sad to lose things like self-updating page counts and page numbers. But is it possible to split large Pages documents across multiple files, at least for that sort of purpose? I've seen PDF files that do this (textbooks and other enormous documents).

No, I'm afraid that is not possible. You could save them as individual files and then update the first page number in each document manually though.

Similar Messages

  • Why does a mail-merge in MS Publisher split into multiple files when printed as a pdf file?

    Why does a mail-merge in MS Publisher split into multiple files when printed as a pdf file?

    'Cuz that's what mail merges do.  They create multiple documents based on the parent doc and all the names/addresses in your data tables.
    Perhaps if you describe exactly what you're trying to do & why you need PDF, we can point you to relevant tutorials.
    Nancy O.

  • Does a Flash library symbol search extension exist that can search across multiple files?

    Hi, I'm working on a large animation project with an extensive symbol library that exists across multiple files. I would like to know if such a tool exists that can search between all of these files for specific symbols. This would save me a great deal of time and I would be very grateful for any suggestions. We are using Flash CS5 primarily. Thanks.

    Thanks! I appriciate you confirming this for me

  • Updating a variable across multiple files in a book

    Hi guys,
    I have a book file with multiple files (prelim pages and chapters). In the header of each prelim page and chapter file I'm using a variable. How can I make a simple change to the variable and update it across all files that use it? I've tried looking through the menus and opening all files but I can't see any method of making a global change.
    Advice appreciated.
    Cheers
    Carl

    How about File > Import formats …
    1. make a new file (source) where you define just the variable you want to copy to other files (targets)
    2. import that variable from the source file into the target files
    When all the target files are in a .book, you can select them in the book and then use File > Import formats. Otherwise, the same command from inside each target – but you can always make a dummy .book referencing all the target files.
    Setting up a source file first means you can work with only the variables you want to, if you have some that change per chapter and others that stay the same throughout the book.
    N
    [ps] Watch out for the default behaviour of the Import from Document pulldown, which sets itself determinedly to "current file"

  • How do i extract annotated pages across multiple files?

    I use Acrobat XI standard. I am a lawyer doing cases with multiple PDFs. I annotate the pdfs when a witness speaks to a page. How can I extract pages that I have made annotation on into a separate file?

    Hi Charlie Manzoni,
    Please refer this thread link (Converting a single 2 page doc into 2 separate 1 page docs ) where i have posted the procedure to extract pages from a pdf into a separate file.
    Please revert back if you have any query or need any further assistance on this issue.
    Regards,
    Rahul Tyagi

  • Printing to PDF - Acrobat Splits Into Multiple Files - ERROR

    Good Afternoon,
    I have an excel document of 20 tabs... when I print preview the document, I have twenty pages, and it prints as one document (20 pages.)
    When I print to PDF (selecting Adobe as my printer) the Save As dialogue box comes up, as it should. After saving the PDF, it only saves half the pages in the file and a SECOND dialogue box comes up. The result is two PDF documents, each with half my tabs.
    I have looked all over excel to find a reason this is... why would Adobe want to split my document for me? It is really annoying to have to combine the PDFs after the fact. What can I do to resolve this?

    Excel (not Acrobat) creates separate print job when worksheets in a book have different page setup option.
    So check the page setup options for each sheet in the book and ensure they are the same.

  • Ezsetfacl.sh - Mini configuration agent, setfacl across multiple files

    -Introduction-
    ezsetfacl.sh can edit configuration files, can manipulate file properties(permissions, modes, attributes etc)
    ezsetfacl.sh supports syntax/logical error detection in file list
    The script is intended to be run as root, but for demo/testing purposes, it's run as a non-root user in this article
    Current version : http://pastebin.com/JpScZMbQ          http://pastebin.com/raw.php?i=JpScZMbQ(RAW)
    This is the previous version : https://bbs.archlinux.org/viewtopic.php?id=173905
    This version is basically an enchanced one, but this is much more functional and usable than the first one, I think it deserves a new thread
    -Note-
    ezsetfacl.sh is still in testing state, use "setfacl -g [filelist]" and check all generated commands yourself before actually applying permissions
    -Update-
    (27/2/2014) Added "chmod" block and "chown" block, modified statistics list a bit.
    (28/2/2014) Added "chattr" block, added related lines to statistics list.
    (15/3/2014) Added APPEND, INSERT and REPLACE blocks, mainly for configuring config files. Will add to statistics list later.
    (17/3/2014) Added COMMAND block, for executing commands, no syntax checks. Will add to statistics list later. Now it's more like a configuration manager/agent thingy.
    (7/5/2014) Bug fixes. Added tea.
    (19/9/2014) Bug fixes. Enhanced input sanitisation, allowed file name stitching(e.g. this\ is\ a\ file), auto stitching file names is also available. Multiple <END can now be processed properly.
    (20/9/2014) Added Sourceforge page.(See below)
    -Notes-
    Error detection still requires improvement
    -Limitations-
    Logical and physical option for recursive setfacl are not yet available
    Sourceforge page : https://sourceforge.net/projects/ezsetfaclsh/
    Detailed explanation on the options : http://pastebin.com/1QLSFPkD          http://pastebin.com/raw.php?i=1QLSFPkD(RAW)
    Examples : http://pastebin.com/KQcNXVSW          http://pastebin.com/raw.php?i=KQcNXVSW(RAW)
    Any feedback is welcome!
    Last edited by darrenldl (2014-09-20 03:09:46)

    Ah, well...indeed. Basically, these three owners are volatile...I have one for EM (which is pretty static), one for databases ( ~oracle gets "rm -rf"-ed about twice annually), and one for AS (~oracleas gets "rm -rf"-ed twice annually, but on a different 'schedule' if we can call it that).

  • Sample accurate editing across multiple files

    I'm editing a podcast and need to use zero-crossing points to make inaudible edits.
    I have two vocal tracks, in sync, and want to be able to select zero-crossings in one and then ripple delete (e.g. to remove a word), applying that same edit to the other track so that everything stays in sync.
    Obviously I can do this by selecting both tracks and using the timeslice tool - but that won't find zero crossings. I can find the crossings in the wavefile editor, but I don't know how to copy those edits to more than one track.
    I'm sure this is obvious - I feel as if I'm missing something. I need help.

    Here's just a thought on how I would approach that.
    In the multi-track, I'd pan one track hard left and the other hard right, then export as a single stereo track. Then bring that back in as an audio file project, make all the edits you want, save it, then split the stereo track back into two mono tracks at the end of the edit process.
    Hope that'll help!
    Matt

  • Splitting to multiple files in file adaptor when it's more than 100 records

    Hi,
    I have a scenario where I'm generating a xml file to the receiver using file adaptor I need to write 100 records per file, if it's more than 100 then I need to write into a different file, to say I need to have 100 records per file.
    ABAP Proxy > PI- >File
    Any help is really appreciated.
    Thanks,
    Joe.P

    Hi Joe,
    What is your source structure and what is your destination structure?
    You can go the ABAP proxy route but then your control is not in the integration layer but in the business system.  But if you prefer it, here's some code outlined:
    data:
    index type i,
    lcl_proxy type ref to ZCL_Proxy.
    i = 0.
    try.
    loop at lt_recordset into ls_record.
    append ls_record to lt_output.
    index = index+1.
    if index = 100.
    create object lcl_proxy.
    lcl_proxy->execute_asynchronous(output = lt_output).
    index = 0.
    clear lt_output.
    endif.
    end loop.
    if index>0.
    create object lcl_proxy.
    lcl_proxy->execute_asynchronous(output = lt_output).
    endif.
    catch CX_ROOT.
    endtry.
    commit-work.

  • Changing Styles Across Multiple Files

    We have a lengthy catalog that we build in spreads. We don't make a book file, since the pages are all sent individually to our prepress people, and we also have pages that copywriters use to create the copy in the first place.
    Every piece of copy in this book is set up on character and paragraph styles. We start with a master template, so all the styles have the same names.
    We're almost done with the whole thing, and then today we find out from the Office of Secret Self-Important Ivory Towers that they have chosen new fonts for us and not told us what they are until now, so now we have to change every single font from the top down.
    Is there any way to synchronize the styles without building a book file? It's not the end of the world if that's what we have to do, but it won't work for the writers' files, and it's going to require a lot of manual tweaking to keep it from shuffling pages everywhere.
    We're on CS4, by the way.

    If all of your documents share the same style names, then you can do this relatively easily without using the book features.
    Although it is easier to do this by using the book features, what you need to do is open the document that you consider to be your source or master document. Make all the style changes as needed and save it.
    Open the next document.
    Go to the Paragraph Style panel
    In the panel menu, select Load All Text Styles... (this loads Paragraph and Character styles)
    Select the master document.
    Allow the incoming styles to override any existing styles of the same name.
    Cleanup any text as needed, save and close.
    Repeat for all other documents.
    If you have object styles, use the same proceedure with the object style panel.
    If you have swatches that change, you can Save Swatches from the master file, then Load Swatches in the other files.
    Note: this would be far easier to do by temporarily adding all the documents to a book (be sure to disable any auto page numbering in the book) and then Sync from the book panel.
    HTH
    -mt

  • Assigning default applications across multiple file types

    I prefer to use VLC to watch video files, but I keep running into different file types that are still set to have Quicktime open them. Is there any way to quickly set whatever file types I want to open by default with VLC? Or any program for that matter?

    Has anyone noticed that recently this doesn't always seem to work?
    I have a webloc file for BBC Radio 4. (*) I have set the "Open with" to open it with Real Player, rather than Safari (which is set as the default browser). When the file is double clicked, it still opens with Safari.
    This behaviour seems to since 10.5.8, since I had a Hot Key set to open the file and it worked fine before.
    Any ideas?
    (*) this url should display on one line:
    http://www.bbc.co.uk/radio/aod/mainframe.shtml?http://www.bbc.co.uk/radio/aod/ra dio4.shtml?listen

  • Split SQR output into multiple files And Rename each file.

    Greetings!
    We ran into scenario where we need to split an SQR output (PDF) split into multiple files (each page , each file). More over the out put has to be renamed with EMPLID.
    It is for printing Advices, where we run DDP003 to print all of them, Our requirement needs to have one PDF file for each employee to placed into a shared drive OR to be emailed.
    I was thinking of running the same process in a loop individually, but this is resource intensive. Is there any way we can batch run this SQR process and split into each page (each paychek comes to one page),
    AND
    I need them renamed by SQR as it creates them, Each file would be names as EMPLID.
    This is all in alternative to run process individually by employee , via self service. to not to over laod Process scheduler server.
    Can anyone help me how can we get these thigns done in SQR?
    Thanks in advance.

    You can use the SQR command new-report for each employee which closes the current report output file and opens a new one with the specified file name (e.g. EMPLID).

  • Sliding Window Table Partitioning Problems with RANGE RIGHT, SPLIT, MERGE using Multiple File Groups

    There is misleading information in two system views (sys.data_spaces & sys.destination_data_spaces) about the physical location of data after a partitioning MERGE and before an INDEX REBUILD operation on a partitioned table. In SQL Server 2012 SP1 CU6,
    the script below (SQLCMD mode, set DataDrive  & LogDrive variables  for the runtime environment) will create a test database with file groups and files to support a partitioned table. The partition function and scheme spread the test data across
    4 files groups, an empty partition, file group and file are maintained at the start and end of the range. A problem occurs after the SWITCH and MERGE RANGE operations, the views sys.data_spaces & sys.destination_data_spaces show the logical, not the physical,
    location of data.
    --=================================================================================
    -- PartitionLabSetup_RangeRight.sql
    -- 001. Create test database
    -- 002. Add file groups and files
    -- 003. Create partition function and schema
    -- 004. Create and populate a test table
    --=================================================================================
    USE [master]
    GO
    -- 001 - Create Test Database
    :SETVAR DataDrive "D:\SQL\Data\"
    :SETVAR LogDrive "D:\SQL\Logs\"
    :SETVAR DatabaseName "workspace"
    :SETVAR TableName "TestTable"
    -- Drop if exists and create Database
    IF DATABASEPROPERTYEX(N'$(databasename)','Status') IS NOT NULL
    BEGIN
    ALTER DATABASE $(DatabaseName) SET SINGLE_USER WITH ROLLBACK IMMEDIATE
    DROP DATABASE $(DatabaseName)
    END
    CREATE DATABASE $(DatabaseName)
    ON
    ( NAME = $(DatabaseName)_data,
    FILENAME = N'$(DataDrive)$(DatabaseName)_data.mdf',
    SIZE = 10,
    MAXSIZE = 500,
    FILEGROWTH = 5 )
    LOG ON
    ( NAME = $(DatabaseName)_log,
    FILENAME = N'$(LogDrive)$(DatabaseName).ldf',
    SIZE = 5MB,
    MAXSIZE = 5000MB,
    FILEGROWTH = 5MB ) ;
    GO
    -- 002. Add file groups and files
    --:SETVAR DatabaseName "workspace"
    --:SETVAR TableName "TestTable"
    --:SETVAR DataDrive "D:\SQL\Data\"
    --:SETVAR LogDrive "D:\SQL\Logs\"
    DECLARE @nSQL NVARCHAR(2000) ;
    DECLARE @x INT = 1;
    WHILE @x <= 6
    BEGIN
    SELECT @nSQL =
    'ALTER DATABASE $(DatabaseName)
    ADD FILEGROUP $(TableName)_fg' + RTRIM(CAST(@x AS CHAR(5))) + ';
    ALTER DATABASE $(DatabaseName)
    ADD FILE
    NAME= ''$(TableName)_f' + CAST(@x AS CHAR(5)) + ''',
    FILENAME = ''$(DataDrive)\$(TableName)_f' + RTRIM(CAST(@x AS CHAR(5))) + '.ndf''
    TO FILEGROUP $(TableName)_fg' + RTRIM(CAST(@x AS CHAR(5))) + ';'
    EXEC sp_executeSQL @nSQL;
    SET @x = @x + 1;
    END
    -- 003. Create partition function and schema
    --:SETVAR TableName "TestTable"
    --:SETVAR DatabaseName "workspace"
    USE $(DatabaseName);
    CREATE PARTITION FUNCTION $(TableName)_func (int)
    AS RANGE RIGHT FOR VALUES
    0,
    15,
    30,
    45,
    60
    CREATE PARTITION SCHEME $(TableName)_scheme
    AS
    PARTITION $(TableName)_func
    TO
    $(TableName)_fg1,
    $(TableName)_fg2,
    $(TableName)_fg3,
    $(TableName)_fg4,
    $(TableName)_fg5,
    $(TableName)_fg6
    -- Create TestTable
    --:SETVAR TableName "TestTable"
    --:SETVAR BackupDrive "D:\SQL\Backups\"
    --:SETVAR DatabaseName "workspace"
    CREATE TABLE [dbo].$(TableName)(
    [Partition_PK] [int] NOT NULL,
    [GUID_PK] [uniqueidentifier] NOT NULL,
    [CreateDate] [datetime] NULL,
    [CreateServer] [nvarchar](50) NULL,
    [RandomNbr] [int] NULL,
    CONSTRAINT [PK_$(TableName)] PRIMARY KEY CLUSTERED
    [Partition_PK] ASC,
    [GUID_PK] ASC
    ) ON $(TableName)_scheme(Partition_PK)
    ) ON $(TableName)_scheme(Partition_PK)
    ALTER TABLE [dbo].$(TableName) ADD CONSTRAINT [DF_$(TableName)_GUID_PK] DEFAULT (newid()) FOR [GUID_PK]
    ALTER TABLE [dbo].$(TableName) ADD CONSTRAINT [DF_$(TableName)_CreateDate] DEFAULT (getdate()) FOR [CreateDate]
    ALTER TABLE [dbo].$(TableName) ADD CONSTRAINT [DF_$(TableName)_CreateServer] DEFAULT (@@servername) FOR [CreateServer]
    -- 004. Create and populate a test table
    -- Load TestTable Data - Seconds 0-59 are used as the Partitoning Key
    --:SETVAR TableName "TestTable"
    SET NOCOUNT ON;
    DECLARE @Now DATETIME = GETDATE()
    WHILE @Now > DATEADD(minute,-1,GETDATE())
    BEGIN
    INSERT INTO [dbo].$(TableName)
    ([Partition_PK]
    ,[RandomNbr])
    VALUES
    DATEPART(second,GETDATE())
    ,ROUND((RAND() * 100),0)
    END
    -- Confirm table partitioning - http://lextonr.wordpress.com/tag/sys-destination_data_spaces/
    SELECT
    N'DatabaseName' = DB_NAME()
    , N'SchemaName' = s.name
    , N'TableName' = o.name
    , N'IndexName' = i.name
    , N'IndexType' = i.type_desc
    , N'PartitionScheme' = ps.name
    , N'DataSpaceName' = ds.name
    , N'DataSpaceType' = ds.type_desc
    , N'PartitionFunction' = pf.name
    , N'PartitionNumber' = dds.destination_id
    , N'BoundaryValue' = prv.value
    , N'RightBoundary' = pf.boundary_value_on_right
    , N'PartitionFileGroup' = ds2.name
    , N'RowsOfData' = p.[rows]
    FROM
    sys.objects AS o
    INNER JOIN sys.schemas AS s
    ON o.[schema_id] = s.[schema_id]
    INNER JOIN sys.partitions AS p
    ON o.[object_id] = p.[object_id]
    INNER JOIN sys.indexes AS i
    ON p.[object_id] = i.[object_id]
    AND p.index_id = i.index_id
    INNER JOIN sys.data_spaces AS ds
    ON i.data_space_id = ds.data_space_id
    INNER JOIN sys.partition_schemes AS ps
    ON ds.data_space_id = ps.data_space_id
    INNER JOIN sys.partition_functions AS pf
    ON ps.function_id = pf.function_id
    LEFT OUTER JOIN sys.partition_range_values AS prv
    ON pf.function_id = prv.function_id
    AND p.partition_number = prv.boundary_id
    LEFT OUTER JOIN sys.destination_data_spaces AS dds
    ON ps.data_space_id = dds.partition_scheme_id
    AND p.partition_number = dds.destination_id
    LEFT OUTER JOIN sys.data_spaces AS ds2
    ON dds.data_space_id = ds2.data_space_id
    ORDER BY
    DatabaseName
    ,SchemaName
    ,TableName
    ,IndexName
    ,PartitionNumber
    --=================================================================================
    -- SECTION 2 - SWITCH OUT
    -- 001 - Create TestTableOut
    -- 002 - Switch out partition in range 0-14
    -- 003 - Merge range 0 -29
    -- 001. TestTableOut
    :SETVAR TableName "TestTable"
    IF OBJECT_ID('dbo.$(TableName)Out') IS NOT NULL
    DROP TABLE [dbo].[$(TableName)Out]
    CREATE TABLE [dbo].[$(TableName)Out](
    [Partition_PK] [int] NOT NULL,
    [GUID_PK] [uniqueidentifier] NOT NULL,
    [CreateDate] [datetime] NULL,
    [CreateServer] [nvarchar](50) NULL,
    [RandomNbr] [int] NULL,
    CONSTRAINT [PK_$(TableName)Out] PRIMARY KEY CLUSTERED
    [Partition_PK] ASC,
    [GUID_PK] ASC
    ) ON $(TableName)_fg2;
    GO
    -- 002 - Switch out partition in range 0-14
    --:SETVAR TableName "TestTable"
    ALTER TABLE dbo.$(TableName)
    SWITCH PARTITION 2 TO dbo.$(TableName)Out;
    -- 003 - Merge range 0 - 29
    --:SETVAR TableName "TestTable"
    ALTER PARTITION FUNCTION $(TableName)_func()
    MERGE RANGE (15);
    -- Confirm table partitioning
    -- Original source of this query - http://lextonr.wordpress.com/tag/sys-destination_data_spaces/
    SELECT
    N'DatabaseName' = DB_NAME()
    , N'SchemaName' = s.name
    , N'TableName' = o.name
    , N'IndexName' = i.name
    , N'IndexType' = i.type_desc
    , N'PartitionScheme' = ps.name
    , N'DataSpaceName' = ds.name
    , N'DataSpaceType' = ds.type_desc
    , N'PartitionFunction' = pf.name
    , N'PartitionNumber' = dds.destination_id
    , N'BoundaryValue' = prv.value
    , N'RightBoundary' = pf.boundary_value_on_right
    , N'PartitionFileGroup' = ds2.name
    , N'RowsOfData' = p.[rows]
    FROM
    sys.objects AS o
    INNER JOIN sys.schemas AS s
    ON o.[schema_id] = s.[schema_id]
    INNER JOIN sys.partitions AS p
    ON o.[object_id] = p.[object_id]
    INNER JOIN sys.indexes AS i
    ON p.[object_id] = i.[object_id]
    AND p.index_id = i.index_id
    INNER JOIN sys.data_spaces AS ds
    ON i.data_space_id = ds.data_space_id
    INNER JOIN sys.partition_schemes AS ps
    ON ds.data_space_id = ps.data_space_id
    INNER JOIN sys.partition_functions AS pf
    ON ps.function_id = pf.function_id
    LEFT OUTER JOIN sys.partition_range_values AS prv
    ON pf.function_id = prv.function_id
    AND p.partition_number = prv.boundary_id
    LEFT OUTER JOIN sys.destination_data_spaces AS dds
    ON ps.data_space_id = dds.partition_scheme_id
    AND p.partition_number = dds.destination_id
    LEFT OUTER JOIN sys.data_spaces AS ds2
    ON dds.data_space_id = ds2.data_space_id
    ORDER BY
    DatabaseName
    ,SchemaName
    ,TableName
    ,IndexName
    ,PartitionNumber  
    The table below shows the results of the ‘Confirm Table Partitioning’ query, before and after the MERGE.
    The T-SQL code below illustrates the problem.
    -- PartitionLab_RangeRight
    USE workspace;
    DROP TABLE dbo.TestTableOut;
    USE master;
    ALTER DATABASE workspace
    REMOVE FILE TestTable_f3 ;
    -- ERROR
    --Msg 5042, Level 16, State 1, Line 1
    --The file 'TestTable_f3 ' cannot be removed because it is not empty.
    ALTER DATABASE workspace
    REMOVE FILE TestTable_f2 ;
    -- Works surprisingly!!
    use workspace;
    ALTER INDEX [PK_TestTable] ON [dbo].[TestTable] REBUILD PARTITION = 2;
    --Msg 622, Level 16, State 3, Line 2
    --The filegroup "TestTable_fg2" has no files assigned to it. Tables, indexes, text columns, ntext columns, and image columns cannot be populated on this filegroup until a file is added.
    --The statement has been terminated.
    If you run ALTER INDEX REBUILD before trying to remove files from File Group 3, it works. Rerun the database setup script then the code below.
    -- RANGE RIGHT
    -- Rerun PartitionLabSetup_RangeRight.sql before the code below
    USE workspace;
    DROP TABLE dbo.TestTableOut;
    ALTER INDEX [PK_TestTable] ON [dbo].[TestTable] REBUILD PARTITION = 2;
    USE master;
    ALTER DATABASE workspace
    REMOVE FILE TestTable_f3;
    -- Works as expected!!
    The file in File Group 2 appears to contain data but it can be dropped. Although the system views are reporting the data in File Group 2, it still physically resides in File Group 3 and isn’t moved until the index is rebuilt. The RANGE RIGHT function means
    the left file group (File Group 2) is retained when splitting ranges.
    RANGE LEFT would have retained the data in File Group 3 where it already resided, no INDEX REBUILD is necessary to effectively complete the MERGE operation. The script below implements the same partitioning strategy (data distribution between partitions)
    on the test table but uses different boundary definitions and RANGE LEFT.
    --=================================================================================
    -- PartitionLabSetup_RangeLeft.sql
    -- 001. Create test database
    -- 002. Add file groups and files
    -- 003. Create partition function and schema
    -- 004. Create and populate a test table
    --=================================================================================
    USE [master]
    GO
    -- 001 - Create Test Database
    :SETVAR DataDrive "D:\SQL\Data\"
    :SETVAR LogDrive "D:\SQL\Logs\"
    :SETVAR DatabaseName "workspace"
    :SETVAR TableName "TestTable"
    -- Drop if exists and create Database
    IF DATABASEPROPERTYEX(N'$(databasename)','Status') IS NOT NULL
    BEGIN
    ALTER DATABASE $(DatabaseName) SET SINGLE_USER WITH ROLLBACK IMMEDIATE
    DROP DATABASE $(DatabaseName)
    END
    CREATE DATABASE $(DatabaseName)
    ON
    ( NAME = $(DatabaseName)_data,
    FILENAME = N'$(DataDrive)$(DatabaseName)_data.mdf',
    SIZE = 10,
    MAXSIZE = 500,
    FILEGROWTH = 5 )
    LOG ON
    ( NAME = $(DatabaseName)_log,
    FILENAME = N'$(LogDrive)$(DatabaseName).ldf',
    SIZE = 5MB,
    MAXSIZE = 5000MB,
    FILEGROWTH = 5MB ) ;
    GO
    -- 002. Add file groups and files
    --:SETVAR DatabaseName "workspace"
    --:SETVAR TableName "TestTable"
    --:SETVAR DataDrive "D:\SQL\Data\"
    --:SETVAR LogDrive "D:\SQL\Logs\"
    DECLARE @nSQL NVARCHAR(2000) ;
    DECLARE @x INT = 1;
    WHILE @x <= 6
    BEGIN
    SELECT @nSQL =
    'ALTER DATABASE $(DatabaseName)
    ADD FILEGROUP $(TableName)_fg' + RTRIM(CAST(@x AS CHAR(5))) + ';
    ALTER DATABASE $(DatabaseName)
    ADD FILE
    NAME= ''$(TableName)_f' + CAST(@x AS CHAR(5)) + ''',
    FILENAME = ''$(DataDrive)\$(TableName)_f' + RTRIM(CAST(@x AS CHAR(5))) + '.ndf''
    TO FILEGROUP $(TableName)_fg' + RTRIM(CAST(@x AS CHAR(5))) + ';'
    EXEC sp_executeSQL @nSQL;
    SET @x = @x + 1;
    END
    -- 003. Create partition function and schema
    --:SETVAR TableName "TestTable"
    --:SETVAR DatabaseName "workspace"
    USE $(DatabaseName);
    CREATE PARTITION FUNCTION $(TableName)_func (int)
    AS RANGE LEFT FOR VALUES
    -1,
    14,
    29,
    44,
    59
    CREATE PARTITION SCHEME $(TableName)_scheme
    AS
    PARTITION $(TableName)_func
    TO
    $(TableName)_fg1,
    $(TableName)_fg2,
    $(TableName)_fg3,
    $(TableName)_fg4,
    $(TableName)_fg5,
    $(TableName)_fg6
    -- Create TestTable
    --:SETVAR TableName "TestTable"
    --:SETVAR BackupDrive "D:\SQL\Backups\"
    --:SETVAR DatabaseName "workspace"
    CREATE TABLE [dbo].$(TableName)(
    [Partition_PK] [int] NOT NULL,
    [GUID_PK] [uniqueidentifier] NOT NULL,
    [CreateDate] [datetime] NULL,
    [CreateServer] [nvarchar](50) NULL,
    [RandomNbr] [int] NULL,
    CONSTRAINT [PK_$(TableName)] PRIMARY KEY CLUSTERED
    [Partition_PK] ASC,
    [GUID_PK] ASC
    ) ON $(TableName)_scheme(Partition_PK)
    ) ON $(TableName)_scheme(Partition_PK)
    ALTER TABLE [dbo].$(TableName) ADD CONSTRAINT [DF_$(TableName)_GUID_PK] DEFAULT (newid()) FOR [GUID_PK]
    ALTER TABLE [dbo].$(TableName) ADD CONSTRAINT [DF_$(TableName)_CreateDate] DEFAULT (getdate()) FOR [CreateDate]
    ALTER TABLE [dbo].$(TableName) ADD CONSTRAINT [DF_$(TableName)_CreateServer] DEFAULT (@@servername) FOR [CreateServer]
    -- 004. Create and populate a test table
    -- Load TestTable Data - Seconds 0-59 are used as the Partitoning Key
    --:SETVAR TableName "TestTable"
    SET NOCOUNT ON;
    DECLARE @Now DATETIME = GETDATE()
    WHILE @Now > DATEADD(minute,-1,GETDATE())
    BEGIN
    INSERT INTO [dbo].$(TableName)
    ([Partition_PK]
    ,[RandomNbr])
    VALUES
    DATEPART(second,GETDATE())
    ,ROUND((RAND() * 100),0)
    END
    -- Confirm table partitioning - http://lextonr.wordpress.com/tag/sys-destination_data_spaces/
    SELECT
    N'DatabaseName' = DB_NAME()
    , N'SchemaName' = s.name
    , N'TableName' = o.name
    , N'IndexName' = i.name
    , N'IndexType' = i.type_desc
    , N'PartitionScheme' = ps.name
    , N'DataSpaceName' = ds.name
    , N'DataSpaceType' = ds.type_desc
    , N'PartitionFunction' = pf.name
    , N'PartitionNumber' = dds.destination_id
    , N'BoundaryValue' = prv.value
    , N'RightBoundary' = pf.boundary_value_on_right
    , N'PartitionFileGroup' = ds2.name
    , N'RowsOfData' = p.[rows]
    FROM
    sys.objects AS o
    INNER JOIN sys.schemas AS s
    ON o.[schema_id] = s.[schema_id]
    INNER JOIN sys.partitions AS p
    ON o.[object_id] = p.[object_id]
    INNER JOIN sys.indexes AS i
    ON p.[object_id] = i.[object_id]
    AND p.index_id = i.index_id
    INNER JOIN sys.data_spaces AS ds
    ON i.data_space_id = ds.data_space_id
    INNER JOIN sys.partition_schemes AS ps
    ON ds.data_space_id = ps.data_space_id
    INNER JOIN sys.partition_functions AS pf
    ON ps.function_id = pf.function_id
    LEFT OUTER JOIN sys.partition_range_values AS prv
    ON pf.function_id = prv.function_id
    AND p.partition_number = prv.boundary_id
    LEFT OUTER JOIN sys.destination_data_spaces AS dds
    ON ps.data_space_id = dds.partition_scheme_id
    AND p.partition_number = dds.destination_id
    LEFT OUTER JOIN sys.data_spaces AS ds2
    ON dds.data_space_id = ds2.data_space_id
    ORDER BY
    DatabaseName
    ,SchemaName
    ,TableName
    ,IndexName
    ,PartitionNumber
    --=================================================================================
    -- SECTION 2 - SWITCH OUT
    -- 001 - Create TestTableOut
    -- 002 - Switch out partition in range 0-14
    -- 003 - Merge range 0 -29
    -- 001. TestTableOut
    :SETVAR TableName "TestTable"
    IF OBJECT_ID('dbo.$(TableName)Out') IS NOT NULL
    DROP TABLE [dbo].[$(TableName)Out]
    CREATE TABLE [dbo].[$(TableName)Out](
    [Partition_PK] [int] NOT NULL,
    [GUID_PK] [uniqueidentifier] NOT NULL,
    [CreateDate] [datetime] NULL,
    [CreateServer] [nvarchar](50) NULL,
    [RandomNbr] [int] NULL,
    CONSTRAINT [PK_$(TableName)Out] PRIMARY KEY CLUSTERED
    [Partition_PK] ASC,
    [GUID_PK] ASC
    ) ON $(TableName)_fg2;
    GO
    -- 002 - Switch out partition in range 0-14
    --:SETVAR TableName "TestTable"
    ALTER TABLE dbo.$(TableName)
    SWITCH PARTITION 2 TO dbo.$(TableName)Out;
    -- 003 - Merge range 0 - 29
    :SETVAR TableName "TestTable"
    ALTER PARTITION FUNCTION $(TableName)_func()
    MERGE RANGE (14);
    -- Confirm table partitioning
    -- Original source of this query - http://lextonr.wordpress.com/tag/sys-destination_data_spaces/
    SELECT
    N'DatabaseName' = DB_NAME()
    , N'SchemaName' = s.name
    , N'TableName' = o.name
    , N'IndexName' = i.name
    , N'IndexType' = i.type_desc
    , N'PartitionScheme' = ps.name
    , N'DataSpaceName' = ds.name
    , N'DataSpaceType' = ds.type_desc
    , N'PartitionFunction' = pf.name
    , N'PartitionNumber' = dds.destination_id
    , N'BoundaryValue' = prv.value
    , N'RightBoundary' = pf.boundary_value_on_right
    , N'PartitionFileGroup' = ds2.name
    , N'RowsOfData' = p.[rows]
    FROM
    sys.objects AS o
    INNER JOIN sys.schemas AS s
    ON o.[schema_id] = s.[schema_id]
    INNER JOIN sys.partitions AS p
    ON o.[object_id] = p.[object_id]
    INNER JOIN sys.indexes AS i
    ON p.[object_id] = i.[object_id]
    AND p.index_id = i.index_id
    INNER JOIN sys.data_spaces AS ds
    ON i.data_space_id = ds.data_space_id
    INNER JOIN sys.partition_schemes AS ps
    ON ds.data_space_id = ps.data_space_id
    INNER JOIN sys.partition_functions AS pf
    ON ps.function_id = pf.function_id
    LEFT OUTER JOIN sys.partition_range_values AS prv
    ON pf.function_id = prv.function_id
    AND p.partition_number = prv.boundary_id
    LEFT OUTER JOIN sys.destination_data_spaces AS dds
    ON ps.data_space_id = dds.partition_scheme_id
    AND p.partition_number = dds.destination_id
    LEFT OUTER JOIN sys.data_spaces AS ds2
    ON dds.data_space_id = ds2.data_space_id
    ORDER BY
    DatabaseName
    ,SchemaName
    ,TableName
    ,IndexName
    ,PartitionNumber
    The table below shows the results of the ‘Confirm Table Partitioning’ query, before and after the MERGE.
    The data in the File and File Group to be dropped (File Group 2) has already been switched out; File Group 3 contains the data so no index rebuild is needed to move data and complete the MERGE.
    RANGE RIGHT would not be a problem in a ‘Sliding Window’ if the same file group is used for all partitions, when they are created and dropped it introduces a dependency on full index rebuilds. Larger tables are typically partitioned and a full index rebuild
    might be an expensive operation. I’m not sure how a RANGE RIGHT partitioning strategy could be implemented, with an ascending partitioning key, using multiple file groups without having to move data. Using a single file group (multiple files) for all partitions
    within a table would avoid physically moving data between file groups; no index rebuild would be necessary to complete a MERGE and system views would accurately reflect the physical location of data. 
    If a RANGE RIGHT partition function is used, the data is physically in the wrong file group after the MERGE assuming a typical ascending partitioning key, and the 'Data Spaces' system views might be misleading. Thanks to Manuj and Chris for a lot of help
    investigating this.
    NOTE 10/03/2014 - The solution
    The solution is so easy it's embarrassing, I was using the wrong boundary points for the MERGE (both RANGE LEFT & RANGE RIGHT) to get rid of historic data.
    -- Wrong Boundary Point Range Right
    --ALTER PARTITION FUNCTION $(TableName)_func()
    --MERGE RANGE (15);
    -- Wrong Boundary Point Range Left
    --ALTER PARTITION FUNCTION $(TableName)_func()
    --MERGE RANGE (14);
    -- Correct Boundary Pounts for MERGE
    ALTER PARTITION FUNCTION $(TableName)_func()
    MERGE RANGE (0); -- or -1 for RANGE LEFT
    The empty, switched out partition (on File Group 2) is then MERGED with the empty partition maintained at the start of the range and no data movement is necessary. I retract the suggestion that a problem exists with RANGE RIGHT Sliding Windows using multiple
    file groups and apologize :-)

    Hi Paul Brewer,
    Thanks for your post and glad to hear that the issue is resolved. It is kind of you post a reply to share your solution. That way, other community members could benefit from your sharing.
    Regards.
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Splitting playlist across multiple CDs

    Hi there,
    according to the itunes help file, it says that when a playlist is too big to burn onto one CD it splits it across multiple CDs. however whenever it completes part of the playlist and then asks for a blank CD, it begins to burn exactly the same thing that it did on the previous one without going onto the remaining songs. is there something that i've set incorrectly?
    thanks

    Don't trust that feature. Split your big list into separate playlists, making sure that each one is under 80 minutes playing time. Then burn them individually. (I assume it is audio CDs that you are burning.)

  • How do you split the print job across multiple printers to shorten the prin

    i
    Can any one you provide some information on below questions.
    Check printing by XML template (XML Publisher).
    1. When printing checks, how do you print the checks from one printer tray and the overflow remittance pages from another printer tray?
    2. When printing a large batch of checks using XML and PDF output, how do you split the print job across multiple printers to shorten the print time?
    I appreciate if you could give some information on above 2 questions.
    Regards,
    Ramarao.

    Probably sould just do them individually.
    How to get all the iWork apps, iPhoto, and iMovie for free on an eligible iPhone or iPad
    http://www.imore.com/how-get-all-iwork-apps-iphoto-and-imovie-free-eligible-ipho ne-or-ipad
    About Free Apple Apps for iOS 7 compatible devices
    http://support.apple.com/kb/HT5913
     Cheers, Tom

Maybe you are looking for

  • PDF Attachments are the same in a signed/encrypted email

    I made a java backend that runs on AIX and sends encrypted/signed emails with S/MIME with 4 different PDF files attached, but the ipad and the iphone show all the attached files all alike, the user sees the first pdf file and then when he tries to se

  • Back ground processing.,- reg.,

    Hi, guru's can anybody explain what is background processing? how do you initiate it? what is transaction code for it? Thanx in advance tulja singh

  • JComboBox event problem

    Hi , I have JComboBox in my application. I added action listener for this. When I set the values programmatically I don't want the code in the actionperformed to be executed. I can do it indirectly by using boolean flag for this, but I want to know i

  • Issues restoring back up

    I have updated my ipad to ios 7.0.4 but once synced on itunes, it remains on the "connect to itunes" page - can anyone help?

  • How to stop iPhoto launch when saving pictures in Safari?

    How do I stop iPhoto from automatically launching or coming to the front of the screen every time I want to save a picture I find using Safari?  It's incredibly annoying that each time I click to save one, iPhoto just jumps right into my face. Thanks