Today, a vendor asked me a question. If you want to change the data type of a field in a table, whether it is a field type in view also responds to automatic changes. At that time, I thought it would be changed automatically. However, the vendors said they had tried and won't change it. They asked me if I had any other choice but to try again. At that time, I thought of the storage process sp_refreshview fo
DECLARE @name varchar, @newname varchar (@colname varchar)
DECLARE ABC cursor for
Select (a.[name] + '. ' + b.[name]) as TableName, b.[name] colname
From dbo.sysobjects A, dbo.syscolumns b where a.id = b.ID
and a.xtype= ' U '
Open ABC
Fetch next from ABC into @name, @colname
While @ @fetch_status =0 begin
Set @newname =Upper (@colname)
EXEC sp_rename @name, @newname, [COLUMN] Print @colname print @NEWNAME
Fetch next from ABC into @name, @colnam
auditing of records that collect this audit specification GO-SQL Server Audit action groups and actions --https://msdn.microsoft.com/zh-cn/library/cc280663%28v=sql.100%29.aspx?f=255MSPPError=-2147217396-- Change the server
. Audit events can be written to an event log or an audit file. The introduction of the audit is not much introduced here, we can search the official web site to check. Start our topic today: We record the user insert, UPDATE, delete operations to the database by turning on SQL Ser
Tags: service. com lock add Tin Viewer blank sys securityAuditing (Audit) is used to track and record events that occur in a SQL Server instance or database, including auditing objects (Audit) and audit Specifications (Audit speci
The SQL audit in SQL Server 2008 has become a first-class server object. As mentioned in the previous article, you can now even audit a SELECT statement query that requires the use of SQL
2008, you can set a more detailed "application-generated" policy from the command line by using the Audit Policy program (AuditPol.exe). The Windows Event log is global to the Windows operating system. If you need more precise permissions on auditing, use the binary file destination.action groups and actionsUsing the SQL Server
Tags: SQL Server audit CDCIntroductionSQL Server 2008 introduces CDC (Change Data Capture), which can record:1. What data lines have changed2. The history of data row changes, not just the final value.It implements asynchronous change tracking (like transactional replication
Application scenarios:
As part of SQL Server Security Audit, DBAs may need a report like this: Know Which database objects (such as tables, stored procedures, views, users, functions, user permissions, etc) who modified the content and so on. You may also need a copy of the code modification history list of stored procedures, functions, and views to know that the
JobWhen CDC is first enabled in the specified database and there is no transactional replication, two jobs are created for capture and cleanup:The capture job is used to scan the log files and write the change records to the change table. Called Sp_mscdc_capture_job, the scan parameters and scan intervals can be set based on the actual transaction throughput of the current library, resulting in a reasonable balance between performance overhead and tr
the destination folder and monitored. After you execute this command, the command Prompt window appears as shown. Once the time is over a minute and the source folder has at least 2 or more modifications, Robocopy will automatically start another process, perform the previous backup operation. Robocopy can monitor the source folder structure, file and folder name, size, and last modified time, where even when information such as properties and permissions are modified, Robocopy is also remember
Tags: audit auditing SQL ServerSQL Server Auditing (Audit)-Considerations for using auditingmove a database that has an audit specification createdIf you move a database that has been created with an audit specification to a new
based on specific queries, and of course you can create statistics manually.First, to intuitively understand what the statistics look like, reference, that is,_wa_sys_**** begins with the statistics that the system creates as needed,The same name as the index is the statistics created on the index,Manually creating statistics can also be self-named in cases where SQL Server naming requirements are met. Th
Label:Original: SQL Server audit feature Getting Started: CDC (change Data Capture)IntroductionSQL Server 2008 introduces CDC (Change Data Capture), which can record:1. What data lines have changed2. The history of data row changes, not just the final value.It implements asy
Label:In 2008, the option to block saving changes that require the table to be recreated is added. Symptoms are "blocking" you when modifying the table structure.The solution to the " prevent saving changes that require re-creation of tables " in SQL
problem: when modifying the database table, can not choose to save, prompt: Saving changes is not permitted, such as 1, if you choose Cancle, will be revoked save, if you choose Save Text file, will save a txt files, But not SQL script, personally feel useless.Workaround: Do not catch the urgency, this is because you set the save
Label:Original: Use SQL Server audit to monitor the activation and disabling of triggersUsage scenarios:Sometimes it is found that the business logic in the trigger is not executed, possibly due to a logic error in the trigger. But sometimes it is because some triggers are disabled.Because SQL
After creating a table on SQL Server, you often need to change the design of the table. If you have any questions, the system will prompt "you are not allowed to save the changes. You must delete the changes and recreate the follo
As the database accumulates over time and experienced developers are different in different styles, the objects in the database are messy. In order to comply with the IT integration trend, improve the maintainability and scalability of the system and database, and decide to integrate the system, database and server
It's just the beginning.
The following is a newly written script that captures and summarizes information about objects such as tables, st
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.