2006-07-12 (first published: 2004-02-26)
380 reads
2006-07-12 (first published: 2004-02-26)
380 reads
The Query will enable you to retrieve all the Tables in the Database .The Output of the Query will list all the User Tables along with the Column Names and the Sort order of the Columns .The Query will also return as to whether the Columns in the table are with allow null option or […]
2006-07-06 (first published: 2004-11-18)
432 reads
2006-07-04 (first published: 2006-06-28)
171 reads
This is an example to overcome short comings when using BCP to create a 'proper' CSV file. The view vw_Customers_RAW is used in order to provide a method of creating the column heading row and to enclose columns with embedded comma with double quotes, which are not options in BCP. There are more generic methods […]
2006-07-03 (first published: 2006-06-29)
3,034 reads
Use this Perl script to produce an audit report of both share permissions and NTFS permissions of the shared folders. To report share permissions:Use shareperms.pl -p -SMyServer1 to report on a single server.Or use shareperms.pl -p -SMyServer1,MyServer2 for multiple servers.You can also use a text file as input: shareperms.pl -p -CServers.txtTo report NTFS permissions use […]
2006-06-27 (first published: 2006-06-11)
331 reads
Backs up the SQL Server EM registration from the registry. Assumes that EM is configured to save common, not by user/independently. I recommend changing EM to Store locally for all users, (not independently) and create a weekly scheduled job to backup the HKLM..\..\Registered Servers X branch.Configure EM to store settings for the local machine, all […]
2006-06-26 (first published: 2006-06-12)
321 reads
For several times i had faced a problem of having “special” users, that need to create and run their own DTSs. I produced this script after implementing all the steps needed to allow normal users to do and run their DTSs.I hope it will be helpful at least for some of you.
2006-06-23 (first published: 2006-06-12)
287 reads
In database planning and design it is essential to plan out how much HD space you are going to need to store your data. If you use BOL and do a search for "Estimating Table Size" you get three articles: - Estimating the size of a table - Estimating the size of a table with […]
2006-06-21 (first published: 2006-06-13)
517 reads
Move all (or chosen) standard indexes from your primary file group to a secondary file group (hopefully located on a seperate array)excludes clustered indexes, statistics and indexes associated with a primary keywhen you run it - set the debug to 1 to identify what the script will move, set it to 0 to actually perform […]
2006-06-19 (first published: 2005-07-08)
5,450 reads
This procedure will compare the two tables Table1 & Table2 and will display the value which is present in Table1 but not present in Table2.
2006-06-15 (first published: 2006-05-30)
430 reads
By Steve Jones
Thanks to everyone who attended my sessions today at SQL Saturday Boston 2025. I’ve...
SQL Server 2025 introduces native support for vector data types and external AI models....
By Steve Jones
Fear is fueled by a lack of imagination. The antidote to fear is not...
I'm building ETL packages in SSIS. My data comes from an OLE DB Source...
Comments posted to this topic are about the item Building AI Governance and Policies-...
Why is sql doing a full scan VS seeking on the index? I've included...
The DBCC CHECKIDENT command is used when working with identity values. I have a table with 10 rows in it that looks like this:
TravelLogID CityID StartDate EndDate 1 1 2025-01-11 2025-01-16 2 2 2025-01-11 2025-01-16 3 3 2025-01-11 2025-01-16 4 4 2025-01-11 2025-01-16 5 5 2025-01-11 2025-01-16 6 6 2025-01-11 2025-01-16 7 7 2025-01-11 2025-01-16 8 8 2025-01-11 2025-01-16 9 9 2025-01-11 2025-01-16 10 10 2025-01-11 2025-01-16The docs for DBCC CHECKIDENT say this if I run with only the table parameter: "If the current identity value for a table is less than the maximum identity value stored in the identity column, it is reset using the maximum value in the identity column. " I run this code:
DELETE dbo.TravelLog WHERE TravelLogID >= 9 GO DBCC CHECKIDENT(TravelLog, RESEED) GO INSERT dbo.TravelLog ( CityID, StartDate, EndDate ) VALUES (4, '2025-09-14', '2025-09-17') GOWhat is the identity value for the new row inserted by the insert statement above? See possible answers