Maintenance and Management

Technical Article

BCP OUT tables from any database

  • Script

This script will help DBA's who wants to BCP out required tables form any database. This script can be run through as a job. Before running you have to create a table in any given database and store the table names in it, which you want to Bulk copy. Query in this procedure will check […]

5 (1)

You rated this post out of 5. Change rating

2005-02-17 (first published: )

282 reads

Technical Article

Convert Unique Identifier to Varchar data type

  • Script

Script will drop the Default, Primary, Unique, Foreign Constraints, Index and ROWGUID on Unique Identifier data type column and finally it alters the unique identifier to varchar (38) data type. I have compile and execute the script in my database server. Script has executed successfully.

You rated this post out of 5. Change rating

2005-01-12 (first published: )

681 reads

Technical Article

Grant Read-only permission to user on jobs

  • Script

create this SQL as a stored procedure and give user execute permissions on it store procedure. that user will be able to see all the jobs and their associated schedules but won't be able to modify, create or execute job. This is particularly a request most often aske dby developer to view jobs/schedules on production […]

You rated this post out of 5. Change rating

2004-11-15 (first published: )

593 reads

Technical Article

Fix orphan users

  • Script

some times after restore database, you find your logins and users mapping is lossed and no user can now logon to database using application. I faced that many times. To map all your database users with master..syslogins. save this procedure in current database and execute it. All users will be mapped with logins.

You rated this post out of 5. Change rating

2004-11-12 (first published: )

379 reads

Technical Article

how to start a program like Notepad.exe in a job

  • Script

sometime I need to kill an program which does not continue to process data, and i sheduled a job to do that. After lots of times' try, I made it at last.This script add a shedule to the sheduled task list, one minutes later then the current system time. You can change it by edit […]

4 (1)

You rated this post out of 5. Change rating

2007-02-28 (first published: )

237 reads

Technical Article

To estimate the size or the future size of a DB

  • Script

The level of index fragmentation is not taken into consideration. Actual level of fragmentation is assume to be proportionnal over time.Only one object can be used as the witness to drive the database size.A normally distributed database is needed for this tool to report accurate estimates. ** Example : dbo.sp__EstimateSize @UpdateUsage = true ,@ObjGuidance = […]

You rated this post out of 5. Change rating

2004-09-16

262 reads

Technical Article

Checking SQLAgent service and starting it if not.

  • Script

Because many programs I wrote depends on the SQL Agent Service and to really make sure that no one has configured this service to run manually (you see many things in life) I rely on this litle piece of code

You rated this post out of 5. Change rating

2006-12-27 (first published: )

180 reads

Blogs

Migrate datetime data to datetimeoffset with AT TIME ZONE

By

I recently reviewed, worked on, and added a similar example to the DATETIMEOFFSET Microsoft...

The Comprehensive Guide to Mastering Your SQL DBA Skills

By

Database administrators (DBAs) are the backbone of data-driven organizations. If you're looking to break...

Friday Basics: Authentication vs. Authorization

By

Another security fundamentals topic is authentication versus authorization. For those who have a clear...

Read the latest Blogs

Forums

Performance

By LearningDBA

Experts, I am learning some skills so I can troubleshoot some performance-related issues. I...

How to install mysql-connector-python-8.4.0.zip it does not have setup.py

By ivanb

How to install mysql-connector-python-8.4.0.zip it does not have setup.py. Checked also: mysql-connector-python-8.4.0.tar.gz

when primary is down and not accessible failover not occured then how to recover

By naga.rohitkumar

HI All, can any one reply on this when primary is down and not...

Visit the forum

Question of the Day

Two Table Hints

What happens when I run this code:

SELECT
  p.ProductName
, p.ProductCategory
FROM dbo.Product AS p WITH (NOLOCK, TABLOCK);

See possible answers