/*
Author: Jiangong sun
*/
I 've made a web site prototype these days, I 've found there are some useful information to share with you about some usual problems about users.
1/how to create a user and give it rights to access a database
2/once you have correctly created your user, but you can't login with it in SQL Server. You get error 18456.
Then you need to check if the
check and change permissions for the role Newrole GRANT select,update on sales to Newrole --Prohibit role newrole INSERT permission using Employees table DENY INSERT on employees to Newrole Another way to create users and assign roles --Add a security account to the database for login Newlogin NewUser EXEC sp_grantdbaccess ' newlogin ', ' NewUser '--Add NewUser as a member of role NewroleEXEC sp_addrolemember ' newrole ', ' NewUser ' --Delete operations for database users, roles, logins --Del
Scheduled maintenance plans:
Use the New fill (empty) factor to rebuild the index to restructure the data and the data on the index page. This ensures that the database page contains equally distributed data and available space, which allows for faster growth in the future. Remove an empty data page from the database page to compress the data file. Update index statistics to ensure that the query is optimized and the table distribution data is worth the latest information. This allows query opti
How to manually clear the log
First, now we describe in detail how to use Enterprise Manager to clean up the log of SQL 2000:
1, open Enterprise Manager, right click to deal with the database-"attributes-" option-"Failure to restore, select" Simple "-" OK. As shown in figure:
2, right click on the database to be processed--all tasks--"Shrinking the database-" Nothing moves, the default first is 0%, the other two unchecked, point OK--"If your previo
checkpoint.
3, tempdb can only have one filegroup, can not add more filegroups.
4. Tempdb is used to store three types of objects: User objects, internal objects, version stores
Next, focus on the topic to show the problem analysis:
1.SQL Server System Database Introduction
SQL Server has four important system-le
First of all, Ms Server, because I am also a novice, so first chose to use Enterprise Manager for task settings, and then export the design completed task script, This allows you to create new tasks directly in other databases by executing scripts (you need to modify some of these task names and database name equivalents), and here's a specific procedure and a task script that you get:
1. Ensure that the "SQL
This article through the illustrated way to show you the SQL Server database table records only keep the N-day text tutorial, concrete method steps please see below:
First step: Set up the SQL Server Agent service to start automatically:
Start--> Control Panel--> Administrative Tools--> Services--> Right-click
cleans up backups one months ago.First click on the Schedule button of the first Subplan, set the full backup cycle setting as follows.You then set the period for the differential backup.The last file cleanup cycle.Once set up, save, and the maintenance plan is set up.In fact, SQL Server automatically generated the appropriate SSIS package and job based on what you just did, and you can see the correspondi
Label:Because of the data security considerations in SQL Server, you need to back up the database regularly, and this article describes using jobs in the SQL Server database agent to automatically back up the database. 1. Start the SQL
, and each new database created is initialized with a copy of model.
Tempdb
The tempdb database is where SQL Server stores temporary data, such as worksheets, sort spaces, and row versioning information. While SQL Server allows us to create temporary tables of our own use, and the location of these temporary tables i
DatabasesMasterThe master database holds all system level configurations. SQL Server cannot start up normally without the Master database. Restoring/rebuilding the master database take a set of special procedures which would be discussed in upcoming slides.ModelThe model database is used as the template for all databases this is created on the instance of SQL
SQL Server Backup is a system engineering that is time-consuming. Because the database continues to grow during the run, the corresponding backup also takes more time. The 100G database is usually considered a very large database, now 100G is already very common, and now many databases have reached TB level. In this article, we will discuss how to make a quick backup of
database is where SQL Server stores temporary data, such as worksheets, sort spaces, row versioning information. At the same time, SQL Server allows us to create temporary tables that we use ourselves, and the locations of these temporary tables are tempdb, but we need to be aware that whenever the instance of
SQL Server General paging stored procedures, with stored procedures can improve efficiency and save time.
SQL Server General paging stored procedures, with stored procedures can improve efficiency and save time.
The Code is as follows:
Create proc commonPagination
@ Columns varchar (500), -- Name of the column to be d
. The Distribution transaction table could not be cleared. [SQL]View Plaincopy
--View the jobs performed
SELECT * from msdb.dbo.sysjobs where job_id = ' dc0df572-9339-46ed-84e7-2c1ed622c067 '
View SQL Server Agent account, NT authority\network SERVICE Find this directory, is the snapshot dire
In SQL Server, we often use "Local packages" to import and export databases or perform other complicated operations. However, after creating a new database, how can these packages be transferred? Currently, I know two relatively simple methods:
1. After the new database is installed, the entire MSDB in the old database is moved over. In this way, the jobs and
following:
On demand. When a user specifies this pattern directly, it evaluates the policy.
When changed: prohibited. This automatic mode uses DDL triggers to prevent violation of policies.
When changed: Record only. This automatic mode uses event notifications to evaluate policies when related changes occur and when a log policy is violated.
As planned. This automatic mode uses SQL Server agent
most geometric objects. Byte columns, like user-defined types, also have a limit of 8,000 bytes, so it's not good enough. In addition to the geometric columns, I also created four real-type columns to store the maximum minimum of the rectangle for the geometric outer rectangular box. This improves the efficiency of queries based on an external rectangular box. Other columns are used to store the properties of the geometry.
I realized this method in the Sharpmap. First, I set up a small databas
: odbc SQL Server Driver (ODBC); ErrorCode: 0)Solution: change all character types to n (char-nchar, varchar-nvarchar, ntext ). 8. error message:"The agent 'xxxx' is trying again after an error occurs. You have tried 25 times. For more information, see Agent job history in the jobs folder." This error is generally caused by a large number of release chains on a
Tags: When you encounter a job that is generated by the agent before you delete the running Maintenance plan on SQL Server 2005, you are prompted to delete the failure. The DELETE statement conflicts with the REFERENCE constraint "fk_subplan_job_id". The conflict occurred in the database "msdb", table "Dbo.sysmaintplan_subplans", and column ' job_id '. Statement has been terminated. (Microsoft
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.