diff options
author | Melanie Thielker | 2008-09-14 13:23:02 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-09-14 13:23:02 +0000 |
commit | 281955949910eb257b5f7e42e54535ba7812418e (patch) | |
tree | 8c62c0006f2567983a686e811513c8c009061aac /OpenSim/Data/MSSQL/Resources/004_UserStore.sql | |
parent | * Converted a number of methods within the login processes from private to pr... (diff) | |
download | opensim-SC-281955949910eb257b5f7e42e54535ba7812418e.zip opensim-SC-281955949910eb257b5f7e42e54535ba7812418e.tar.gz opensim-SC-281955949910eb257b5f7e42e54535ba7812418e.tar.bz2 opensim-SC-281955949910eb257b5f7e42e54535ba7812418e.tar.xz |
Mantis #2124
Thank you, RuudL, for a patch that brings MSSQL up to the same
implementation level as MySQL.
Diffstat (limited to 'OpenSim/Data/MSSQL/Resources/004_UserStore.sql')
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/004_UserStore.sql | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/OpenSim/Data/MSSQL/Resources/004_UserStore.sql b/OpenSim/Data/MSSQL/Resources/004_UserStore.sql new file mode 100644 index 0000000..f3e223e --- /dev/null +++ b/OpenSim/Data/MSSQL/Resources/004_UserStore.sql | |||
@@ -0,0 +1,58 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE Tmp_userfriends | ||
4 | ( | ||
5 | ownerID varchar(36) NOT NULL, | ||
6 | friendID varchar(36) NOT NULL, | ||
7 | friendPerms int NOT NULL, | ||
8 | datetimestamp int NOT NULL | ||
9 | ) ON [PRIMARY] | ||
10 | |||
11 | IF EXISTS(SELECT * FROM userfriends) | ||
12 | EXEC('INSERT INTO dbo.Tmp_userfriends (ownerID, friendID, friendPerms, datetimestamp) | ||
13 | SELECT CONVERT(varchar(36), ownerID), CONVERT(varchar(36), friendID), CONVERT(int, friendPerms), CONVERT(int, datetimestamp) FROM dbo.userfriends WITH (HOLDLOCK TABLOCKX)') | ||
14 | |||
15 | DROP TABLE dbo.userfriends | ||
16 | |||
17 | EXECUTE sp_rename N'Tmp_userfriends', N'userfriends', 'OBJECT' | ||
18 | |||
19 | CREATE NONCLUSTERED INDEX IX_userfriends_ownerID ON userfriends | ||
20 | ( | ||
21 | ownerID | ||
22 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
23 | |||
24 | CREATE NONCLUSTERED INDEX IX_userfriends_friendID ON userfriends | ||
25 | ( | ||
26 | friendID | ||
27 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
28 | |||
29 | COMMIT | ||
30 | BEGIN TRANSACTION | ||
31 | |||
32 | CREATE TABLE Tmp_userfriends | ||
33 | ( | ||
34 | ownerID varchar(36) NOT NULL, | ||
35 | friendID varchar(36) NOT NULL, | ||
36 | friendPerms int NOT NULL, | ||
37 | datetimestamp int NOT NULL | ||
38 | ) ON [PRIMARY] | ||
39 | |||
40 | IF EXISTS(SELECT * FROM dbo.userfriends) | ||
41 | EXEC('INSERT INTO dbo.Tmp_userfriends (ownerID, friendID, friendPerms, datetimestamp) | ||
42 | SELECT CONVERT(varchar(36), ownerID), CONVERT(varchar(36), friendID), CONVERT(int, friendPerms), CONVERT(int, datetimestamp) FROM dbo.userfriends WITH (HOLDLOCK TABLOCKX)') | ||
43 | |||
44 | DROP TABLE dbo.userfriends | ||
45 | |||
46 | EXECUTE sp_rename N'Tmp_userfriends', N'userfriends', 'OBJECT' | ||
47 | |||
48 | CREATE NONCLUSTERED INDEX IX_userfriends_ownerID ON userfriends | ||
49 | ( | ||
50 | ownerID | ||
51 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
52 | |||
53 | CREATE NONCLUSTERED INDEX IX_userfriends_friendID ON userfriends | ||
54 | ( | ||
55 | friendID | ||
56 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
57 | |||
58 | COMMIT | ||