aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MSSQL/Resources
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/MSSQL/Resources')
-rw-r--r--OpenSim/Data/MSSQL/Resources/003_InventoryStore.sql38
-rw-r--r--OpenSim/Data/MSSQL/Resources/004_AssetStore.sql31
-rw-r--r--OpenSim/Data/MSSQL/Resources/004_EstateStore.sql22
-rw-r--r--OpenSim/Data/MSSQL/Resources/004_GridStore.sql68
-rw-r--r--OpenSim/Data/MSSQL/Resources/004_InventoryStore.sql52
-rw-r--r--OpenSim/Data/MSSQL/Resources/005_EstateStore.sql22
-rw-r--r--OpenSim/Data/MSSQL/Resources/006_EstateStore.sql22
-rw-r--r--OpenSim/Data/MSSQL/Resources/006_UserStore.sql57
-rw-r--r--OpenSim/Data/MSSQL/Resources/007_EstateStore.sql25
-rw-r--r--OpenSim/Data/MSSQL/Resources/007_UserStore.sql42
-rw-r--r--OpenSim/Data/MSSQL/Resources/008_EstateStore.sql49
-rw-r--r--OpenSim/Data/MSSQL/Resources/008_UserStore.sql29
-rw-r--r--OpenSim/Data/MSSQL/Resources/009_EstateStore.sql24
-rw-r--r--OpenSim/Data/MSSQL/Resources/009_UserStore.sql53
-rw-r--r--OpenSim/Data/MSSQL/Resources/010_UserStore.sql24
-rw-r--r--OpenSim/Data/MSSQL/Resources/013_RegionStore.sql112
-rw-r--r--OpenSim/Data/MSSQL/Resources/014_RegionStore.sql49
-rw-r--r--OpenSim/Data/MSSQL/Resources/015_RegionStore.sql45
-rw-r--r--OpenSim/Data/MSSQL/Resources/016_RegionStore.sql19
-rw-r--r--OpenSim/Data/MSSQL/Resources/017_RegionStore.sql56
-rw-r--r--OpenSim/Data/MSSQL/Resources/018_RegionStore.sql18
-rw-r--r--OpenSim/Data/MSSQL/Resources/019_RegionStore.sql19
-rw-r--r--OpenSim/Data/MSSQL/Resources/020_RegionStore.sql58
23 files changed, 934 insertions, 0 deletions
diff --git a/OpenSim/Data/MSSQL/Resources/003_InventoryStore.sql b/OpenSim/Data/MSSQL/Resources/003_InventoryStore.sql
new file mode 100644
index 0000000..2f623ec
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/003_InventoryStore.sql
@@ -0,0 +1,38 @@
1/* To prevent any potential data loss issues, you should review this script in detail before running it outside the context of the database designer.*/
2BEGIN TRANSACTION
3
4CREATE TABLE dbo.Tmp_inventoryfolders
5 (
6 folderID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
7 agentID uniqueidentifier NULL DEFAULT (NULL),
8 parentFolderID uniqueidentifier NULL DEFAULT (NULL),
9 folderName varchar(64) NULL DEFAULT (NULL),
10 type smallint NOT NULL DEFAULT ((0)),
11 version int NOT NULL DEFAULT ((0))
12 ) ON [PRIMARY]
13
14IF EXISTS(SELECT * FROM dbo.inventoryfolders)
15 EXEC('INSERT INTO dbo.Tmp_inventoryfolders (folderID, agentID, parentFolderID, folderName, type, version)
16 SELECT CONVERT(uniqueidentifier, folderID), CONVERT(uniqueidentifier, agentID), CONVERT(uniqueidentifier, parentFolderID), folderName, type, version FROM dbo.inventoryfolders WITH (HOLDLOCK TABLOCKX)')
17
18DROP TABLE dbo.inventoryfolders
19
20EXECUTE sp_rename N'dbo.Tmp_inventoryfolders', N'inventoryfolders', 'OBJECT'
21
22ALTER TABLE dbo.inventoryfolders ADD CONSTRAINT
23 PK__inventor__C2FABFB3173876EA PRIMARY KEY CLUSTERED
24 (
25 folderID
26 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
27
28CREATE NONCLUSTERED INDEX owner ON dbo.inventoryfolders
29 (
30 agentID
31 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
32
33CREATE NONCLUSTERED INDEX parent ON dbo.inventoryfolders
34 (
35 parentFolderID
36 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
37
38COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/004_AssetStore.sql b/OpenSim/Data/MSSQL/Resources/004_AssetStore.sql
new file mode 100644
index 0000000..215cf3a
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/004_AssetStore.sql
@@ -0,0 +1,31 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_assets
4 (
5 id uniqueidentifier NOT NULL,
6 name varchar(64) NOT NULL,
7 description varchar(64) NOT NULL,
8 assetType tinyint NOT NULL,
9 local bit NOT NULL,
10 temporary bit NOT NULL,
11 data image NOT NULL,
12 create_time int NULL,
13 access_time int NULL
14 ) ON [PRIMARY]
15 TEXTIMAGE_ON [PRIMARY]
16
17IF EXISTS(SELECT * FROM dbo.assets)
18 EXEC('INSERT INTO dbo.Tmp_assets (id, name, description, assetType, local, temporary, data, create_time, access_time)
19 SELECT CONVERT(uniqueidentifier, id), name, description, assetType, local, temporary, data, create_time, access_time FROM dbo.assets WITH (HOLDLOCK TABLOCKX)')
20
21DROP TABLE assets
22
23EXECUTE sp_rename N'Tmp_assets', N'assets', 'OBJECT'
24
25ALTER TABLE dbo.assets ADD CONSTRAINT
26 PK__assets__id PRIMARY KEY CLUSTERED
27 (
28 id
29 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
30
31COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/004_EstateStore.sql b/OpenSim/Data/MSSQL/Resources/004_EstateStore.sql
new file mode 100644
index 0000000..0a132c1
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/004_EstateStore.sql
@@ -0,0 +1,22 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_estate_managers
4 (
5 EstateID int NOT NULL,
6 uuid uniqueidentifier NOT NULL
7 ) ON [PRIMARY]
8
9IF EXISTS(SELECT * FROM dbo.estate_managers)
10 EXEC('INSERT INTO dbo.Tmp_estate_managers (EstateID, uuid)
11 SELECT EstateID, CONVERT(uniqueidentifier, uuid) FROM dbo.estate_managers WITH (HOLDLOCK TABLOCKX)')
12
13DROP TABLE dbo.estate_managers
14
15EXECUTE sp_rename N'dbo.Tmp_estate_managers', N'estate_managers', 'OBJECT'
16
17CREATE NONCLUSTERED INDEX IX_estate_managers ON dbo.estate_managers
18 (
19 EstateID
20 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
21
22COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/004_GridStore.sql b/OpenSim/Data/MSSQL/Resources/004_GridStore.sql
new file mode 100644
index 0000000..6456c95
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/004_GridStore.sql
@@ -0,0 +1,68 @@
1/* To prevent any potential data loss issues, you should review this script in detail before running it outside the context of the database designer.*/
2BEGIN TRANSACTION
3
4CREATE TABLE dbo.Tmp_regions
5 (
6 uuid uniqueidentifier NOT NULL,
7 regionHandle bigint NULL,
8 regionName varchar(20) NULL,
9 regionRecvKey varchar(128) NULL,
10 regionSendKey varchar(128) NULL,
11 regionSecret varchar(128) NULL,
12 regionDataURI varchar(128) NULL,
13 serverIP varchar(64) NULL,
14 serverPort int NULL,
15 serverURI varchar(255) NULL,
16 locX int NULL,
17 locY int NULL,
18 locZ int NULL,
19 eastOverrideHandle bigint NULL,
20 westOverrideHandle bigint NULL,
21 southOverrideHandle bigint NULL,
22 northOverrideHandle bigint NULL,
23 regionAssetURI varchar(255) NULL,
24 regionAssetRecvKey varchar(128) NULL,
25 regionAssetSendKey varchar(128) NULL,
26 regionUserURI varchar(255) NULL,
27 regionUserRecvKey varchar(128) NULL,
28 regionUserSendKey varchar(128) NULL,
29 regionMapTexture uniqueidentifier NULL,
30 serverHttpPort int NULL,
31 serverRemotingPort int NULL,
32 owner_uuid uniqueidentifier NOT NULL,
33 originUUID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000')
34 ) ON [PRIMARY]
35
36IF EXISTS(SELECT * FROM dbo.regions)
37 EXEC('INSERT INTO dbo.Tmp_regions (uuid, regionHandle, regionName, regionRecvKey, regionSendKey, regionSecret, regionDataURI, serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, regionMapTexture, serverHttpPort, serverRemotingPort, owner_uuid, originUUID)
38 SELECT CONVERT(uniqueidentifier, uuid), regionHandle, regionName, regionRecvKey, regionSendKey, regionSecret, regionDataURI, serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, CONVERT(uniqueidentifier, regionMapTexture), serverHttpPort, serverRemotingPort, CONVERT(uniqueidentifier, owner_uuid), CONVERT(uniqueidentifier, originUUID) FROM dbo.regions WITH (HOLDLOCK TABLOCKX)')
39
40DROP TABLE dbo.regions
41
42EXECUTE sp_rename N'dbo.Tmp_regions', N'regions', 'OBJECT'
43
44ALTER TABLE dbo.regions ADD CONSTRAINT
45 PK__regions__uuid PRIMARY KEY CLUSTERED
46 (
47 uuid
48 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
49
50CREATE NONCLUSTERED INDEX IX_regions_name ON dbo.regions
51 (
52 regionName
53 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
54
55CREATE NONCLUSTERED INDEX IX_regions_handle ON dbo.regions
56 (
57 regionHandle
58 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
59
60CREATE NONCLUSTERED INDEX IX_regions_override ON dbo.regions
61 (
62 eastOverrideHandle,
63 westOverrideHandle,
64 southOverrideHandle,
65 northOverrideHandle
66 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
67
68COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/004_InventoryStore.sql b/OpenSim/Data/MSSQL/Resources/004_InventoryStore.sql
new file mode 100644
index 0000000..96ef1c0
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/004_InventoryStore.sql
@@ -0,0 +1,52 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_inventoryitems
4 (
5 inventoryID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
6 assetID uniqueidentifier NULL DEFAULT (NULL),
7 assetType int NULL DEFAULT (NULL),
8 parentFolderID uniqueidentifier NULL DEFAULT (NULL),
9 avatarID uniqueidentifier NULL DEFAULT (NULL),
10 inventoryName varchar(64) NULL DEFAULT (NULL),
11 inventoryDescription varchar(128) NULL DEFAULT (NULL),
12 inventoryNextPermissions int NULL DEFAULT (NULL),
13 inventoryCurrentPermissions int NULL DEFAULT (NULL),
14 invType int NULL DEFAULT (NULL),
15 creatorID uniqueidentifier NULL DEFAULT (NULL),
16 inventoryBasePermissions int NOT NULL DEFAULT ((0)),
17 inventoryEveryOnePermissions int NOT NULL DEFAULT ((0)),
18 salePrice int NULL DEFAULT (NULL),
19 saleType tinyint NULL DEFAULT (NULL),
20 creationDate int NULL DEFAULT (NULL),
21 groupID uniqueidentifier NULL DEFAULT (NULL),
22 groupOwned bit NULL DEFAULT (NULL),
23 flags int NULL DEFAULT (NULL),
24 inventoryGroupPermissions int NOT NULL DEFAULT ((0))
25 ) ON [PRIMARY]
26
27IF EXISTS(SELECT * FROM dbo.inventoryitems)
28 EXEC('INSERT INTO dbo.Tmp_inventoryitems (inventoryID, assetID, assetType, parentFolderID, avatarID, inventoryName, inventoryDescription, inventoryNextPermissions, inventoryCurrentPermissions, invType, creatorID, inventoryBasePermissions, inventoryEveryOnePermissions, salePrice, saleType, creationDate, groupID, groupOwned, flags, inventoryGroupPermissions)
29 SELECT CONVERT(uniqueidentifier, inventoryID), CONVERT(uniqueidentifier, assetID), assetType, CONVERT(uniqueidentifier, parentFolderID), CONVERT(uniqueidentifier, avatarID), inventoryName, inventoryDescription, inventoryNextPermissions, inventoryCurrentPermissions, invType, CONVERT(uniqueidentifier, creatorID), inventoryBasePermissions, inventoryEveryOnePermissions, salePrice, saleType, creationDate, CONVERT(uniqueidentifier, groupID), groupOwned, flags, inventoryGroupPermissions FROM dbo.inventoryitems WITH (HOLDLOCK TABLOCKX)')
30
31DROP TABLE dbo.inventoryitems
32
33EXECUTE sp_rename N'dbo.Tmp_inventoryitems', N'inventoryitems', 'OBJECT'
34
35ALTER TABLE dbo.inventoryitems ADD CONSTRAINT
36 PK__inventor__C4B7BC2220C1E124 PRIMARY KEY CLUSTERED
37 (
38 inventoryID
39 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
40
41
42CREATE NONCLUSTERED INDEX owner ON dbo.inventoryitems
43 (
44 avatarID
45 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
46
47CREATE NONCLUSTERED INDEX folder ON dbo.inventoryitems
48 (
49 parentFolderID
50 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
51
52COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/005_EstateStore.sql b/OpenSim/Data/MSSQL/Resources/005_EstateStore.sql
new file mode 100644
index 0000000..ba93b39
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/005_EstateStore.sql
@@ -0,0 +1,22 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_estate_groups
4 (
5 EstateID int NOT NULL,
6 uuid uniqueidentifier NOT NULL
7 ) ON [PRIMARY]
8
9IF EXISTS(SELECT * FROM dbo.estate_groups)
10 EXEC('INSERT INTO dbo.Tmp_estate_groups (EstateID, uuid)
11 SELECT EstateID, CONVERT(uniqueidentifier, uuid) FROM dbo.estate_groups WITH (HOLDLOCK TABLOCKX)')
12
13DROP TABLE dbo.estate_groups
14
15EXECUTE sp_rename N'dbo.Tmp_estate_groups', N'estate_groups', 'OBJECT'
16
17CREATE NONCLUSTERED INDEX IX_estate_groups ON dbo.estate_groups
18 (
19 EstateID
20 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
21
22COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/006_EstateStore.sql b/OpenSim/Data/MSSQL/Resources/006_EstateStore.sql
new file mode 100644
index 0000000..f7df8fd
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/006_EstateStore.sql
@@ -0,0 +1,22 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_estate_users
4 (
5 EstateID int NOT NULL,
6 uuid uniqueidentifier NOT NULL
7 ) ON [PRIMARY]
8
9IF EXISTS(SELECT * FROM dbo.estate_users)
10 EXEC('INSERT INTO dbo.Tmp_estate_users (EstateID, uuid)
11 SELECT EstateID, CONVERT(uniqueidentifier, uuid) FROM dbo.estate_users WITH (HOLDLOCK TABLOCKX)')
12
13DROP TABLE dbo.estate_users
14
15EXECUTE sp_rename N'dbo.Tmp_estate_users', N'estate_users', 'OBJECT'
16
17CREATE NONCLUSTERED INDEX IX_estate_users ON dbo.estate_users
18 (
19 EstateID
20 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
21
22COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/006_UserStore.sql b/OpenSim/Data/MSSQL/Resources/006_UserStore.sql
new file mode 100644
index 0000000..67fe581
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/006_UserStore.sql
@@ -0,0 +1,57 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_users
4 (
5 UUID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
6 username varchar(32) NOT NULL,
7 lastname varchar(32) NOT NULL,
8 passwordHash varchar(32) NOT NULL,
9 passwordSalt varchar(32) NOT NULL,
10 homeRegion bigint NULL DEFAULT (NULL),
11 homeLocationX float(53) NULL DEFAULT (NULL),
12 homeLocationY float(53) NULL DEFAULT (NULL),
13 homeLocationZ float(53) NULL DEFAULT (NULL),
14 homeLookAtX float(53) NULL DEFAULT (NULL),
15 homeLookAtY float(53) NULL DEFAULT (NULL),
16 homeLookAtZ float(53) NULL DEFAULT (NULL),
17 created int NOT NULL,
18 lastLogin int NOT NULL,
19 userInventoryURI varchar(255) NULL DEFAULT (NULL),
20 userAssetURI varchar(255) NULL DEFAULT (NULL),
21 profileCanDoMask int NULL DEFAULT (NULL),
22 profileWantDoMask int NULL DEFAULT (NULL),
23 profileAboutText ntext NULL,
24 profileFirstText ntext NULL,
25 profileImage uniqueidentifier NULL DEFAULT (NULL),
26 profileFirstImage uniqueidentifier NULL DEFAULT (NULL),
27 webLoginKey uniqueidentifier NULL DEFAULT (NULL),
28 homeRegionID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
29 userFlags int NOT NULL DEFAULT ((0)),
30 godLevel int NOT NULL DEFAULT ((0)),
31 customType varchar(32) NOT NULL DEFAULT (''),
32 partner uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
33 email varchar(250) NULL
34 ) ON [PRIMARY]
35 TEXTIMAGE_ON [PRIMARY]
36
37IF EXISTS(SELECT * FROM dbo.users)
38 EXEC('INSERT INTO dbo.Tmp_users (UUID, username, lastname, passwordHash, passwordSalt, homeRegion, homeLocationX, homeLocationY, homeLocationZ, homeLookAtX, homeLookAtY, homeLookAtZ, created, lastLogin, userInventoryURI, userAssetURI, profileCanDoMask, profileWantDoMask, profileAboutText, profileFirstText, profileImage, profileFirstImage, webLoginKey, homeRegionID, userFlags, godLevel, customType, partner, email)
39 SELECT CONVERT(uniqueidentifier, UUID), username, lastname, passwordHash, passwordSalt, homeRegion, homeLocationX, homeLocationY, homeLocationZ, homeLookAtX, homeLookAtY, homeLookAtZ, created, lastLogin, userInventoryURI, userAssetURI, profileCanDoMask, profileWantDoMask, profileAboutText, profileFirstText, CONVERT(uniqueidentifier, profileImage), CONVERT(uniqueidentifier, profileFirstImage), CONVERT(uniqueidentifier, webLoginKey), CONVERT(uniqueidentifier, homeRegionID), userFlags, godLevel, customType, CONVERT(uniqueidentifier, partner), email FROM dbo.users WITH (HOLDLOCK TABLOCKX)')
40
41DROP TABLE dbo.users
42
43EXECUTE sp_rename N'dbo.Tmp_users', N'users', 'OBJECT'
44
45ALTER TABLE dbo.users ADD CONSTRAINT
46 PK__users__65A475E737A5467C PRIMARY KEY CLUSTERED
47 (
48 UUID
49 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
50
51CREATE NONCLUSTERED INDEX usernames ON dbo.users
52 (
53 username,
54 lastname
55 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
56
57COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/007_EstateStore.sql b/OpenSim/Data/MSSQL/Resources/007_EstateStore.sql
new file mode 100644
index 0000000..c9165b0
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/007_EstateStore.sql
@@ -0,0 +1,25 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_estateban
4 (
5 EstateID int NOT NULL,
6 bannedUUID uniqueidentifier NOT NULL,
7 bannedIp varchar(16) NULL,
8 bannedIpHostMask varchar(16) NULL,
9 bannedNameMask varchar(64) NULL
10 ) ON [PRIMARY]
11
12IF EXISTS(SELECT * FROM dbo.estateban)
13 EXEC('INSERT INTO dbo.Tmp_estateban (EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask)
14 SELECT EstateID, CONVERT(uniqueidentifier, bannedUUID), bannedIp, bannedIpHostMask, bannedNameMask FROM dbo.estateban WITH (HOLDLOCK TABLOCKX)')
15
16DROP TABLE dbo.estateban
17
18EXECUTE sp_rename N'dbo.Tmp_estateban', N'estateban', 'OBJECT'
19
20CREATE NONCLUSTERED INDEX IX_estateban ON dbo.estateban
21 (
22 EstateID
23 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
24
25COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/007_UserStore.sql b/OpenSim/Data/MSSQL/Resources/007_UserStore.sql
new file mode 100644
index 0000000..92a8fc5
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/007_UserStore.sql
@@ -0,0 +1,42 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_agents
4 (
5 UUID uniqueidentifier NOT NULL,
6 sessionID uniqueidentifier NOT NULL,
7 secureSessionID uniqueidentifier NOT NULL,
8 agentIP varchar(16) NOT NULL,
9 agentPort int NOT NULL,
10 agentOnline tinyint NOT NULL,
11 loginTime int NOT NULL,
12 logoutTime int NOT NULL,
13 currentRegion uniqueidentifier NOT NULL,
14 currentHandle bigint NOT NULL,
15 currentPos varchar(64) NOT NULL
16 ) ON [PRIMARY]
17
18IF EXISTS(SELECT * FROM dbo.agents)
19 EXEC('INSERT INTO dbo.Tmp_agents (UUID, sessionID, secureSessionID, agentIP, agentPort, agentOnline, loginTime, logoutTime, currentRegion, currentHandle, currentPos)
20 SELECT CONVERT(uniqueidentifier, UUID), CONVERT(uniqueidentifier, sessionID), CONVERT(uniqueidentifier, secureSessionID), agentIP, agentPort, agentOnline, loginTime, logoutTime, CONVERT(uniqueidentifier, currentRegion), currentHandle, currentPos FROM dbo.agents WITH (HOLDLOCK TABLOCKX)')
21
22DROP TABLE dbo.agents
23
24EXECUTE sp_rename N'dbo.Tmp_agents', N'agents', 'OBJECT'
25
26ALTER TABLE dbo.agents ADD CONSTRAINT
27 PK__agents__65A475E749C3F6B7 PRIMARY KEY CLUSTERED
28 (
29 UUID
30 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
31
32CREATE NONCLUSTERED INDEX session ON dbo.agents
33 (
34 sessionID
35 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
36
37CREATE NONCLUSTERED INDEX ssession ON dbo.agents
38 (
39 secureSessionID
40 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
41
42COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/008_EstateStore.sql b/OpenSim/Data/MSSQL/Resources/008_EstateStore.sql
new file mode 100644
index 0000000..9c5355e
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/008_EstateStore.sql
@@ -0,0 +1,49 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_estate_settings
4 (
5 EstateID int NOT NULL IDENTITY (1, 100),
6 EstateName varchar(64) NULL DEFAULT (NULL),
7 AbuseEmailToEstateOwner bit NOT NULL,
8 DenyAnonymous bit NOT NULL,
9 ResetHomeOnTeleport bit NOT NULL,
10 FixedSun bit NOT NULL,
11 DenyTransacted bit NOT NULL,
12 BlockDwell bit NOT NULL,
13 DenyIdentified bit NOT NULL,
14 AllowVoice bit NOT NULL,
15 UseGlobalTime bit NOT NULL,
16 PricePerMeter int NOT NULL,
17 TaxFree bit NOT NULL,
18 AllowDirectTeleport bit NOT NULL,
19 RedirectGridX int NOT NULL,
20 RedirectGridY int NOT NULL,
21 ParentEstateID int NOT NULL,
22 SunPosition float(53) NOT NULL,
23 EstateSkipScripts bit NOT NULL,
24 BillableFactor float(53) NOT NULL,
25 PublicAccess bit NOT NULL,
26 AbuseEmail varchar(255) NOT NULL,
27 EstateOwner uniqueidentifier NOT NULL,
28 DenyMinors bit NOT NULL
29 ) ON [PRIMARY]
30
31SET IDENTITY_INSERT dbo.Tmp_estate_settings ON
32
33IF EXISTS(SELECT * FROM dbo.estate_settings)
34 EXEC('INSERT INTO dbo.Tmp_estate_settings (EstateID, EstateName, AbuseEmailToEstateOwner, DenyAnonymous, ResetHomeOnTeleport, FixedSun, DenyTransacted, BlockDwell, DenyIdentified, AllowVoice, UseGlobalTime, PricePerMeter, TaxFree, AllowDirectTeleport, RedirectGridX, RedirectGridY, ParentEstateID, SunPosition, EstateSkipScripts, BillableFactor, PublicAccess, AbuseEmail, EstateOwner, DenyMinors)
35 SELECT EstateID, EstateName, AbuseEmailToEstateOwner, DenyAnonymous, ResetHomeOnTeleport, FixedSun, DenyTransacted, BlockDwell, DenyIdentified, AllowVoice, UseGlobalTime, PricePerMeter, TaxFree, AllowDirectTeleport, RedirectGridX, RedirectGridY, ParentEstateID, SunPosition, EstateSkipScripts, BillableFactor, PublicAccess, AbuseEmail, CONVERT(uniqueidentifier, EstateOwner), DenyMinors FROM dbo.estate_settings WITH (HOLDLOCK TABLOCKX)')
36
37SET IDENTITY_INSERT dbo.Tmp_estate_settings OFF
38
39DROP TABLE dbo.estate_settings
40
41EXECUTE sp_rename N'dbo.Tmp_estate_settings', N'estate_settings', 'OBJECT'
42
43ALTER TABLE dbo.estate_settings ADD CONSTRAINT
44 PK_estate_settings PRIMARY KEY CLUSTERED
45 (
46 EstateID
47 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
48
49COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/008_UserStore.sql b/OpenSim/Data/MSSQL/Resources/008_UserStore.sql
new file mode 100644
index 0000000..505252b
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/008_UserStore.sql
@@ -0,0 +1,29 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_userfriends
4 (
5 ownerID uniqueidentifier NOT NULL,
6 friendID uniqueidentifier NOT NULL,
7 friendPerms int NOT NULL,
8 datetimestamp int NOT NULL
9 ) ON [PRIMARY]
10
11IF EXISTS(SELECT * FROM dbo.userfriends)
12 EXEC('INSERT INTO dbo.Tmp_userfriends (ownerID, friendID, friendPerms, datetimestamp)
13 SELECT CONVERT(uniqueidentifier, ownerID), CONVERT(uniqueidentifier, friendID), friendPerms, datetimestamp FROM dbo.userfriends WITH (HOLDLOCK TABLOCKX)')
14
15DROP TABLE dbo.userfriends
16
17EXECUTE sp_rename N'dbo.Tmp_userfriends', N'userfriends', 'OBJECT'
18
19CREATE NONCLUSTERED INDEX IX_userfriends_ownerID ON dbo.userfriends
20 (
21 ownerID
22 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
23
24CREATE NONCLUSTERED INDEX IX_userfriends_friendID ON dbo.userfriends
25 (
26 friendID
27 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
28
29COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/009_EstateStore.sql b/OpenSim/Data/MSSQL/Resources/009_EstateStore.sql
new file mode 100644
index 0000000..f91557c
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/009_EstateStore.sql
@@ -0,0 +1,24 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_estate_map
4 (
5 RegionID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
6 EstateID int NOT NULL
7 ) ON [PRIMARY]
8
9IF EXISTS(SELECT * FROM dbo.estate_map)
10 EXEC('INSERT INTO dbo.Tmp_estate_map (RegionID, EstateID)
11 SELECT CONVERT(uniqueidentifier, RegionID), EstateID FROM dbo.estate_map WITH (HOLDLOCK TABLOCKX)')
12
13DROP TABLE dbo.estate_map
14
15EXECUTE sp_rename N'dbo.Tmp_estate_map', N'estate_map', 'OBJECT'
16
17ALTER TABLE dbo.estate_map ADD CONSTRAINT
18 PK_estate_map PRIMARY KEY CLUSTERED
19 (
20 RegionID
21 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
22
23
24COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/009_UserStore.sql b/OpenSim/Data/MSSQL/Resources/009_UserStore.sql
new file mode 100644
index 0000000..b1ab8ba
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/009_UserStore.sql
@@ -0,0 +1,53 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_avatarappearance
4 (
5 Owner uniqueidentifier NOT NULL,
6 Serial int NOT NULL,
7 Visual_Params image NOT NULL,
8 Texture image NOT NULL,
9 Avatar_Height float(53) NOT NULL,
10 Body_Item uniqueidentifier NOT NULL,
11 Body_Asset uniqueidentifier NOT NULL,
12 Skin_Item uniqueidentifier NOT NULL,
13 Skin_Asset uniqueidentifier NOT NULL,
14 Hair_Item uniqueidentifier NOT NULL,
15 Hair_Asset uniqueidentifier NOT NULL,
16 Eyes_Item uniqueidentifier NOT NULL,
17 Eyes_Asset uniqueidentifier NOT NULL,
18 Shirt_Item uniqueidentifier NOT NULL,
19 Shirt_Asset uniqueidentifier NOT NULL,
20 Pants_Item uniqueidentifier NOT NULL,
21 Pants_Asset uniqueidentifier NOT NULL,
22 Shoes_Item uniqueidentifier NOT NULL,
23 Shoes_Asset uniqueidentifier NOT NULL,
24 Socks_Item uniqueidentifier NOT NULL,
25 Socks_Asset uniqueidentifier NOT NULL,
26 Jacket_Item uniqueidentifier NOT NULL,
27 Jacket_Asset uniqueidentifier NOT NULL,
28 Gloves_Item uniqueidentifier NOT NULL,
29 Gloves_Asset uniqueidentifier NOT NULL,
30 Undershirt_Item uniqueidentifier NOT NULL,
31 Undershirt_Asset uniqueidentifier NOT NULL,
32 Underpants_Item uniqueidentifier NOT NULL,
33 Underpants_Asset uniqueidentifier NOT NULL,
34 Skirt_Item uniqueidentifier NOT NULL,
35 Skirt_Asset uniqueidentifier NOT NULL
36 ) ON [PRIMARY]
37 TEXTIMAGE_ON [PRIMARY]
38
39IF EXISTS(SELECT * FROM dbo.avatarappearance)
40 EXEC('INSERT INTO dbo.Tmp_avatarappearance (Owner, Serial, Visual_Params, Texture, Avatar_Height, Body_Item, Body_Asset, Skin_Item, Skin_Asset, Hair_Item, Hair_Asset, Eyes_Item, Eyes_Asset, Shirt_Item, Shirt_Asset, Pants_Item, Pants_Asset, Shoes_Item, Shoes_Asset, Socks_Item, Socks_Asset, Jacket_Item, Jacket_Asset, Gloves_Item, Gloves_Asset, Undershirt_Item, Undershirt_Asset, Underpants_Item, Underpants_Asset, Skirt_Item, Skirt_Asset)
41 SELECT CONVERT(uniqueidentifier, Owner), Serial, Visual_Params, Texture, Avatar_Height, CONVERT(uniqueidentifier, Body_Item), CONVERT(uniqueidentifier, Body_Asset), CONVERT(uniqueidentifier, Skin_Item), CONVERT(uniqueidentifier, Skin_Asset), CONVERT(uniqueidentifier, Hair_Item), CONVERT(uniqueidentifier, Hair_Asset), CONVERT(uniqueidentifier, Eyes_Item), CONVERT(uniqueidentifier, Eyes_Asset), CONVERT(uniqueidentifier, Shirt_Item), CONVERT(uniqueidentifier, Shirt_Asset), CONVERT(uniqueidentifier, Pants_Item), CONVERT(uniqueidentifier, Pants_Asset), CONVERT(uniqueidentifier, Shoes_Item), CONVERT(uniqueidentifier, Shoes_Asset), CONVERT(uniqueidentifier, Socks_Item), CONVERT(uniqueidentifier, Socks_Asset), CONVERT(uniqueidentifier, Jacket_Item), CONVERT(uniqueidentifier, Jacket_Asset), CONVERT(uniqueidentifier, Gloves_Item), CONVERT(uniqueidentifier, Gloves_Asset), CONVERT(uniqueidentifier, Undershirt_Item), CONVERT(uniqueidentifier, Undershirt_Asset), CONVERT(uniqueidentifier, Underpants_Item), CONVERT(uniqueidentifier, Underpants_Asset), CONVERT(uniqueidentifier, Skirt_Item), CONVERT(uniqueidentifier, Skirt_Asset) FROM dbo.avatarappearance WITH (HOLDLOCK TABLOCKX)')
42
43DROP TABLE dbo.avatarappearance
44
45EXECUTE sp_rename N'dbo.Tmp_avatarappearance', N'avatarappearance', 'OBJECT'
46
47ALTER TABLE dbo.avatarappearance ADD CONSTRAINT
48 PK__avatarap__7DD115CC4E88ABD4 PRIMARY KEY CLUSTERED
49 (
50 Owner
51 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
52
53COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/010_UserStore.sql b/OpenSim/Data/MSSQL/Resources/010_UserStore.sql
new file mode 100644
index 0000000..0af008a
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/010_UserStore.sql
@@ -0,0 +1,24 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_avatarattachments
4 (
5 UUID uniqueidentifier NOT NULL,
6 attachpoint int NOT NULL,
7 item uniqueidentifier NOT NULL,
8 asset uniqueidentifier NOT NULL
9 ) ON [PRIMARY]
10
11IF EXISTS(SELECT * FROM dbo.avatarattachments)
12 EXEC('INSERT INTO dbo.Tmp_avatarattachments (UUID, attachpoint, item, asset)
13 SELECT CONVERT(uniqueidentifier, UUID), attachpoint, CONVERT(uniqueidentifier, item), CONVERT(uniqueidentifier, asset) FROM dbo.avatarattachments WITH (HOLDLOCK TABLOCKX)')
14
15DROP TABLE dbo.avatarattachments
16
17EXECUTE sp_rename N'dbo.Tmp_avatarattachments', N'avatarattachments', 'OBJECT'
18
19CREATE NONCLUSTERED INDEX IX_avatarattachments ON dbo.avatarattachments
20 (
21 UUID
22 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
23
24COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/013_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/013_RegionStore.sql
new file mode 100644
index 0000000..ef5d4c0
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/013_RegionStore.sql
@@ -0,0 +1,112 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_prims
4 (
5 UUID uniqueidentifier NOT NULL,
6 RegionUUID uniqueidentifier NULL,
7 ParentID int NULL,
8 CreationDate int NULL,
9 Name varchar(255) NULL,
10 SceneGroupID uniqueidentifier NULL,
11 Text varchar(255) NULL,
12 Description varchar(255) NULL,
13 SitName varchar(255) NULL,
14 TouchName varchar(255) NULL,
15 ObjectFlags int NULL,
16 CreatorID uniqueidentifier NULL,
17 OwnerID uniqueidentifier NULL,
18 GroupID uniqueidentifier NULL,
19 LastOwnerID uniqueidentifier NULL,
20 OwnerMask int NULL,
21 NextOwnerMask int NULL,
22 GroupMask int NULL,
23 EveryoneMask int NULL,
24 BaseMask int NULL,
25 PositionX float(53) NULL,
26 PositionY float(53) NULL,
27 PositionZ float(53) NULL,
28 GroupPositionX float(53) NULL,
29 GroupPositionY float(53) NULL,
30 GroupPositionZ float(53) NULL,
31 VelocityX float(53) NULL,
32 VelocityY float(53) NULL,
33 VelocityZ float(53) NULL,
34 AngularVelocityX float(53) NULL,
35 AngularVelocityY float(53) NULL,
36 AngularVelocityZ float(53) NULL,
37 AccelerationX float(53) NULL,
38 AccelerationY float(53) NULL,
39 AccelerationZ float(53) NULL,
40 RotationX float(53) NULL,
41 RotationY float(53) NULL,
42 RotationZ float(53) NULL,
43 RotationW float(53) NULL,
44 SitTargetOffsetX float(53) NULL,
45 SitTargetOffsetY float(53) NULL,
46 SitTargetOffsetZ float(53) NULL,
47 SitTargetOrientW float(53) NULL,
48 SitTargetOrientX float(53) NULL,
49 SitTargetOrientY float(53) NULL,
50 SitTargetOrientZ float(53) NULL,
51 PayPrice int NOT NULL DEFAULT ((0)),
52 PayButton1 int NOT NULL DEFAULT ((0)),
53 PayButton2 int NOT NULL DEFAULT ((0)),
54 PayButton3 int NOT NULL DEFAULT ((0)),
55 PayButton4 int NOT NULL DEFAULT ((0)),
56 LoopedSound uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
57 LoopedSoundGain float(53) NOT NULL DEFAULT ((0.0)),
58 TextureAnimation image NULL,
59 OmegaX float(53) NOT NULL DEFAULT ((0.0)),
60 OmegaY float(53) NOT NULL DEFAULT ((0.0)),
61 OmegaZ float(53) NOT NULL DEFAULT ((0.0)),
62 CameraEyeOffsetX float(53) NOT NULL DEFAULT ((0.0)),
63 CameraEyeOffsetY float(53) NOT NULL DEFAULT ((0.0)),
64 CameraEyeOffsetZ float(53) NOT NULL DEFAULT ((0.0)),
65 CameraAtOffsetX float(53) NOT NULL DEFAULT ((0.0)),
66 CameraAtOffsetY float(53) NOT NULL DEFAULT ((0.0)),
67 CameraAtOffsetZ float(53) NOT NULL DEFAULT ((0.0)),
68 ForceMouselook tinyint NOT NULL DEFAULT ((0)),
69 ScriptAccessPin int NOT NULL DEFAULT ((0)),
70 AllowedDrop tinyint NOT NULL DEFAULT ((0)),
71 DieAtEdge tinyint NOT NULL DEFAULT ((0)),
72 SalePrice int NOT NULL DEFAULT ((10)),
73 SaleType tinyint NOT NULL DEFAULT ((0)),
74 ColorR int NOT NULL DEFAULT ((0)),
75 ColorG int NOT NULL DEFAULT ((0)),
76 ColorB int NOT NULL DEFAULT ((0)),
77 ColorA int NOT NULL DEFAULT ((0)),
78 ParticleSystem image NULL,
79 ClickAction tinyint NOT NULL DEFAULT ((0)),
80 Material tinyint NOT NULL DEFAULT ((3)),
81 CollisionSound uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
82 CollisionSoundVolume float(53) NOT NULL DEFAULT ((0.0)),
83 LinkNumber int NOT NULL DEFAULT ((0))
84 ) ON [PRIMARY]
85 TEXTIMAGE_ON [PRIMARY]
86
87IF EXISTS(SELECT * FROM dbo.prims)
88 EXEC('INSERT INTO dbo.Tmp_prims (UUID, RegionUUID, ParentID, CreationDate, Name, SceneGroupID, Text, Description, SitName, TouchName, ObjectFlags, CreatorID, OwnerID, GroupID, LastOwnerID, OwnerMask, NextOwnerMask, GroupMask, EveryoneMask, BaseMask, PositionX, PositionY, PositionZ, GroupPositionX, GroupPositionY, GroupPositionZ, VelocityX, VelocityY, VelocityZ, AngularVelocityX, AngularVelocityY, AngularVelocityZ, AccelerationX, AccelerationY, AccelerationZ, RotationX, RotationY, RotationZ, RotationW, SitTargetOffsetX, SitTargetOffsetY, SitTargetOffsetZ, SitTargetOrientW, SitTargetOrientX, SitTargetOrientY, SitTargetOrientZ, PayPrice, PayButton1, PayButton2, PayButton3, PayButton4, LoopedSound, LoopedSoundGain, TextureAnimation, OmegaX, OmegaY, OmegaZ, CameraEyeOffsetX, CameraEyeOffsetY, CameraEyeOffsetZ, CameraAtOffsetX, CameraAtOffsetY, CameraAtOffsetZ, ForceMouselook, ScriptAccessPin, AllowedDrop, DieAtEdge, SalePrice, SaleType, ColorR, ColorG, ColorB, ColorA, ParticleSystem, ClickAction, Material, CollisionSound, CollisionSoundVolume, LinkNumber)
89 SELECT CONVERT(uniqueidentifier, UUID), CONVERT(uniqueidentifier, RegionUUID), ParentID, CreationDate, Name, CONVERT(uniqueidentifier, SceneGroupID), Text, Description, SitName, TouchName, ObjectFlags, CONVERT(uniqueidentifier, CreatorID), CONVERT(uniqueidentifier, OwnerID), CONVERT(uniqueidentifier, GroupID), CONVERT(uniqueidentifier, LastOwnerID), OwnerMask, NextOwnerMask, GroupMask, EveryoneMask, BaseMask, PositionX, PositionY, PositionZ, GroupPositionX, GroupPositionY, GroupPositionZ, VelocityX, VelocityY, VelocityZ, AngularVelocityX, AngularVelocityY, AngularVelocityZ, AccelerationX, AccelerationY, AccelerationZ, RotationX, RotationY, RotationZ, RotationW, SitTargetOffsetX, SitTargetOffsetY, SitTargetOffsetZ, SitTargetOrientW, SitTargetOrientX, SitTargetOrientY, SitTargetOrientZ, PayPrice, PayButton1, PayButton2, PayButton3, PayButton4, CONVERT(uniqueidentifier, LoopedSound), LoopedSoundGain, TextureAnimation, OmegaX, OmegaY, OmegaZ, CameraEyeOffsetX, CameraEyeOffsetY, CameraEyeOffsetZ, CameraAtOffsetX, CameraAtOffsetY, CameraAtOffsetZ, ForceMouselook, ScriptAccessPin, AllowedDrop, DieAtEdge, SalePrice, SaleType, ColorR, ColorG, ColorB, ColorA, ParticleSystem, ClickAction, Material, CONVERT(uniqueidentifier, CollisionSound), CollisionSoundVolume, LinkNumber FROM dbo.prims WITH (HOLDLOCK TABLOCKX)')
90
91DROP TABLE dbo.prims
92
93EXECUTE sp_rename N'dbo.Tmp_prims', N'prims', 'OBJECT'
94
95ALTER TABLE dbo.prims ADD CONSTRAINT
96 PK__prims__10566F31 PRIMARY KEY CLUSTERED
97 (
98 UUID
99 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
100
101
102CREATE NONCLUSTERED INDEX prims_regionuuid ON dbo.prims
103 (
104 RegionUUID
105 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
106
107CREATE NONCLUSTERED INDEX prims_parentid ON dbo.prims
108 (
109 ParentID
110 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
111
112COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/014_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/014_RegionStore.sql
new file mode 100644
index 0000000..02f6f55
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/014_RegionStore.sql
@@ -0,0 +1,49 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_primshapes
4 (
5 UUID uniqueidentifier NOT NULL,
6 Shape int NULL,
7 ScaleX float(53) NULL,
8 ScaleY float(53) NULL,
9 ScaleZ float(53) NULL,
10 PCode int NULL,
11 PathBegin int NULL,
12 PathEnd int NULL,
13 PathScaleX int NULL,
14 PathScaleY int NULL,
15 PathShearX int NULL,
16 PathShearY int NULL,
17 PathSkew int NULL,
18 PathCurve int NULL,
19 PathRadiusOffset int NULL,
20 PathRevolutions int NULL,
21 PathTaperX int NULL,
22 PathTaperY int NULL,
23 PathTwist int NULL,
24 PathTwistBegin int NULL,
25 ProfileBegin int NULL,
26 ProfileEnd int NULL,
27 ProfileCurve int NULL,
28 ProfileHollow int NULL,
29 State int NULL,
30 Texture image NULL,
31 ExtraParams image NULL
32 ) ON [PRIMARY]
33 TEXTIMAGE_ON [PRIMARY]
34
35IF EXISTS(SELECT * FROM dbo.primshapes)
36 EXEC('INSERT INTO dbo.Tmp_primshapes (UUID, Shape, ScaleX, ScaleY, ScaleZ, PCode, PathBegin, PathEnd, PathScaleX, PathScaleY, PathShearX, PathShearY, PathSkew, PathCurve, PathRadiusOffset, PathRevolutions, PathTaperX, PathTaperY, PathTwist, PathTwistBegin, ProfileBegin, ProfileEnd, ProfileCurve, ProfileHollow, State, Texture, ExtraParams)
37 SELECT CONVERT(uniqueidentifier, UUID), Shape, ScaleX, ScaleY, ScaleZ, PCode, PathBegin, PathEnd, PathScaleX, PathScaleY, PathShearX, PathShearY, PathSkew, PathCurve, PathRadiusOffset, PathRevolutions, PathTaperX, PathTaperY, PathTwist, PathTwistBegin, ProfileBegin, ProfileEnd, ProfileCurve, ProfileHollow, State, Texture, ExtraParams FROM dbo.primshapes WITH (HOLDLOCK TABLOCKX)')
38
39DROP TABLE dbo.primshapes
40
41EXECUTE sp_rename N'dbo.Tmp_primshapes', N'primshapes', 'OBJECT'
42
43ALTER TABLE dbo.primshapes ADD CONSTRAINT
44 PK__primshapes__0880433F PRIMARY KEY CLUSTERED
45 (
46 UUID
47 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
48
49COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/015_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/015_RegionStore.sql
new file mode 100644
index 0000000..cbaaf88
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/015_RegionStore.sql
@@ -0,0 +1,45 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_primitems
4 (
5 itemID uniqueidentifier NOT NULL,
6 primID uniqueidentifier NULL,
7 assetID uniqueidentifier NULL,
8 parentFolderID uniqueidentifier NULL,
9 invType int NULL,
10 assetType int NULL,
11 name varchar(255) NULL,
12 description varchar(255) NULL,
13 creationDate varchar(255) NULL,
14 creatorID uniqueidentifier NULL,
15 ownerID uniqueidentifier NULL,
16 lastOwnerID uniqueidentifier NULL,
17 groupID uniqueidentifier NULL,
18 nextPermissions int NULL,
19 currentPermissions int NULL,
20 basePermissions int NULL,
21 everyonePermissions int NULL,
22 groupPermissions int NULL,
23 flags int NOT NULL DEFAULT ((0))
24 ) ON [PRIMARY]
25
26IF EXISTS(SELECT * FROM dbo.primitems)
27 EXEC('INSERT INTO dbo.Tmp_primitems (itemID, primID, assetID, parentFolderID, invType, assetType, name, description, creationDate, creatorID, ownerID, lastOwnerID, groupID, nextPermissions, currentPermissions, basePermissions, everyonePermissions, groupPermissions, flags)
28 SELECT CONVERT(uniqueidentifier, itemID), CONVERT(uniqueidentifier, primID), CONVERT(uniqueidentifier, assetID), CONVERT(uniqueidentifier, parentFolderID), invType, assetType, name, description, creationDate, CONVERT(uniqueidentifier, creatorID), CONVERT(uniqueidentifier, ownerID), CONVERT(uniqueidentifier, lastOwnerID), CONVERT(uniqueidentifier, groupID), nextPermissions, currentPermissions, basePermissions, everyonePermissions, groupPermissions, flags FROM dbo.primitems WITH (HOLDLOCK TABLOCKX)')
29
30DROP TABLE dbo.primitems
31
32EXECUTE sp_rename N'dbo.Tmp_primitems', N'primitems', 'OBJECT'
33
34ALTER TABLE dbo.primitems ADD CONSTRAINT
35 PK__primitems__0A688BB1 PRIMARY KEY CLUSTERED
36 (
37 itemID
38 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
39
40CREATE NONCLUSTERED INDEX primitems_primid ON dbo.primitems
41 (
42 primID
43 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
44
45COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/016_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/016_RegionStore.sql
new file mode 100644
index 0000000..e91da19
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/016_RegionStore.sql
@@ -0,0 +1,19 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_terrain
4 (
5 RegionUUID uniqueidentifier NULL,
6 Revision int NULL,
7 Heightfield image NULL
8 ) ON [PRIMARY]
9 TEXTIMAGE_ON [PRIMARY]
10
11IF EXISTS(SELECT * FROM dbo.terrain)
12 EXEC('INSERT INTO dbo.Tmp_terrain (RegionUUID, Revision, Heightfield)
13 SELECT CONVERT(uniqueidentifier, RegionUUID), Revision, Heightfield FROM dbo.terrain WITH (HOLDLOCK TABLOCKX)')
14
15DROP TABLE dbo.terrain
16
17EXECUTE sp_rename N'dbo.Tmp_terrain', N'terrain', 'OBJECT'
18
19COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/017_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/017_RegionStore.sql
new file mode 100644
index 0000000..3d3dbc0
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/017_RegionStore.sql
@@ -0,0 +1,56 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_land
4 (
5 UUID uniqueidentifier NOT NULL,
6 RegionUUID uniqueidentifier NULL,
7 LocalLandID int NULL,
8 Bitmap image NULL,
9 Name varchar(255) NULL,
10 Description varchar(255) NULL,
11 OwnerUUID uniqueidentifier NULL,
12 IsGroupOwned int NULL,
13 Area int NULL,
14 AuctionID int NULL,
15 Category int NULL,
16 ClaimDate int NULL,
17 ClaimPrice int NULL,
18 GroupUUID uniqueidentifier NULL,
19 SalePrice int NULL,
20 LandStatus int NULL,
21 LandFlags int NULL,
22 LandingType int NULL,
23 MediaAutoScale int NULL,
24 MediaTextureUUID uniqueidentifier NULL,
25 MediaURL varchar(255) NULL,
26 MusicURL varchar(255) NULL,
27 PassHours float(53) NULL,
28 PassPrice int NULL,
29 SnapshotUUID uniqueidentifier NULL,
30 UserLocationX float(53) NULL,
31 UserLocationY float(53) NULL,
32 UserLocationZ float(53) NULL,
33 UserLookAtX float(53) NULL,
34 UserLookAtY float(53) NULL,
35 UserLookAtZ float(53) NULL,
36 AuthbuyerID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
37 OtherCleanTime int NOT NULL DEFAULT ((0)),
38 Dwell int NOT NULL DEFAULT ((0))
39 ) ON [PRIMARY]
40 TEXTIMAGE_ON [PRIMARY]
41
42IF EXISTS(SELECT * FROM dbo.land)
43 EXEC('INSERT INTO dbo.Tmp_land (UUID, RegionUUID, LocalLandID, Bitmap, Name, Description, OwnerUUID, IsGroupOwned, Area, AuctionID, Category, ClaimDate, ClaimPrice, GroupUUID, SalePrice, LandStatus, LandFlags, LandingType, MediaAutoScale, MediaTextureUUID, MediaURL, MusicURL, PassHours, PassPrice, SnapshotUUID, UserLocationX, UserLocationY, UserLocationZ, UserLookAtX, UserLookAtY, UserLookAtZ, AuthbuyerID, OtherCleanTime, Dwell)
44 SELECT CONVERT(uniqueidentifier, UUID), CONVERT(uniqueidentifier, RegionUUID), LocalLandID, Bitmap, Name, Description, CONVERT(uniqueidentifier, OwnerUUID), IsGroupOwned, Area, AuctionID, Category, ClaimDate, ClaimPrice, CONVERT(uniqueidentifier, GroupUUID), SalePrice, LandStatus, LandFlags, LandingType, MediaAutoScale, CONVERT(uniqueidentifier, MediaTextureUUID), MediaURL, MusicURL, PassHours, PassPrice, CONVERT(uniqueidentifier, SnapshotUUID), UserLocationX, UserLocationY, UserLocationZ, UserLookAtX, UserLookAtY, UserLookAtZ, CONVERT(uniqueidentifier, AuthbuyerID), OtherCleanTime, Dwell FROM dbo.land WITH (HOLDLOCK TABLOCKX)')
45
46DROP TABLE dbo.land
47
48EXECUTE sp_rename N'dbo.Tmp_land', N'land', 'OBJECT'
49
50ALTER TABLE dbo.land ADD CONSTRAINT
51 PK__land__65A475E71BFD2C07 PRIMARY KEY CLUSTERED
52 (
53 UUID
54 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
55
56COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/018_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/018_RegionStore.sql
new file mode 100644
index 0000000..6157e35
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/018_RegionStore.sql
@@ -0,0 +1,18 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_landaccesslist
4 (
5 LandUUID uniqueidentifier NULL,
6 AccessUUID uniqueidentifier NULL,
7 Flags int NULL
8 ) ON [PRIMARY]
9
10IF EXISTS(SELECT * FROM dbo.landaccesslist)
11 EXEC('INSERT INTO dbo.Tmp_landaccesslist (LandUUID, AccessUUID, Flags)
12 SELECT CONVERT(uniqueidentifier, LandUUID), CONVERT(uniqueidentifier, AccessUUID), Flags FROM dbo.landaccesslist WITH (HOLDLOCK TABLOCKX)')
13
14DROP TABLE dbo.landaccesslist
15
16EXECUTE sp_rename N'dbo.Tmp_landaccesslist', N'landaccesslist', 'OBJECT'
17
18COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/019_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/019_RegionStore.sql
new file mode 100644
index 0000000..8e613b9
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/019_RegionStore.sql
@@ -0,0 +1,19 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_regionban
4 (
5 regionUUID uniqueidentifier NOT NULL,
6 bannedUUID uniqueidentifier NOT NULL,
7 bannedIp varchar(16) NOT NULL,
8 bannedIpHostMask varchar(16) NOT NULL
9 ) ON [PRIMARY]
10
11IF EXISTS(SELECT * FROM dbo.regionban)
12 EXEC('INSERT INTO dbo.Tmp_regionban (regionUUID, bannedUUID, bannedIp, bannedIpHostMask)
13 SELECT CONVERT(uniqueidentifier, regionUUID), CONVERT(uniqueidentifier, bannedUUID), bannedIp, bannedIpHostMask FROM dbo.regionban WITH (HOLDLOCK TABLOCKX)')
14
15DROP TABLE dbo.regionban
16
17EXECUTE sp_rename N'dbo.Tmp_regionban', N'regionban', 'OBJECT'
18
19COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/020_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/020_RegionStore.sql
new file mode 100644
index 0000000..2ce91f6
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/020_RegionStore.sql
@@ -0,0 +1,58 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_regionsettings
4 (
5 regionUUID uniqueidentifier NOT NULL,
6 block_terraform bit NOT NULL,
7 block_fly bit NOT NULL,
8 allow_damage bit NOT NULL,
9 restrict_pushing bit NOT NULL,
10 allow_land_resell bit NOT NULL,
11 allow_land_join_divide bit NOT NULL,
12 block_show_in_search bit NOT NULL,
13 agent_limit int NOT NULL,
14 object_bonus float(53) NOT NULL,
15 maturity int NOT NULL,
16 disable_scripts bit NOT NULL,
17 disable_collisions bit NOT NULL,
18 disable_physics bit NOT NULL,
19 terrain_texture_1 uniqueidentifier NOT NULL,
20 terrain_texture_2 uniqueidentifier NOT NULL,
21 terrain_texture_3 uniqueidentifier NOT NULL,
22 terrain_texture_4 uniqueidentifier NOT NULL,
23 elevation_1_nw float(53) NOT NULL,
24 elevation_2_nw float(53) NOT NULL,
25 elevation_1_ne float(53) NOT NULL,
26 elevation_2_ne float(53) NOT NULL,
27 elevation_1_se float(53) NOT NULL,
28 elevation_2_se float(53) NOT NULL,
29 elevation_1_sw float(53) NOT NULL,
30 elevation_2_sw float(53) NOT NULL,
31 water_height float(53) NOT NULL,
32 terrain_raise_limit float(53) NOT NULL,
33 terrain_lower_limit float(53) NOT NULL,
34 use_estate_sun bit NOT NULL,
35 fixed_sun bit NOT NULL,
36 sun_position float(53) NOT NULL,
37 covenant uniqueidentifier NULL DEFAULT (NULL),
38 Sandbox bit NOT NULL,
39 sunvectorx float(53) NOT NULL DEFAULT ((0)),
40 sunvectory float(53) NOT NULL DEFAULT ((0)),
41 sunvectorz float(53) NOT NULL DEFAULT ((0))
42 ) ON [PRIMARY]
43
44IF EXISTS(SELECT * FROM dbo.regionsettings)
45 EXEC('INSERT INTO dbo.Tmp_regionsettings (regionUUID, block_terraform, block_fly, allow_damage, restrict_pushing, allow_land_resell, allow_land_join_divide, block_show_in_search, agent_limit, object_bonus, maturity, disable_scripts, disable_collisions, disable_physics, terrain_texture_1, terrain_texture_2, terrain_texture_3, terrain_texture_4, elevation_1_nw, elevation_2_nw, elevation_1_ne, elevation_2_ne, elevation_1_se, elevation_2_se, elevation_1_sw, elevation_2_sw, water_height, terrain_raise_limit, terrain_lower_limit, use_estate_sun, fixed_sun, sun_position, covenant, Sandbox, sunvectorx, sunvectory, sunvectorz)
46 SELECT CONVERT(uniqueidentifier, regionUUID), block_terraform, block_fly, allow_damage, restrict_pushing, allow_land_resell, allow_land_join_divide, block_show_in_search, agent_limit, object_bonus, maturity, disable_scripts, disable_collisions, disable_physics, CONVERT(uniqueidentifier, terrain_texture_1), CONVERT(uniqueidentifier, terrain_texture_2), CONVERT(uniqueidentifier, terrain_texture_3), CONVERT(uniqueidentifier, terrain_texture_4), elevation_1_nw, elevation_2_nw, elevation_1_ne, elevation_2_ne, elevation_1_se, elevation_2_se, elevation_1_sw, elevation_2_sw, water_height, terrain_raise_limit, terrain_lower_limit, use_estate_sun, fixed_sun, sun_position, CONVERT(uniqueidentifier, covenant), Sandbox, sunvectorx, sunvectory, sunvectorz FROM dbo.regionsettings WITH (HOLDLOCK TABLOCKX)')
47
48DROP TABLE dbo.regionsettings
49
50EXECUTE sp_rename N'dbo.Tmp_regionsettings', N'regionsettings', 'OBJECT'
51
52ALTER TABLE dbo.regionsettings ADD CONSTRAINT
53 PK__regionse__5B35159D21B6055D PRIMARY KEY CLUSTERED
54 (
55 regionUUID
56 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
57
58COMMIT