Αυτό το άρθρο περιγράφει τον τρόπο δημιουργίας του Microsoft Windows SharePoint Services χρησιμοποιούν ήδη βάση δεδομένων ως τη βάση δεδομένων περιεχομένων. Για να το κάνετε αυτό, χρησιμοποιήστε ανάλυση ερωτημάτων SQL για τη δημιουργία της βάσης δεδομένων και για να ορίσετε τα δικαιώματα στη βάση δεδομένων. Μετά τη δημιουργία της βάσης δεδομένων, χρησιμοποιήστε την κεντρική διαχείριση του Windows SharePoint Services για να προσθέσετε τη βάση δεδομένων με τον εικονικό διακομιστή.
Χρησιμοποιήστε αυτήν τη μέθοδο όταν θέλετε να δημιουργήσετε μια νέα βάση δεδομένων θα χρησιμοποιηθεί ως βάση δεδομένων περιεχομένου για τις υπηρεσίες Windows SharePoint Services. Για παράδειγμα, μπορεί να θέλετε να το κάνετε αυτό σε ένα περιβάλλον όπου ισχύουν οι ακόλουθες συνθήκες:
- Έχετε έναν υπολογιστή που εκτελεί τον Microsoft SQL Server 2000. (Ισχύει μόνο στο Windows SharePoint Services 2.0, ο SharePoint Portal Server 2003, υπηρεσίες Windows SharePoint 3.0 και Microsoft Office SharePoint Services 2007)
- Μπορείτε να χρησιμοποιήσετε πολλές εμφανίσεις του SQL Server.
- You use different storage area networks (SANs) to store content.
Step a: Use SQL Query Analyzer to create the database
Use SQL Query Analyzer to create a new content database for use with the virtual server in Windows SharePoint Services. You cannot use the Create Database Wizard in the SQL Server Enterprise Manager tool to create the new database. Instead, run the following two queries in SQL Query Analyzer. When you use the following queries, make sure that you do the following:
- Replace each instance ofWSS_Contentin the queries with the name that you want to use for the database.
- Replace each instance ofAdminVsAppPoolIdentityin the query with the account that is the SharePoint Central Administration virtual server application pool identity. This account is also the database owner (dbo) of the database.
- Replace each instance ofContentVsAppPoolIdentityin the query with the account that is the content virtual server application pool identity.
- Replace each instance ofΤΟΜΕΑΣin the query with the domain name.
Use the following query to create the database:
-- Windows SharePoint Services Content Database Creation Script
-- TODO: Change the database name from WSS_Content to the name of the database that you want to use
CREATE DATABASE [WSS_Content] COLLATE Latin1_General_CI_AS_KS_WS
exec sp_dboption [WSS_Content], autoclose, false
GO
Use the following query to configure permissions for the database that you created:
-- Windows SharePoint Services Content Database Creation Script
use WSS_Content
-- TODO: Change AdminVsAppPoolIdentity to the SharePoint Central Administration virtual server application pool account and change ContentVsAppPoolIdentity to the content virtual server application pool account.
DECLARE @AdminVsAppPoolIdentity nvarchar(128)
DECLARE @ContentVsAppPoolIdentity nvarchar(128)
SET @AdminVsAppPoolIdentity = N'Domain\AdminVsAppPoolIdentity'
SET @ContentVsAppPoolIdentity = N'Domain\ContentVsAppPoolIdentity'
EXEC sp_grantlogin @ContentVsAppPoolIdentity;
EXEC sp_grantlogin @AdminVsAppPoolIdentity;
-- The following line will fail with error 15007 if @AdminVsAppPoolIdentity is the Network Service account. This is expected.
EXEC sp_changedbowner @AdminVsAppPoolIdentity;
-- The following line will fail with error 15063 if the account is not the Network Service account. This is expected.
IF NOT EXISTS (SELECT * FROM sysusers WHERE name=@ContentVsAppPoolIdentity) EXEC sp_grantdbaccess @ContentVsAppPoolIdentity;
-- The following line will fail with error 15410 if the account is not the Network Service account. This is expected.
EXEC sp_addrolemember 'db_owner', @ContentVsAppPoolIdentity;
To run a query in SQL Query Analyzer in SQL 2000, follow these steps:
- Κάντε κλικStart, τοποθετήστε το δείκτηΌλα τα προγράμματα, τοποθετήστε το δείκτηMicrosoft SQL Server, και στη συνέχεια κάντε κλικ στο κουμπίΑνάλυση του ερωτήματος.
- ΣτοConnect to SQL Serverdialog box, specify the instance of SQL Server that you want to connect to, specify the type of authentication that you want to use, and then clickOk.
- Paste the query in the Editor pane of SQL Query Analyzer. Then, modify the query to use the name that you want for the database and to use the appropriate accounts.
- Κάντε κλικExecute Query.
To run a query in SQL Query Analyzer in SQL 2005 or in SQL 2008, follow these steps:
- 1. ClickStart, τοποθετήστε το δείκτηΌλα τα προγράμματα, τοποθετήστε το δείκτηMicrosoft SQL Server 2005/2008, και στη συνέχεια κάντε κλικ στο κουμπίManagement Studio.
- 2. In theConnect to SQL Serverdialog box, specify the instance of SQL Server that you want to connect to, specify the type of authentication that you want to use, and then clickOk
- Κάντε κλικΔημιουργία ερωτήματος, and then paste the query in the Editor pane of SQL Query Analyzer. Then, modify the query to use the name that you want for the database and to use the appropriate accounts.
- Κάντε κλικExecute Query.
Step b: Add the content database to the virtual server
Use Windows SharePoint Services Central Administration to add the content database to the virtual server. Για να το κάνετε αυτό, ακολουθήστε τα εξής βήματα: (Use the tools in the Windows Recovery Environment to repair Windows Vista. To do this, follow these steps:).
If you are running Windows SharePoint Services 2.0
- Κάντε κλικStart, τοποθετήστε το δείκτηΌλα τα προγράμματα, τοποθετήστε το δείκτηSharePoint Portal Server, και στη συνέχεια κάντε κλικ στο κουμπίSharePoint κεντρικής διαχείρισης.
- If you are running Microsoft Office SharePoint Portal Server 2003, clickWindows SharePoint Servicesστο αριστερό τμήμα του παραθύρου.
- underVirtual Server ConfigurationΚάντε κλικConfigure virtual
server settings.
- On the Virtual Server List page, click the name of the virtual
server where you want to add the database.
- underVirtual Server Managementon the Virtual Server Settings page, clickManage content
databases.
- underContent Databaseson the Manage Content Databases page, clickAdd a content database.
- ΣτοDatabase Informationarea of the Add Content Database page, clickSpecify database server
settings, and then specify the name
of the database and the name of the database server.
- ΣτοDatabase Capacity Settingsarea, type the number that you
want in theNumber of sites before a warning event is generatedπλαίσιο και στη συνέχεια κάντε κλικOk.
ΣΗΜΕΙΩΣΗIf you configured permissions for the database with the NT Authority\Network Service account, you have to add the Network Service account to the System Administrators role in SQL Server before you can follow this step. You cannot make the Network Service account the database owner (dbo) of the database. You have to add the Network Service account to the System Administrators role before you can add the database to the virtual server. After you add the database to the virtual server, remove the Network Service account from the System Administrators role in SQL Server.
If you are running Microsoft SharePoint Foundation 2010
- Κάντε κλικStart, τοποθετήστε το δείκτηΌλα τα προγράμματα, τοποθετήστε το δείκτηΕργαλεία διαχείρισης, και στη συνέχεια κάντε κλικ στο κουμπίSharePoint 4.0 Central Administration.
- Κάντε κλικApplication Management, και στη συνέχεια κάντε κλικ στο κουμπίManage Content databasesunderΒάσεις δεδομένων.
- On the Manage Content Databases page, clickAdd a content database.
- ΣτοWeb Applicationarea, click the name of the Web application to which you want to add the content database.
- ΣτοDatabase Name and Authenticationarea, specify the name of the database, the name of the database server, and the authentication method.
- ΣτοDatabase Capacity Settingsarea, type the number that you want in theNumber of sites before a warning event is generatedπλαίσιο και με τοMaximum number of sites that can be created in this databaseπλαίσιο και στη συνέχεια κάντε κλικOk.
ΣΗΜΕΙΩΣΗIf you configured permissions for the database with the NT Authority\Network Service account, you have to add the Network Service account to the System Administrators role in SQL Server before you can follow this step. You cannot make the Network Service account the database owner (dbo) of the database. You have to add the Network Service account to the System Administrators role before you can add the database to the virtual server. After you add the database to the virtual server, remove the Network Service account from the System Administrators role in SQL Server.
If you are running Windows SharePoint Services 3.0
- Κάντε κλικStart, τοποθετήστε το δείκτηΌλα τα προγράμματα, τοποθετήστε το δείκτηΕργαλεία διαχείρισης, και στη συνέχεια κάντε κλικ στο κουμπίΚεντρική διαχείριση του SharePoint 3.0.
- Κάντε κλικApplication Management, και στη συνέχεια κάντε κλικ στο κουμπίContent databasesunderSharePoint Web Application
Management.
- On the Manage Content Databases page, clickAdd a content database.
- ΣτοWeb Applicationarea, click the name of the Web application to which you
want to add the content database.
- ΣτοDatabase Name and Authenticationarea, specify the name of the database,
the name of the database server, and the authentication method.
- ΣτοDatabase Capacity Settingsarea, type the number that you want in theNumber of sites before a warning event is generatedπλαίσιο και με τοΜέγιστος αριθμός τοποθεσιών που μπορούν να δημιουργηθούν σε αυτήν τη βάση δεδομένωνπλαίσιο και στη συνέχεια κάντε κλικOk.
ΣΗΜΕΙΩΣΗΕάν έχετε ρυθμίσει τα δικαιώματα για τη βάση δεδομένων με το λογαριασμό NT Authority\Network Service, πρέπει να προσθέσετε στο λογαριασμό Network Service στο ρόλο διαχειριστές συστήματος στον SQL Server πριν να ακολουθήσετε αυτό το βήμα. Δεν μπορείτε να δημιουργήσετε το λογαριασμό του κατόχου βάσης δεδομένων (dbo) της βάσης δεδομένων της υπηρεσίας δικτύου. Πρέπει να προσθέσετε στο λογαριασμό Network Service του ρόλου διαχειριστών του συστήματος για να προσθέσετε τη βάση δεδομένων με τον εικονικό διακομιστή. Μετά την προσθήκη της βάσης δεδομένων με τον εικονικό διακομιστή, θα πρέπει να καταργήσετε τον λογαριασμό υπηρεσίας δικτύου από το ρόλο διαχειριστές συστήματος στον SQL Server.
ΑΝΤΙΜΕΤΩΠΙΣΗ ΠΡΟΒΛΗΜΑΤΩΝ
Όταν προσπαθείτε να προσθέσετε μια νέα βάση δεδομένων με τον εικονικό διακομιστή στη σελίδα "Διαχείριση βάσεων δεδομένων περιεχομένων" της κεντρικής διαχείρισης του Windows SharePoint Services, λαμβάνετε ένα από τα ακόλουθα μηνύματα λάθους:
Βάση δεδομένων 'Όνομα βάσης δεδομένων' υπάρχει ήδη. (Κωδικός σφάλματος: 1801).
Δεν μπορεί να επιλύσει διένεξης συρραφής για ισότητας για τη λειτουργία του (κωδικός σφάλματος: 446)
Αυτό το ζήτημα προκύπτει, εάν η βάση δεδομένων που δημιουργήσατε δεν χρησιμοποιεί τη ρύθμιση συρραφής σωστό ή το σωστό dbo. Αυτό το ζήτημα παρουσιάζεται όταν δημιουργήσατε τη βάση δεδομένων, χρησιμοποιώντας τον "Οδηγό δημιουργίας βάσης δεδομένων", στο εργαλείο SQL Server Enterprise Manager. Αντί να χρησιμοποιήσετε τον "Οδηγό δημιουργίας βάσης δεδομένων" για να δημιουργήσετε τη βάση δεδομένων, χρησιμοποιήστε τον SQL Query Analyzer για να εκτελέσετε το ερώτημα που περιγράφεται στο βήμα ένα για να δημιουργήσετε τη βάση δεδομένων.
Ενδέχεται επίσης να εμφανιστεί το ακόλουθο μήνυμα λάθους στο Windows SharePoint Services 3.0:
Λεπτομέρειες συμβάντος
Προέλευσης: Υπηρεσιών Windows SharePoint Services 3
ΑΝΑΓΝΩΡΙΣΤΙΚΌ: 5586
Μήνυμα: Παρουσιάστηκε άγνωστο 208 εξαίρεση SQL. Πρόσθετες πληροφορίες σφάλματος από το διακομιστή SQL περιλαμβάνονται πιο κάτω.
Το αντικείμενο δεν είναι έγκυρο όνομα 'dbo.SystemVersion'.
Πρόκειται για ένα γνωστό θέμα και μπορείτε να το παραβλέψετε το σφάλμα.
Στο Microsoft SharePoint υποδομής 2010, ενδέχεται να εμφανιστεί μετά από σφάλμα:
Καταγραφή ονόματος: εφαρμογή
Προέλευση: Προϊόντα του Microsoft SharePoint-SharePoint υποδομής
Ημερομηνία: hh:mm:ss μμ/ηη/εεεε
Το Αναγνωριστικό συμβάντος: 4972
Εργασία κατηγορία: βάση δεδομένων
Επίπεδο: κρίσιμη
Λέξεις-κλειδιά:
Χρήστης: τομέας\χρήστης
Υπολογιστής: μηχάνημα.Όνομα_τομέα (Domain_name).com
Περιγραφή:
Η Συρραφή SQL Server στην παρουσία του SQL Server 'Domain\DB' δεν υποστηρίζεται. Microsoft SharePoint υποδομής 4 απαιτεί μια σειρά λεξικό Latin1 Γενικά, καταργείται η διάκριση, έμφασης ευαίσθητα, κάνα πεζών-κεφαλαίων και πεζών-κεφαλαίων συρραφής πλάτους (Latin1_General_CI_AS_KS_WS).
Για περισσότερες πληροφορίες σχετικά με τον τρόπο χρήσης της SQL Query Analyzer, ανατρέξτε στη Βοήθεια για το SQL Query Analyzer.
Για περισσότερες πληροφορίες σχετικά με τον τρόπο ρύθμισης των παραμέτρων και τη διαχείριση των υπηρεσιών Windows SharePoint Services, δείτε την
Τα Microsoft Windows SharePoint Services Administrator's Guide. Για να αποκτήσετε το
Τα Microsoft Windows SharePoint Services Administrator's Guideεπισκεφθείτε την ακόλουθη τοποθεσία της Microsoft στο Web:
Για περισσότερες πληροφορίες σχετικά με τον τρόπο ανάπτυξης του Windows SharePoint Services 3.0 σε ένα περιβάλλον στο οποίο οι διαχειριστές βάσης δεδομένων (DBAs) να δημιουργήσετε και να διαχειριστείτε βάσεις δεδομένων, επισκεφθείτε την ακόλουθη τοποθεσία της Microsoft στο Web:
Η Microsoft παρέχει παραδείγματα προγραμματισμού μόνο για λόγους επεξήγησης, χωρίς να παρέχει καμία εγγύηση, σιωπηρή ή ρητή. Σε αυτά περιλαμβάνονται, ενδεικτικά, οι σιωπηρές εγγυήσεις εμπορευσιμότητας ή/και καταλληλότητας για συγκεκριμένο σκοπό. Αυτό το άρθρο προϋποθέτει ότι είστε εξοικειωμένοι με τη γλώσσα προγραμματισμού που παρουσιάζεται, καθώς και με τα εργαλεία που χρησιμοποιούνται για τη δημιουργία και τον εντοπισμό σφαλμάτων κώδικα διαδικασιών. Οι μηχανικοί υποστήριξης της Microsoft μπορούν να σας εξηγήσουν τη λειτουργικότητα μιας συγκεκριμένης διαδικασίας. Ωστόσο, δεν θα τροποποιήσουν αυτά τα παραδείγματα για να παράσχουν πρόσθετες λειτουργίες, ούτε θα δημιουργήσουν διαδικασίες, για να καλύψουν τις συγκεκριμένες απαιτήσεις σας.