Lock and Connection Management

Technical Article

Check if someone use a database or not

  • Script

I manage quite a few hundred databases across the company. Time to time I get a question if I can check wheather a database is beeing used or not, and if it is, by whom?There are probably a 1000 ways to do this, but I've created a script for creating a scheduled job that runs […]

You rated this post out of 5. Change rating

2003-07-15

2,611 reads

Technical Article

RE: something similar to forking a separate process

  • Reply

A real low-tech way would be similar to the method mentioned by stax68. Create a stored procedure to do the work. Set it as a job to run every minute (or whatever frequency seems necessary). The arguments indicating that the process should be run would be entered into a table from your calling program. When […]

You rated this post out of 5. Change rating

2003-06-27

Technical Article

RE: DTS consequences

  • Reply

Replication is enabled for specific databases and should not effect how the others operate. However, depending on push or pull an where the distributor is they can chnge the server loads which does effect overall performance. And DTS is not the same as replication although you can create a custom datamove similar to the concept […]

You rated this post out of 5. Change rating

2003-06-27

Technical Article

RE: bcp with queryout

  • Reply

I tried it a again: use master exec xp_cmdshell 'bcp "select * from dbname.owner.table where checkbit = 0" queryout e:\products.txt -c -Sserver -Usa -Ppassword' I get as an error the format for writing bcp commands...?

You rated this post out of 5. Change rating

2003-06-26

Technical Article

RE: switching off the identity on a column

  • Reply

Ok, I went back to BOL and looked at the syntax. The IDENTITY option is only available if you are adding a column. ALTER COLUMN allows you to add or drop ROWGUIDCOL but not IDENTITY. EM does it by creating a new table with the IDENTITY property, copying the data to it, dropping the old […]

You rated this post out of 5. Change rating

2003-06-17

Technical Article

RE: switching off the identity on a column

  • Reply

As a final note, you may want to go into Enterprise Manager and change the table in the Design View, then click Save Script button and see what SQL internally thinks is the best method for handling this...Sometimes this technique is useful in figuring out some of the trickier DDL constructs... Good luck!

You rated this post out of 5. Change rating

2003-06-17

Technical Article

blocked  and blocker  spid and details

  • Script

2 steps:step 1 => create   a table in master database called BlockCheckstep 2 =>  create the stored procedure in master  called  BLOCK_CHECK @database_name varchar(20)What SP  does:-    it gets the  spid that is blocked  + info about it (like what it does  at the moment  it is blocked)-    it gets the spid  that  acts as a […]

4 (1)

You rated this post out of 5. Change rating

2003-06-05

714 reads

Blogs

SQL Saturday Boston 2024 Slides

By

Thanks to everyone that came to my talks. Slides are below. Best Practices for...

Small Data SF 2024

By

I can’t remember how I heard about Small Data SF 2024, but it caught...

A New Word: Moledro

By

moledro – n. a feeling of resonant connection with an author or artist you’ll...

Read the latest Blogs

Forums

7 sept, scheduled book

By philip.scott

Comments posted to this topic are about the item 7 sept, scheduled book

7 sept, schedlued article

By philip.scott

Comments posted to this topic are about the item 7 sept, schedlued article

6 sept, published book

By philip.scott

Comments posted to this topic are about the item 6 sept, published book

Visit the forum

Question of the Day

Azure Data Lake Storage Gen 2

Azure Data Lake Storage Gen 2 is built on ...?

See possible answers