Answers

Question and Answer:

  Home  Sybase

⟩ How Do I Create A Partitioned Table That Spans Multiple Devices in Sybase?

Creating a partitioned table that spans multiple devices is a multi-step procedure. In this example, we assume the following:

* We want to create a new segment rather than using the default segment.

* We want to spread the partitioned table across three devices, data_dev1, data_dev2, and data_dev3.

Here are the steps:

1. Define a segment:

sp_addsegment newsegment, my_database,data_dev1

2. Extend the segment across all three devices:

sp_extendsegment newsegment, my_database, data_dev2

sp_extendsegment newsegment, my_database, data_dev3

3. Create the table on the segment:

create table my_table

(names, varchar(80) not null)

on newsegment

4. Partition the table:

alter table my_table partition 30

 163 views

More Questions for you: