Large-scale MSSQL management method, system and computer equipment based on service center
Through the service center-based management method, the problem of low access management efficiency in large-scale MSSQL clusters is solved, efficient permission management and control of large-scale MSSQL is realized, and the management process is simplified.
Patent Information
- Application Number
- CN202010630377.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-03
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2040-07-03
Smart Images

Figure CN111897872B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of database technology, and in particular to a large-scale MSSQL management method, system, computer equipment and storage medium based on a service center. Background Art
[0002] With the development of database technology, when the number of MSSQL instances is relatively large, developers and database administrators need to frequently check data and various change requirements, as well as database resource management issues. However, in related technologies, through third-party tools or tools officially provided by MSSQL, a separate link needs to be established for access to each MSSQL instance. When performing permission management, each user and MSSQL instance needs to be authorized. For large-scale MSSQL clusters, the authorization operation will take a lot of time. At the same time, there are certain requirements and restrictions on the server where MSSQL is located.
[0003] In view of the problem of low efficiency in access management of large-scale MSSQL instances in related technologies, no effective solution has been proposed yet. Summary of the invention
[0004] Based on this, it is necessary to provide a service center-based MSSQL management method, device, computer equipment and storage medium to address the above technical issues.
[0005] According to one aspect of the present invention, a large-scale MSSQL management method based on a service center is provided, the method comprising:
[0006] Receive a data request, and determine an available business line according to the authority scope of the data request initiator;
[0007] Obtaining a cluster number corresponding to a specified service line among the available service lines, and determining node information according to the cluster number;
[0008] The designated library and the command statement in the node information are obtained, and the command operation is executed in the designated library according to the command statement.
[0009] In one embodiment, obtaining the designated library and the command statement in the node information, and executing the command operation in the designated library according to the command statement includes:
[0010] Obtaining the specified library and query statement in the node information;
[0011] The query permission is determined according to the query statement, and a query operation is performed in the designated library according to the query permission.
[0012] In one embodiment, determining the query permission according to the query statement, and performing a query operation in the specified library according to the query permission includes:
[0013] Determine query permissions and query rules according to the query statement;
[0014] A query operation is performed in the designated library according to the query authority to obtain a query result, and the query result is returned according to the query rule.
[0015] In one embodiment, obtaining the designated library and the command statement in the node information, and executing the command operation in the designated library according to the command statement includes:
[0016] Obtaining the specified library and change statement in the node information;
[0017] The change authority is determined according to the change statement, and when the change authority is satisfied, the change operation is performed in the designated library according to the change statement.
[0018] In one embodiment, determining the change permission according to the change statement includes:
[0019] The change type is obtained, and the change permission is determined according to the change type and the change statement.
[0020] In one embodiment, after obtaining the designated library and the change statement in the node information, the method includes:
[0021] Backing up the configuration information corresponding to the change statement and generating a rollback statement;
[0022] A change operation is performed in the specified library according to the change statement.
[0023] In one embodiment, after executing the command operation in the specified library according to the command statement, the method includes:
[0024] The command operation information is recorded, wherein the command operation information includes at least one of the following: a command requester, a command executor, an execution time, and a command operation content.
[0025] In one embodiment, after obtaining the designated library and command statement in the node information, the method includes:
[0026] Performing standard verification on the command statement;
[0027] When the specification verification passes, the command operation is executed in the designated library according to the command statement.
[0028] According to another aspect of the present invention, there is also provided a large-scale MSSQL management system based on a service center, the system comprising a service center and a meta-information system, the service center being used to receive a data query request and determine a business line according to the authority scope of the initiator of the data query request;
[0029] The meta-information system is used to obtain the cluster number corresponding to the business line and call the service center according to the cluster number.
[0030] The service center determines the node information according to the cluster number; obtains the designated library and the command statement in the node information, and executes the command operation in the designated library according to the command statement.
[0031] According to another aspect of the present invention, a computer device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned large-scale MSSQL management method based on the service center when executing the computer program.
[0032] According to another aspect of the present invention, there is further provided a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the MSSQL management method based on the service center when executed by a processor.
[0033] The above-mentioned large-scale MSSQL management method, system, computer device and storage medium based on the service center receive data requests, determine the business line according to the authority scope of the data request initiator, obtain the cluster number corresponding to the business line, and the service center determines the node information according to the cluster number; obtains the specified library and command statement in the node information, and executes the command operation in the specified library according to the command statement. Based on the service center, there is no need to authorize each user and MSSQL instance, and there is no need to establish an access link for each MSSQL instance, so as to realize the authority management and control of large-scale MSSQL. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0035] Figure 1 This is an application scenario diagram of a large-scale MSSQL management method based on a service center according to an embodiment of the present invention;
[0036] Figure 2 is a flow chart of a large-scale MSSQL management method based on a service center according to an embodiment of the present invention;
[0037] Figure 3is a flow chart of large-scale MSSQL data query based on a service center according to one embodiment of the present invention;
[0038] Figure 4 is a flow chart of a large-scale MSSQL change operation based on a service center according to an embodiment of the present invention;
[0039] Figure 5 is a flowchart of a large-scale MSSQL operation audit based on a service center according to an embodiment of the present invention;
[0040] Figure 6 is a flow chart of a large-scale MSSQL standard audit based on a service center according to an embodiment of the present invention;
[0041] Figure 7 is a flowchart of a large-scale MSSQL data query based on a service center according to a specific embodiment of the present invention;
[0042] Figure 8 This is a flow chart of a large-scale MSSQL change operation based on a service center according to a specific embodiment of the present invention;
[0043] Fig. 9 is a schematic diagram of a large-scale MSSQL management system based on a service center according to an embodiment of the present invention;
[0044] Fig.10 It is a schematic diagram of large-scale MSSQL management computer equipment based on a service center according to an embodiment of the present invention. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0046] Obviously, the drawings described below are only some examples or embodiments of the present application. For ordinary technicians in this field, the present application can also be applied to other similar scenarios based on these drawings without creative work. In addition, it can also be understood that although the efforts made in this development process may be complicated and lengthy, for ordinary technicians in this field related to the content disclosed in this application, some changes in design, manufacturing or production based on the technical content disclosed in this application are just conventional technical means, and should not be understood as insufficient content disclosed in this application.
[0047] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those of ordinary skill in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0048] Unless otherwise defined, the technical terms or scientific terms involved in this application should be understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the" and the like involved in this application do not indicate a quantitative limitation, and may represent the singular or plural. The terms "include", "comprise", "have" and any of their variations involved in this application are intended to cover non-exclusive inclusions; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects before and after are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0049] Figure 1 is an application scenario diagram of the large-scale MSSQL management method based on the service center provided by the present application according to one embodiment of the present invention. The method provided by the present invention can be applied to the following: Figure 1In the application environment shown. Among them, the terminal 102 and the server 104 communicate with the central server 106 through the network. MSSQL instances are deployed on the terminal 102 and the server 104. Optionally, each MSSQL instance has a unique cluster number. The service center is configured on the central server 106. The service center receives the data request, determines the available business line according to the authority range of the data request initiator, obtains the cluster number corresponding to the specified business line in the available business line, determines the node information according to the cluster number, such as the server 104, obtains the specified library and command statement in the server 104, and executes the command operation in the specified library according to the command statement. Among them, the terminal 102 can be, but not limited to, various personal computers, laptops, smart phones, servers or server clusters, etc. The server 104 and the central server 106 can be, but not limited to, various personal computers, independent servers or server clusters composed of multiple servers.
[0050] In one embodiment, Figure 2 FIG. 4 is a flow chart of a large-scale MSSQL management method based on a service center according to an embodiment of the present invention. Figure 2 As shown in the figure, a large-scale MSSQL management method based on a service center is provided. Figure 1 Taking the central server 106 in the example as an example, the following steps are included:
[0051] Step S210, receiving a data request, and determining an available business line according to the authority scope of the data request initiator;
[0052] Step S220, obtaining a cluster number corresponding to a specified service line in the available service lines, and determining node information according to the cluster number;
[0053] Step S230, obtaining the designated library and command statement in the node information, and executing the command operation in the designated library according to the command statement.
[0054] In step S210 to step S230, based on the service center, the authority control of MSSQL data requests can be implemented. When a user initiates a data request, the central server will provide the business line within the scope of the user's authority according to the user's authority, and then the central server calls the meta-information system such as the Configuration Management Database (CMDB) to obtain all MSSQL instance information under the business line, using the cluster number as the unique identifier. According to the cluster number, the service center API is called to obtain the corresponding library node information. Combined with the IP and port of the library and the default viewing user, all corresponding library names can be obtained. The user can select the specified library name by himself and enter the command statement. The service center will execute the command on the specified library according to the above command statement. The above command can be a data query command or a data change command.
[0055] As a middleware service, the service center can be deployed on multiple servers to provide database management, load balancing, automatic online and offline, and distributed services. Database management refers to the service of registering and destroying the database (Database, DB). By receiving the IP address and port pair of the incoming DB service, a node name is provided to the outside world. A node can correspond to one or more services. The service center includes node name and node value. Optionally, the node name format can be: / db / mssql / sl_9901, the node value format is: 10.11.12.13:9901, a node name can register one or more IP addresses and port pairs, the master node name is: / db / mssql / sl_9901, 9901 is the MSSQL port number, or the cluster number, the slave node name is: / db / mssql / ss_9901; the node / db / mssql / ss_9901 can correspond to DB services 10.2.3.4:9901, 10.2.3,5:9901, 10.2.3.6:9901, which is convenient for managing the service center. The load balancing function means that all services corresponding to a node name can evenly bear requests. The automatic online and offline function means that the service center regularly detects the service status corresponding to all node names. If a service is found to be unavailable, the service center will offline the service. If a service that has been offline is restored, the service center will automatically online the service. The service center is dynamic, not static. The service center monitors the service to detect whether the node value corresponding to the node name is available. If it is unavailable, it is marked as offline, otherwise it is marked as online. Distributed service means that the service center can be deployed in multiple computer rooms to support large-scale service registration and access to the service center. Optionally, the above service center can be implemented using Qconf middleware.
[0056] In some embodiments, when creating an MSSQL instance, the MSSQL instance meta information is recorded in a meta information system such as a CMDB, including: MSSQL port number, cluster number, business name, character set, business line name, role, and server IP address. Among them, the cluster number uniquely distinguishes the MSSQL instance, and the cluster number and port number can be set to be the same by default. Optionally, the cluster number and port number can be set differently when there are duplicate port numbers. The role indicates whether the MSSQL is a master library or a slave library, and a business line can include one or more MSSQL instances. Then, the server center update module is called, combined with the CMDB, to automatically update the service center. The above-mentioned large-scale MSSQL management method based on the service center dynamically obtains the specific information of each MSSQL instance in the meta information system through the service center, without the need to authorize each user and MSSQL instance, and without the need to establish an access link for each MSSQL instance, so as to achieve permission management and control for large-scale MSSQL.
[0057] In one embodiment, obtaining the designated library and command statement in the node information, and executing the command operation in the designated library according to the command statement includes: obtaining the designated library and query statement in the node information; determining the query authority according to the query statement, and executing the query operation in the designated library according to the query authority. This embodiment realizes customized query of MSSQL data. Based on the authority control of the service center, the user can select the business line within the authority range, and obtain the query result by inputting the data query statement. The user does not need to apply for each MSSQL authority, and can query the data in the business line within the authority range, thereby improving the efficiency of the query and protecting the privacy of other business lines.
[0058] In one embodiment, Figure 3 FIG. 1 is a flowchart of MSSQL data query based on the service center according to an embodiment of the present invention. Figure 3 As shown, determining the query permission according to the query statement and performing the query operation in the specified library according to the query permission includes the following steps:
[0059] Step S310, determining the query authority and query rules according to the query statement;
[0060] Step S320, performing a query operation in the specified library according to the query authority to obtain the query result, and returning the query result according to the query rule.
[0061] In step S310 to step S320, after obtaining the designated library and query statement selected by the terminal user, the custom logic module of the service center is called, which analyzes the structured query language (SQL) input by the user and customizes the access rules to achieve access restrictions. For example, shielding part of the information of sensitive fields, limiting the number of returned result records, or restricting access to certain tables. Then call the MSSQL driver, execute the query, and return the query results to the terminal user according to the query rules. The MSSQL query method provided in this embodiment can achieve permission control without applying for each MSSQL permission, and can customize query requirements to improve the efficiency of customized queries.
[0062] In one embodiment, Figure 4 FIG. 1 is a flowchart of a large-scale MSSQL change operation based on a service center according to an embodiment of the present invention. Figure 4 As shown, obtaining the specified library and command statement in the node information, and executing the command operation in the specified library according to the command statement include:
[0063] Step S410, obtaining the specified library and change statement in the node information;
[0064] Step S420, determining the change authority according to the change statement, and executing the change operation in the designated library according to the change statement when the change authority is satisfied.
[0065] In step S410 to step S420, flexible changes to MSSQL data are implemented. Based on the permission control of the service center, users can select business lines within the scope of permission and perform change operations by entering change statements. Users do not need to apply for each MSSQL permission and can perform change operations on data in business lines within the scope of permission, which improves the efficiency of operations and protects the data security of other business lines.
[0066] In one embodiment, determining the change permission according to the change statement includes: obtaining the change type, and determining the change permission according to the change type and the change statement. The change type includes but is not limited to operation types such as database creation, table creation, field change, data change, etc. The operation type can be preset according to actual application requirements, and the change permission of each operation type can be specified. In this embodiment, by adding the operation type option in the MSSQL change operation, the change operation permission is further refined, and the risk of failure is reduced, and the erroneous execution of high-risk change operations is prevented.
[0067] In one embodiment, after obtaining the designated library and the change statement in the node information, the configuration information corresponding to the change statement is backed up and a rollback statement is generated; the change operation is performed in the designated library according to the change statement. In this embodiment, before executing the change statement, the existing data is backed up, and the backup process is optionally completed through a metadata system such as a CMDB. And a rollback statement is generated based on the change statement and the backup content, so as to facilitate the rapid rollback of the data change operation in the event of a change failure, etc., to reduce losses.
[0068] In one embodiment, Figure 5 The flowchart of a large-scale MSSQL operation audit based on a service center according to an embodiment of the present invention, after executing a command operation in a specified library according to a command statement, the method includes:
[0069] Step S510, record the command operation information. The command operation information includes at least one of the following: command requester, command executor, execution time and command operation content. Optionally, when the command operation is a data query, the query behavior is recorded to the audit module, including but not limited to: query SQL, executor, query time, number of query records and other information; when the command operation is a change operation, the change operation is recorded to the audit module, including but not limited to: applicant, executor, operation time, execution statement and number of affected record rows and other information. The above-mentioned recording process of command operations improves the traceability of command operation execution and facilitates management personnel to audit operations.
[0070] In one embodiment, Figure 6 FIG. 1 is a flowchart of a large-scale MSSQL standard audit based on a service center according to an embodiment of the present invention. Figure 6 As shown, after obtaining the specified library and command statement in the node information, the method includes the following steps:
[0071] Step S610, perform a standard check on the command statement. That is, perform a standard check on the SQL statement. If it does not meet the MSSQL standard, the execution can be stopped. Optionally, a modification prompt can also be given according to the SQL standard.
[0072] Step S620: If the specification check passes, execute the command operation in the specified library according to the command statement. After passing the SQL specification check, call the MSSQL driver, execute the SQL and return the execution result, which may include the execution status and the abnormal reason.
[0073] In step S610 to step S620, the reliability and success rate of MSSQL command execution are improved by performing standard verification on the received SQL statement.
[0074] In a specific embodiment, Figure 7FIG. 1 is a flowchart of a large-scale MSSQL data query based on a service center according to a specific embodiment of the present invention. Figure 7 As shown, the following steps are included:
[0075] Step S710: Obtain the business line. Obtain the business line within the scope of authority selected by the terminal user.
[0076] Step S720, obtain the cluster number. Call CMDB to obtain all MSSQL instance information under the business line, using the cluster number as an identifier;
[0077] Step S730, get the library. According to the cluster number, call the service center API to automatically get the corresponding slave library node information. Combined with the IP and port of the slave library and the default viewing user, all corresponding library names can be obtained. Users can select the required library name.
[0078] Step S740: command statement analysis and customization. Obtain the query SQL input by the terminal user, call the custom logic module, and analyze and customize the SQL input by the user to implement access restrictions, such as shielding some information of sensitive fields, limiting the number of returned result records, or restricting access to certain tables;
[0079] Step S750, execute the query. Call the MSSQL driver to execute the query and return the result;
[0080] Step S760, obtain audit information. Record the query operation to the audit module, including: query SQL, executor, query time, number of query records and other information.
[0081] Through the simple operations above, users can easily access MSSQL data without applying for each MSSQL permission. They can customize query requirements to meet various actual needs.
[0082] Figure 8 FIG. 1 is a flow chart of a large-scale MSSQL change operation based on a service center according to a specific embodiment of the present invention. Figure 8 As shown, the following steps are included:
[0083] Step S810, obtaining the operation type. The operation type includes database creation, table creation, field change, data change, etc., which can be set and adjusted according to needs;
[0084] Step S820, obtaining the business line. Obtain the business line within the authority range selected by the terminal user for authority control;
[0085] Step S830, obtain the cluster number. Call CMDB to select the cluster number, combine the cluster number, call the service center API, obtain the corresponding node value, that is, the IP and port of the MSSQL instance, and then call the MSSQL driver to obtain all the library names of the MSSQL instance;
[0086] Step S840, obtaining a library. Obtaining the library name selected by the terminal user according to the requirements;
[0087] Step S850: SQL verification. The SQL entered by the client user is obtained and analyzed. If it does not meet the permissions corresponding to the operation type, a prompt will be given. At the same time, the MSSQL specification is integrated to perform a standard verification on the SQL. If it does not meet the MSSQL specification, a prompt will be given.
[0088] Step S860, execute the change. After the input SQL passes the SQL verification, call the MSSQL driver, execute the SQL and return the execution result, which includes whether the execution status is successful and possible reasons for failure, etc.;
[0089] Step S870, obtain audit information. Record the audit information of the change operation, which includes: applicant, executor, operation time, executed SQL and number of affected record rows, etc., to facilitate managers to audit user behavior. Optionally, in order to facilitate users to view changes, these changes are automatically recorded to CMDB after execution, and historical changes can be viewed and cloned, so that users can submit new change requirements. In some embodiments, data changes can also have a backup function to generate rollback SQL to facilitate rapid rollback of data changes.
[0090] The large-scale MSSQL management method based on the service center in the above specific embodiment, combined with CMDB and service center, can manage MSSQL meta information, inherit MSSQL specifications and custom requirements, as well as automatic backup modules, and user authority control, which can easily realize large-scale MSSQL data custom query and change. CMDB can manage large-scale MSSQL meta information, as the entrance to MSSQL resource management, provide meta information sources for data query and change, and facilitate managers to understand the current situation of MSSQL at any time and improve MSSQL management capabilities. Combined with CMDB and service center, MSSQL instances can be automatically registered to the service center to facilitate MSSQL data query and change calls. The service center monitoring service can monitor the MSSQL service status in time, automatically go online and offline fault nodes, and can also transparently adjust MSSQL instances, which is transparent to users and convenient for managing large-scale MSSQL instances. The method obtains the IP and port of MSSQL through the service center API, which is more convenient and flexible. Users do not need to apply for each MSSQL permission, and can query and change data through the system authority control. The method can inherit the MSSQL specification, ensure that the MSSQL specification is implemented, meet actual needs, and implement user behavior auditing, which can ensure safe access to MSSQL. The change function can realize automatic operation, making it convenient for users to submit requirements at any time, reducing the cost of MSSQL management personnel and improving efficiency.
[0091] It should be understood that although Figures 2 to 8 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figures 2 to 8 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0092] In one embodiment, Fig. 9 FIG. 1 is a schematic diagram of a large-scale MSSQL management system based on a service center according to an embodiment of the present invention. Fig. 9 As shown, a large-scale MSSQL management system based on a service center is provided, including a service center 902 and a meta information system 904, wherein the service center 902 is used to receive a data query request and determine a business line according to the authority scope of the data query request initiator;
[0093] The meta information system 904 is used to obtain the cluster number corresponding to the business line and call the service center according to the cluster number.
[0094] The service center 902 determines the node information according to the cluster number; obtains the designated library and command statement in the node information, and executes the command operation in the designated library according to the command statement.
[0095] For the specific definition of the large-scale MSSQL management system based on the service center, please refer to the definition of the large-scale MSSQL management method based on the service center above, which will not be repeated here. Each module in the large-scale MSSQL management device based on the service center can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0096] In one embodiment, a computer device is provided. Fig.10 Schematic diagram of a large-scale MSSQL management computer device based on a service center according to an embodiment of the present invention. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Fig.10 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store MSSQL management data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a large-scale MSSQL management method based on a service center is implemented.
[0097] Those skilled in the art will understand that Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0098] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the above-mentioned large-scale MSSQL management method based on the service center is implemented.
[0099] The above-mentioned large-scale MSSQL management computer equipment based on the service center receives data requests, determines the business line according to the authority scope of the data request initiator, obtains the cluster number corresponding to the business line, and the service center determines the node information according to the cluster number; obtains the specified library and command statement in the node information, and executes the command operation in the specified library according to the command statement. Based on the service center, there is no need to authorize each user and MSSQL instance, and there is no need to establish an access link for each MSSQL instance, so as to realize the authority management and control of large-scale MSSQL.
[0100] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the large-scale MSSQL management method based on the service center is implemented.
[0101] The above-mentioned large-scale MSSQL management computer-readable storage medium based on the service center receives a data request, determines the business line according to the authority scope of the data request initiator, obtains the cluster number corresponding to the business line, and the service center determines the node information according to the cluster number; obtains the specified library and command statement in the node information, and executes the command operation in the specified library according to the command statement. Based on the service center, there is no need to authorize each user and MSSQL instance, and there is no need to establish an access link for each MSSQL instance, so as to realize the authority management and control of large-scale MSSQL.
[0102] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0103] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0104] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A large-scale MSSQL management method based on a service center, characterized in that: The method comprises: Receive a data request, and determine an available business line according to the authority scope of the data request initiator; Obtain the cluster number corresponding to the specified business line in the available business lines, and determine the node information according to the cluster number; use the cluster number as a unique identifier, call the service center API according to the cluster number, and obtain the corresponding node information; The designated library and the command statement in the node information are obtained, and the command operation is executed in the designated library according to the command statement.
2. The method according to claim 1, characterized in that The obtaining of the designated library and the command statement in the node information, and executing the command operation in the designated library according to the command statement comprises: Obtaining the specified library and query statement in the node information; The query authority is determined according to the query statement, and the query operation is performed in the designated library according to the query authority.
3. The method according to claim 2, characterized in that Determining the query permission according to the query statement, and performing a query operation in the designated library according to the query permission includes: Determine query permissions and query rules according to the query statement; A query operation is performed in the designated library according to the query authority to obtain a query result, and the query result is returned according to the query rule.
4. The method according to claim 1, characterized in that: The obtaining of the designated library and the command statement in the node information, and executing the command operation in the designated library according to the command statement comprises: Obtaining the specified library and change statement in the node information; The change authority is determined according to the change statement, and when the change authority is satisfied, the change operation is performed in the designated library according to the change statement.
5. The method according to claim 4, characterized in that Determining the change authority according to the change statement includes: The change type is obtained, and the change permission is determined according to the change type and the change statement.
6. The method according to claim 4, characterized in that After obtaining the designated library and the change statement in the node information, the method includes: Backing up the configuration information corresponding to the change statement and generating a rollback statement; A change operation is performed in the specified library according to the change statement.
7. The method according to claim 1, characterized in that After executing the command operation in the specified library according to the command statement, the method includes: The command operation information is recorded, wherein the command operation information includes at least one of the following: a command requester, a command executor, an execution time, and a command operation content.
8. The method according to claim 1, characterized in that After obtaining the designated library and command statement in the node information, the method includes: Performing standard verification on the command statement; When the specification verification passes, the command operation is executed in the designated library according to the command statement.
9. A large-scale MSSQL management system based on a service center, characterized in that: The system includes a service center and a meta-information system, wherein the service center is used to receive a data query request and determine a business line according to the authority scope of the initiator of the data query request; The meta-information system is used to obtain the cluster number corresponding to the business line, and call the service center according to the cluster number, using the cluster number as a unique identifier, and calling the service center API according to the cluster number to obtain the corresponding node information; The service center determines the node information according to the cluster number; The designated library and the command statement in the node information are obtained, and the command operation is executed in the designated library according to the command statement.
10. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Local relation type database node scheduling method and device based on cloud computing platform
CN103678354A