11 Replies Latest reply on Jun 19, 2003 2:06 AM by Michael Morgan-Lee

    How to add raw device to sybase db?

    Pisanzio Paolo

      Hi i have pem 4.3.
      I have this db raw device structure:

      Sybase master device
      /dev/vx/rdsk/db/dbmaster 250MB of 300MB

      Stored procedures database
      /dev/vx/rdsk/db/vol01 200MB of 1500MB

      PATROL EM database
      /dev/vx/rdsk/db/vol01 1300MB of 1500MB

      Sybase tempdb database
      /dev/vx/rdsk/db/dbmaster 50MB of 300MB

      Transaction log EM database
      /dev/vx/rdsk/db/vol02 1000MB of 1000MB

      Dump device for PATROL EM database

      /dumpdb/agcdump 2000MB of 2000MB


      I want add new raw devices to enlarge the db database.
      How can i do it?
      I want to do raise double the space .
      Sybase master device from 250MB to 500 MB
      Stored procedures database 200MB to 400 MB
      PATROL EM database from 1300MB to 2600 MB
      Sybase tempdb database from 50 to 100 MB
      transaction log EM database from 1000MB to 2000 MB.

      How can add new raw devices and tell to sybase db that this are new devices to add for each db?

      Thank you

        • 1.
          Michael Morgan-Lee

          Hi,

          There are 3 things you will need to do

          1. Make sure you have available ' devices ' ...

          to find out how may you have you will need to log into isql and run

          sp_helpdevice

          This will then show you how many devices are already used and the device numbers associated with them.

          It is probable that you will need more devices so you will need to add more devices.
          to do this you need to to

          sp_confgiure "number of devices",10

          this will then increase the number of devices you can to 10 (I suppose you can increase this if needed , and also I thik you might have to restart sybase for this cnage to take effect !)

          The next thing you do then is to create new divces for your new raw partitions...

          to do this you need to put in the following command again in isql

          DISK INIT NAME = "agc_ext1", physname="[location of your raw device]",vedvno = , size = XXXX

          where Size = 2k pages !

          Then you need to expand your current databases (agc , master etc) onto the new device you have created...

          To do this you need to do the following again in isql

          alter database agc on <device> = x
          go

          Where <device> is the new device name you stated above in the DISK INIT command above. (in the example it woule be " agc_ext1 "

          and
          X = size in MB you want to use from the new device.

          Hope this helps

          Mike.

          • 2.
            Pisanzio Paolo

            Is there a gui tool for sybase db or pem that can do this job in user frendly way?

            • 3.
              Michael Morgan-Lee

              I am not aware of any GUI tool do any of this...there might be but I have never heared of it....

              Mike.

              • 4.
                Pisanzio Paolo

                Is there a limit about of size for each database?
                The Os is SunSolaris 2.8 on sun4u sparc SUNW,Ultra-80.
                I think ther's a limit of 2GB for each db.

                • 5.
                  Michael Morgan-Lee

                  There is only the initial 2 gig limit for the installation (according to BMC) and the subsequent devices I was told can be greater than 2 gig so if you have the space there should be no problem.

                  What I actually have is an initial agc / master / transaction log of about 1.8 Gig each (the log is 2 Gig)

                  I then created 4 extents of 2 Gig and added these to the AGC database.

                  I do not think there is a limit at all theoretically if there was the 2 gig limit you could just create as many devices as you liked (in multiples of 2 Gig) and then add them to the relevant database as required.

                  WARNING

                  If you want to set up PEM in a failover environment and there is any copying of the databases between the 2 PEM's the device names / sizes on both PEM servers need to be EXACTLY the same size. So you need to make sure that whatever you create on one PEM server....you replicate on the other PEM server....if not the database will not copy over correctly.

                  Mike.

                  • 6.
                    Pisanzio Paolo

                    1> sp_helpdevice
                    2> go
                    device_name physical_name
                    description
                    status cntrltype device_number
                    low
                    high
                    -


                    -



                             -



                             -


                    -


                    -



                             -



                             -



                    agcdump /dumpdb/agcdump
                    disk, dump device
                    16 2 0
                    0
                    0
                    agclog_segment /dev/vx/rdsk/db/vol02
                    special, dsync off, physical disk, 7900.00 MB
                    2 0 2
                    33554432
                    37599231
                    master d_master
                    special, dsync on, default disk, physical disk, 1850.00 MB
                    3 0 0
                    0
                    947199
                    sysprocsdev /dev/vx/rdsk/db/vol01
                    special, dsync on, physical disk, 8000.00 MB
                    16386 0 1
                    16777216
                    20873215

                    (4 rows affected)
                    (return status = 0)


                    This is my situation i want increase agc database with a new device of 2GB (/dev/vc/rdsk/db/vol05).
                    Can u show how can i do it?

                    • 7.

                      Out of interest why exactly do you want to increase the size of agc ?

                      • 8.
                        Pisanzio Paolo

                        Because is becaming full!!!!!!

                        • 9.
                          Michael Morgan-Lee

                          Nostradamus,

                          this is what you will need to do

                          1. Make sure you have enough devices

                          sp_helpdevice....

                          then I would increase the number of devices to 10 by running

                          sp_confgiure "number of devices",10

                          Once this is done then I would stop/start sybase

                          then type the following

                          DISK INIT NAME = "agc_ext1", physname="/dev/vc/rdsk/db/vol05",vedvno = 6, size =1024000000

                          This wil create a 2 Gig partition on /dev/vc/rdsk/db/vol05 called agc_ext1

                          Then you need to extend the agc onto the above " agc_ext1 "

                          To do this type

                          alter database agc on agc_ext1 = 2000
                          go


                          This then will have extended agc by 2 Gig !

                          NB...please check my figure for 2 Gig in 2k pages !!!!

                          Hope this helps

                          Mike

                          • 10.
                            Pisanzio Paolo

                            Thanks a lots for your help.
                            I 'want ask u something.
                            Why do you use in instrucion :
                            DISK INIT NAME = "agc_ext1", physname="/dev/vc/rdsk/db/vol05",vedvno = 6, size =1024000000

                            the value in size of 1024000000 ?

                            If this value accept unit of 2KB each page, why don't you used the value of

                            1.024.000?

                            1.024.000 x 2KB = 2.048.000 KB= 2.048 MB = 2 GB.

                            Is it correct?

                            Thanks

                            • 11.
                              Michael Morgan-Lee

                              Nos...

                              you are corrrect yes...as I said in my last post you should check the calculation and as I was trying to answer you whilst doing 100 other things I messed up the calculation a bit  ! the figure you should use is

                              1024000

                              Cheers

                              Mike.