CN110019121B - Database file filtering method and device, storage medium and processor - Google Patents

Database file filtering method and device, storage medium and processor Download PDF

Info

Publication number
CN110019121B
CN110019121B CN201711048290.7A CN201711048290A CN110019121B CN 110019121 B CN110019121 B CN 110019121B CN 201711048290 A CN201711048290 A CN 201711048290A CN 110019121 B CN110019121 B CN 110019121B
Authority
CN
China
Prior art keywords
target
file
database
target server
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711048290.7A
Other languages
Chinese (zh)
Other versions
CN110019121A (en
Inventor
赵春猛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201711048290.7A priority Critical patent/CN110019121B/en
Publication of CN110019121A publication Critical patent/CN110019121A/en
Application granted granted Critical
Publication of CN110019121B publication Critical patent/CN110019121B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/176Support for shared access to files; File sharing support
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/217Database tuning

Abstract

The invention discloses a database file filtering method, a device, a storage medium and a processor, wherein the method comprises the following steps: determining a target domain to be filtered and a target server in the target domain; obtaining a database file storage directory of the target server, and obtaining a file sharing authority of the target server in the target domain; establishing a query script based on the database file storage directory by using the file sharing permission; and filtering files under the database file storage directory based on the query script. According to the invention, the files are filtered based on the database file storage directory, so that all servers in the domain are automatically filtered, and the efficiency and accuracy of file filtering are improved.

Description

Database file filtering method and device, storage medium and processor
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a database file filtering method, an apparatus, a storage medium, and a processor.
Background
In the operation and maintenance process of the SQL-server, dozens of servers or even hundreds of servers are often encountered in a domain, and in the process of storing data in the SQL-server database, along with the continuous accumulation of the process, the database files are increased all the time, which undoubtedly causes great pressure on a hard disk of the server.
At present, a program is generally used for querying a database (for example, a database with a file name containing a certain keyword and larger than 200G) on a certain server, the number of such servers in a production environment is generally huge, and manual data query and file filtering are performed one by one, so that not only is the filtering efficiency low, but also the filtering accuracy is reduced.
Disclosure of Invention
In view of the above, the present invention has been made to provide a database file filtering method, apparatus, storage medium and processor that overcome or at least partially solve the above-mentioned problems.
The application provides a database file filtering method, which comprises the following steps:
determining a target domain to be filtered and a target server in the target domain;
obtaining a database file storage directory of the target server, and obtaining a file sharing authority of the target server in the target domain;
establishing a query script based on the database file storage directory by using the file sharing permission;
and filtering files under the database file storage directory based on the query script.
Preferably, the obtaining of the database file storage directory of the target server includes:
obtaining a system registry and a database system table of the target server;
and acquiring a data file storage directory of the target server based on the system registry and the database system table.
Preferably, the method for obtaining the file sharing permission of the target server in the target domain includes:
and acquiring the file sharing authority of the target server in the target domain by utilizing a net use command, wherein the file sharing authority is the access authority of the file corresponding to the database file storage directory of the target server.
Preferably, in the method, the query script is constructed based on the database file storage directory by using the file sharing permission, and the method includes:
determining the database file storage directory and the server address of the server to which the database file storage directory belongs as variables of the script to be constructed;
and constructing a query script based on the determined variable by using the file sharing permission.
The application also provides a database file filtering device, including:
the target determining unit is used for determining a target domain to be filtered and a target server in the target domain;
the directory obtaining unit is used for obtaining a database file storage directory of the target server;
the authority obtaining unit is used for obtaining the file sharing authority of the target server in the target domain;
the script construction unit is used for constructing a query script based on the database file storage directory by utilizing the file sharing permission;
and the file filtering unit is used for filtering the files in the database file storage directory based on the query script.
Preferably, in the above apparatus, the catalog obtaining unit is specifically configured to: and acquiring a system registry and a database system table of the target server, and acquiring a data file storage directory of the target server based on the system registry and the database system table.
Preferably, the above apparatus, the right obtaining unit is specifically configured to: and acquiring the file sharing authority of the target server in the target domain by utilizing a net use command, wherein the file sharing authority is the access authority of the file corresponding to the database file storage directory of the target server.
Preferably, in the above apparatus, the script constructing unit is specifically configured to: and determining the database file storage directory and the server address of the server to which the database file storage directory belongs as variables of the script to be constructed, and constructing the query script by utilizing the file sharing permission and based on the determined variables.
The application also provides a storage medium, which comprises a stored program, wherein when the program runs, the device where the storage medium is located is controlled to execute the database file filtering method.
The application also provides a processor, wherein the processor is used for running a program, and the program executes the database file filtering method in the running process.
By means of the technical scheme, the database file filtering method, the device, the storage medium and the processor provided by the invention have the advantages that the database file storage directory of the target server in the target domain is obtained, so that the query script is constructed on the database file storage directory by utilizing the file sharing authority in the target domain, the files under the database file storage directory are filtered, the method is different from the prior art that the database files of each server in the domain are respectively and manually filtered in sequence, the files are filtered on the basis of the database file storage directory, and all the servers in the domain are automatically filtered, so that the file filtering efficiency and the file filtering accuracy are improved.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a flowchart of a database file filtering method according to an embodiment of the present application;
FIG. 2 is a diagram illustrating an example of an application of an embodiment of the present application;
fig. 3 is a schematic structural diagram of a database file filtering apparatus according to an embodiment of the present application.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Referring to fig. 1, a flowchart is provided for implementing a database file filtering method according to an embodiment of the present application, where the embodiment is suitable for performing redundancy removal, filtering and other operations on database files in each server in a local area network, and the method in the embodiment may be applied to a domain control server or a terminal in a domain.
In this embodiment, the database file filtering method may include the following steps:
step 101: and determining a target domain to be filtered and a target server in the target domain.
The target domain refers to an Active Directory (AD) domain that needs to filter database files, and the AD domain may include a plurality of servers.
It should be noted that, in this embodiment, a nbtstat (cmd command) may be used to sequentially view a computer name corresponding to an Internet Protocol Address (IP) Address of each server recorded in a domain control server, if a domain name where the server is located is fed back in a view result, it is indicated that the server is in an AD domain, and if information fed back by the view result is workgroup, it is indicated that the server is not in the domain, and a server that is not in the domain needs to be added into the AD domain.
Step 102: and acquiring a database file storage directory of the target server.
The database file storage directory refers to a database file in each target server, such as a storage directory of mdf files and ldf files.
In an implementation manner, the present embodiment may obtain the database file storage directory of the target server by:
firstly, the system registry and the database system table of the target server are obtained by inquiring the registry information of the operating system of the target server and the system table information of the database, so that the backup file directory of the database in the target server is obtained based on the system registry and the database system table, and further the database files (the storage directories of mdf files and ldf files), namely the data file storage directory of the target server, are obtained. The method is implemented by the following codes:
DECLARE @ DefaultData VARCHAR (100)/. defineStrand variable:
exp master, xp _ regread/query the system table store process, the query object is the registry, the path is as follows +
The @ rootkey ═ ' HKEY _ LOCAL _ MACHINE ',/' root path, as shown below @ part @ LOCAL _ MACHINE
' Software \ Microsoft SQL Server \ MSSQL10_50, MSSQLSERVER \ MSSQLServer ',/' relative path ═ H
@ value _ name ═ backup directory ',/' registry key +
To obtain the value of the OUTPUT parameter @ DefaultData OUTPUT/. The value of the OUTPUT parameter must be added after the called parameter by adding an OUTPUT key word, as shown by the sqlserver registry information in FIG. 2 @ DefaultData OUTPUT
SELECT@DefaultData
Step 103: and obtaining the file sharing authority of the target server in the target domain.
The file sharing authority refers to an access authority for accessing a file corresponding to a database file storage directory of a target server in a target domain, and includes operation authorities such as reading and deleting.
In an implementation manner, the embodiment may implement obtaining of the file sharing permission by the following manner:
firstly, after a database file storage directory of each target server in a target domain and an IP address of the corresponding target server are obtained, an account with domain admin authority in the target domain is used, and then the file sharing authority of the target server in the target domain can be obtained by utilizing a net use command. The method is implemented by the following codes:
#-*-coding:utf-8-*-
import os # python calls an off-the-shelf class library
import time
The first variable to be reconstructed, i.e. the ip list of the server
ServerList=['\\\\172.17.1.135','\\\\172.17.1.136']
# receiver library size (Unit G) in this example files larger than 10G are queried
ReceiverDBSize=10
def GetFileSize (IP) # defines a function with IP and path as variables
# defines the name and output path of the result file
TXT='D:\\'+IP+'__'+time.strftime('%Y%m%d%H%M%S')+'.txt'
# File sharing map built to Server part is password,/user is user name
os.system("net use"+IP+"\d$******/user:app-gwd@XXX.cn")
# second variable requiring reconstruction
Step 104: and establishing a query script based on the database file storage directory by using the file sharing authority.
In this embodiment, after obtaining the file sharing permission of the target server in the target domain, the connection with the target server may be established, and then, the query script may be constructed in the following manner in this embodiment:
firstly, a database file storage directory and a server address such as an IP address of a server to which the database file storage directory belongs are determined as variables of a script to be constructed, and then a query script is constructed based on the two variables of the IP address and the database file storage directory by utilizing file sharing permission. The method is implemented by the following codes:
#-*-coding:utf-8-*-
import os # python calls an off-the-shelf class library
import time
The first variable to be reconstructed, i.e. the ip list of the server
ServerList=['\\\\172.17.1.135','\\\\172.17.1.136']
# receiver library size (Unit G) in this example files larger than 10G are queried
ReceiverDBSize=10
def GetFileSize (IP) # defines a function with IP and path as variables
# defines the name and output path of the result file
TXT='D:\\'+IP+'__'+time.strftime('%Y%m%d%H%M%S')+'.txt'
# File sharing map built to Server part is password,/user is user name
os.system("net use"+IP+"\d$******/user:app-gwd@XXX.cn")
# second variable requiring reconstruction
relativepath="\D$\DataBases\MSSQL10_50.MSSQLSERVER\MSSQL\DATA
path=IP+relativepath
n=0
for num in range (len (ServerList) # circularly calls the elements in the IP list to realize the query of all servers
print (ServerList [ num ], "Server screening Start")
#printIp(a[num],b[num])
GetFileSize(ServerList[num])
print (ServerList [ num ], "Server screening completion")
Step 105: and filtering files in the database file storage directory based on the query script.
In an implementation manner, in this embodiment, the query can be implemented by using a query script and filtering whether the filename of the file in the database file storage directory includes some preset keywords, and in the following code implementation, the result of querying the file is implemented by using a filtering principle that the filename includes some keywords:
for keys in os. listdir (path) # all filenames under traversal path
# obtaining Absolute Path of files sequentially
if the file hit contains "mdf" and "Receiver" in Dir, # is stored in the array Dir
Path, join (path) # gets the absolute path of the file
size of os, path, getsize (Dir) # get file size
SizeG size/1024/1024/1024# converts the file size to G d
if SizeG > ReceiverDisize # screening according to decision conditions
print (dirs [21:27], SizeG) # print File ID and size G are units
write result with open (TXT, mode: 'a +', encoding: 'utf-8') as f: # write result into result file
f.writelines(dirs[21:27])
f.writelines("\n")
else:
pass
By the technical scheme, the database file filtering method provided by the embodiment of the invention is characterized in that the database file storage directory of the target server in the target domain is acquired, so that the query script is constructed on the database file storage directory by utilizing the file sharing authority in the target domain, and the files under the database file storage directory are filtered.
Referring to fig. 3, a schematic structural diagram of a database file filtering apparatus according to an embodiment of the present disclosure is provided, where the apparatus is adapted to perform redundancy removal, filtering and other operations on database files in each server in a local area network, and the apparatus in this embodiment may be disposed on a domain control server or a terminal in a domain.
In this embodiment, the database file filtering apparatus may include the following structure:
a target determining unit 301, configured to determine a target domain to be filtered and a target server in the target domain.
The target domain refers to an AD domain that needs to filter database files, and the AD domain may include multiple servers.
It should be noted that, in this embodiment, a nbtstat (cmd command) may be used to sequentially view a computer name corresponding to an Internet Protocol Address (IP) Address of each server recorded in a domain control server, if a domain name where the server is located is fed back in a view result, it is indicated that the server is in an AD domain, and if information fed back by the view result is workgroup, it is indicated that the server is not in the domain, and a server that is not in the domain needs to be added into the AD domain.
A directory obtaining unit 302, configured to obtain a database file storage directory of the target server.
The database file storage directory refers to a database file in each target server, such as a storage directory of mdf files and ldf files.
In one implementation manner, in this embodiment, the directory obtaining unit 202 may obtain the database file storage directory of the target server by:
firstly, the system registry and the database system table of the target server are obtained by inquiring the registry information of the operating system of the target server and the system table information of the database, so that the backup file directory of the database in the target server is obtained based on the system registry and the database system table, and further the database files (the storage directories of mdf files and ldf files), namely the data file storage directory of the target server, are obtained.
An authority obtaining unit 303, configured to obtain a file sharing authority of the target server in the target domain.
The file sharing authority refers to an access authority for accessing a file corresponding to a database file storage directory of a target server in a target domain, and includes operation authorities such as reading and deleting.
In one implementation manner, in this embodiment, the authority obtaining unit 203 may implement obtaining the file sharing authority by:
firstly, after a database file storage directory of each target server in a target domain and an IP address of the corresponding target server are obtained, an account with domain admin authority in the target domain is used, and then the file sharing authority of the target server in the target domain can be obtained by utilizing a net use command.
And the script building unit 304 is configured to build a query script based on the database file storage directory by using the file sharing permission.
In this embodiment, after obtaining the file sharing permission of the target server in the target domain, the connection with the target server may be established, and then, in this embodiment, the script constructing unit 204 may implement the construction of the query script by:
firstly, a database file storage directory and a server address such as an IP address of a server to which the database file storage directory belongs are determined as variables of a script to be constructed, and then a query script is constructed based on the two variables of the IP address and the database file storage directory by utilizing file sharing permission.
The file filtering unit 305 is configured to filter files in the database file storage directory based on the query script.
In an implementation manner, the query can be implemented by using the query script and filtering whether the filename of the file in the database file storage directory includes some preset keywords.
The database file filtering device comprises a processor and a memory, wherein the target determination unit 301, the directory obtaining unit 302, the authority obtaining unit 303, the script building unit 304, the file filtering unit 305 and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, the database file storage directory of the target server in the target domain is obtained by adjusting the kernel parameters, so that the query script is constructed on the database file storage directory by utilizing the file sharing authority in the target domain, the files under the database file storage directory are filtered, and the efficiency and the accuracy of file filtering are improved.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
By the technical scheme, the database file filtering device provided by the embodiment of the invention can be used for constructing the query script on the database file storage directory by utilizing the file sharing authority in the target domain through acquiring the database file storage directory of the target server in the target domain, so as to filter the files under the database file storage directory, and is different from the prior art that manual filtering is sequentially performed on the database files of each server in the domain.
An embodiment of the present invention provides a storage medium on which a program is stored, the program implementing the database file filtering method when executed by a processor.
The embodiment of the invention provides a processor, which is used for running a program, wherein the database file filtering method is executed when the program runs.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program which is stored on the memory and can run on the processor, wherein the processor executes the program and realizes the following steps: determining a target domain to be filtered and a target server in the target domain; obtaining a database file storage directory of the target server, and obtaining a file sharing authority of the target server in the target domain; establishing a query script based on the database file storage directory by using the file sharing permission; and filtering files under the database file storage directory based on the query script. The obtaining of the database file storage directory of the target server includes: obtaining a system registry and a database system table of the target server; and acquiring a data file storage directory of the target server based on the system registry and the database system table. Wherein, obtaining the file sharing authority of the target server in the target domain comprises: and acquiring the file sharing authority of the target server in the target domain by utilizing a net use command, wherein the file sharing authority is the access authority of the file corresponding to the database file storage directory of the target server. The method comprises the following steps of establishing a query script by utilizing the file sharing permission and based on the database file storage directory, wherein the query script comprises the following steps: determining the database file storage directory and the server address of the server to which the database file storage directory belongs as variables of the script to be constructed; and constructing a query script based on the determined variable by using the file sharing permission. The device herein may be a server, a PC, a PAD, a mobile phone, etc.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device: determining a target domain to be filtered and a target server in the target domain; obtaining a database file storage directory of the target server, and obtaining a file sharing authority of the target server in the target domain; establishing a query script based on the database file storage directory by using the file sharing permission; and filtering files under the database file storage directory based on the query script. The obtaining of the database file storage directory of the target server includes: obtaining a system registry and a database system table of the target server; and acquiring a data file storage directory of the target server based on the system registry and the database system table. Wherein, obtaining the file sharing authority of the target server in the target domain comprises: and acquiring the file sharing authority of the target server in the target domain by utilizing a net use command, wherein the file sharing authority is the access authority of the file corresponding to the database file storage directory of the target server. The method comprises the following steps of establishing a query script by utilizing the file sharing permission and based on the database file storage directory, wherein the query script comprises the following steps: determining the database file storage directory and the server address of the server to which the database file storage directory belongs as variables of the script to be constructed; and constructing a query script based on the determined variable by using the file sharing permission.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (8)

1. A database file filtering method is characterized by comprising the following steps:
determining a target domain to be filtered and a target server in the target domain; the target server comprises all servers in a target domain;
obtaining a database file storage directory of the target server, and obtaining a file sharing authority of the target server in the target domain;
determining a database file storage directory and a server address of a target server to which the database file storage directory belongs as variables of a script to be constructed;
establishing a query script based on the determined variables by using the file sharing permission;
and based on the query script, filtering the file names of the files in the database file storage directory by using preset keywords, and determining the filtered files.
2. The method of claim 1, wherein obtaining the database file deposit directory of the target server comprises:
obtaining a system registry and a database system table of the target server;
and acquiring a data file storage directory of the target server based on the system registry and the database system table.
3. The method of claim 1 or 2, wherein obtaining the file sharing authority of the target server in the target domain comprises:
and acquiring the file sharing authority of the target server in the target domain by utilizing a net use command, wherein the file sharing authority is the access authority of the file corresponding to the database file storage directory of the target server.
4. A database file filtering apparatus, comprising:
the target determining unit is used for determining a target domain to be filtered and a target server in the target domain; the target server comprises all servers in a target domain;
the directory obtaining unit is used for obtaining a database file storage directory of the target server;
the authority obtaining unit is used for obtaining the file sharing authority of the target server in the target domain;
the script building unit is used for determining the database file storage directory and the server address of the target server to which the database file storage directory belongs as the variable of the script to be built; establishing a query script based on the determined variables by using the file sharing right item;
and the file filtering unit is used for filtering the file names of the files in the database file storage directory by using preset keywords based on the query script and determining the filtered files.
5. The apparatus according to claim 4, wherein the directory obtaining unit is specifically configured to:
and acquiring a system registry and a database system table of the target server, and acquiring a data file storage directory of the target server based on the system registry and the database system table.
6. The apparatus according to claim 4 or 5, wherein the right obtaining unit is specifically configured to:
and acquiring the file sharing authority of the target server in the target domain by utilizing a net use command, wherein the file sharing authority is the access authority of the file corresponding to the database file storage directory of the target server.
7. A storage medium, characterized in that the storage medium comprises a stored program, wherein when the program runs, a device where the storage medium is located is controlled to execute the database file filtering method according to any one of claims 1 to 3.
8. A processor, configured to execute a program, wherein the program executes the database file filtering method according to any one of claims 1 to 3.
CN201711048290.7A 2017-10-31 2017-10-31 Database file filtering method and device, storage medium and processor Active CN110019121B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711048290.7A CN110019121B (en) 2017-10-31 2017-10-31 Database file filtering method and device, storage medium and processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711048290.7A CN110019121B (en) 2017-10-31 2017-10-31 Database file filtering method and device, storage medium and processor

Publications (2)

Publication Number Publication Date
CN110019121A CN110019121A (en) 2019-07-16
CN110019121B true CN110019121B (en) 2021-05-11

Family

ID=67186725

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711048290.7A Active CN110019121B (en) 2017-10-31 2017-10-31 Database file filtering method and device, storage medium and processor

Country Status (1)

Country Link
CN (1) CN110019121B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102902797A (en) * 2012-10-11 2013-01-30 福建亿同世纪软件有限公司 Method for storing and retrieving real-time monitored data of large-volume equipment
CN104065731A (en) * 2014-06-30 2014-09-24 江苏华大天益电力科技有限公司 FTP file transfer system and transfer method
CN105204897A (en) * 2015-09-14 2015-12-30 上海新炬网络信息技术有限公司 Batched MySQL installation and deployment method
CN106570025A (en) * 2015-10-10 2017-04-19 北京国双科技有限公司 Data filtering method and device
CN107016099A (en) * 2017-04-10 2017-08-04 国家电网公司 The folder space monitoring maintenance system and method for class Unix system server

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102722500B (en) * 2011-03-31 2017-03-15 中国电信股份有限公司 A kind of Virtual File System and its implementation
CN103116544A (en) * 2013-01-25 2013-05-22 浪潮电子信息产业股份有限公司 Automated cross-platform multi-server multi-application test method
CN103716184B (en) * 2013-12-13 2017-03-08 广东电网公司信息中心 The operation maintenance system of multistage interconnection domain
CN104537295B (en) * 2014-12-31 2017-12-26 北京明朝万达科技股份有限公司 A kind of method of computer system and management computer user authority
US20160342621A1 (en) * 2015-05-21 2016-11-24 Satya Mylvara System and method of providing or executing layered resources

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102902797A (en) * 2012-10-11 2013-01-30 福建亿同世纪软件有限公司 Method for storing and retrieving real-time monitored data of large-volume equipment
CN104065731A (en) * 2014-06-30 2014-09-24 江苏华大天益电力科技有限公司 FTP file transfer system and transfer method
CN105204897A (en) * 2015-09-14 2015-12-30 上海新炬网络信息技术有限公司 Batched MySQL installation and deployment method
CN106570025A (en) * 2015-10-10 2017-04-19 北京国双科技有限公司 Data filtering method and device
CN107016099A (en) * 2017-04-10 2017-08-04 国家电网公司 The folder space monitoring maintenance system and method for class Unix system server

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Research and implementation of file security mechanisms based on file system filter driver;Cong Zhang 等;《IEEE》;20170330;第1-6页 *
基于用户行为的内容加速系统的设计与实现;汤四见;《中国优秀硕士学位论文全文数据库 信息科技辑》;20170215;I138-4399 *

Also Published As

Publication number Publication date
CN110019121A (en) 2019-07-16

Similar Documents

Publication Publication Date Title
US9778996B1 (en) File system version set infrastructure
US9367569B1 (en) Recovery of directory information
CN108268609B (en) File path establishing and accessing method and device
JP2013542513A (en) Method and system for performing individual restore of a database from a differential backup
JP2010205267A (en) Method and system for unifying virtualized sublayers
CN112487083B (en) Data verification method and device
US20200250149A1 (en) Replicating file systems via cloud storage
CN110971571A (en) Website domain name verification method and related device
CN105227672A (en) The method and system that data store and access
CN108572888B (en) Disk snapshot creating method and disk snapshot creating device
CN113536326A (en) Decentralized cooperative office method, equipment and medium
CN114297719A (en) Data desensitization method and device, storage medium and electronic equipment
CN110019121B (en) Database file filtering method and device, storage medium and processor
CN109977317B (en) Data query method and device
CN111125087B (en) Data storage method and device
CN110888723A (en) Timing task processing method and device
CN115495432A (en) Method, device and equipment for supporting multiple instances
CN111625397B (en) Service log backup method, cluster, device, electronic equipment and storage medium
CN109413176B (en) Report downloading method and device
CN114466083A (en) Data storage system supporting protocol intercommunication
CN111367461B (en) Storage space management method and device
CN108897873B (en) Method and device for generating job file, storage medium and processor
CN107908441B (en) Database upgrading method and upgrading device
CN110020357B (en) Data storage method, data storage device, storage medium and processor
CN107784040B (en) File issuing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 100080 No. 401, 4th Floor, Haitai Building, 229 North Fourth Ring Road, Haidian District, Beijing

Applicant after: Beijing Guoshuang Technology Co.,Ltd.

Address before: 100086 Beijing city Haidian District Shuangyushu Area No. 76 Zhichun Road cuigongfandian 8 layer A

Applicant before: Beijing Guoshuang Technology Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant