03/03/09

Permalink 08:13:50 am, by dave Email , 122 words, 2086 views   English (US)
Categories: Microsoft Tools, Using the Built-In Tools

Changing Ownership - Granting SELECT perms in SQL 2005

I had an interesting issue today. I was working with a product that needed select privileges to the sys tables and have ownership of the table it was going to use on a SQL 2005 Server. After trying various combination of permission settings. I came across the following two commands that did the trick for me.

Grant SELECT privileges to tables:

SELECT 'GRANT SELECT ON ' + TABLE_NAME + ' TO [user]' FROM INFORMATION_SCHEMA.Tables;

Change table ownership:

ALTER AUTHORIZATION ON [database].[table] TO [user];

Everything inside the [ ] are the portions that I had to change for my specific set up.

So if you ever need to grant select privileges tables or grant ownership to a table in SQL 2005, I hope this helps out.
Dave

Leave a commentTrackback (0)

Did you like this post? If so, Share it!  del.icio.us digg reddit slashdot this article Facebook Twitter MySpace Email

01/26/09

Permalink 10:57:34 am, by dave Email , 263 words, 711 views   English (US)
Categories: Microsoft Tools, Using the Command Line

How To: Copy all the files in a directory to another directory using the command line

It is very straight forward to copy the contents of one directory or folder to another folder using the copy command from the command line.

C:\myfiles>copy * C:\test

This command copies all the files in the C:\myfiles directory to the C:\test directory. This works very well if you are just copying the files from one directory to another and not needing to rename the files.

Read more! »

Leave a commentTrackback (0)

Did you like this post? If so, Share it!  del.icio.us digg reddit slashdot this article Facebook Twitter MySpace Email

01/24/09

Permalink 08:35:30 pm, by dave Email , 197 words, 1299 views   English (US)
Categories: Microsoft Tools, Open Source

Extracting archives using UNZIP and the Command Window

I had a large set of zip files that I needed to extract. I could have used the built-in functionality in Windows XP but I really did not want to walk through the extraction wizard for each zip file. So I looked around for something I could use from the command line and I came across Info-ZIP. Once I had downloaded and extracted the utilities, I opened a command window and cd'd to the directory that contained all the zip files. Once there, I ran the following commands. The first one extracted the contents of the zip files (I was lucky and the structure of the zips included a new directory) and the second moved the zip file into its corresponding new directory.

C:\zips>for /f %j in ('dir /b *.zip') do [full path to]\unzip %j

C:\zips>for /f "delims=. tokens=1,2" %j in ('dir /b *.zip') do move %j.%%k %j

I hope this post was of some use to you. If it didn't, I am always looking for new scripts to add so submit a request for your question or need and I will see if I can answer it.

Dave

Leave a commentTrackback (0)

Did you like this post? If so, Share it!  del.icio.us digg reddit slashdot this article Facebook Twitter MySpace Email

10/18/08

Permalink 04:57:43 am, by dave Email , 128 words, 909 views   English (US)
Categories: Microsoft Tools, Using the Command Line

Handy Windows key board combinations

I know most everyone uses a mouse as their primary means for doing most everything on a PC and the mice work well. I find that using the mouse and certain keyboard combinations work extremely well for me.

Here are the keyboard combinations I use most frequently:

windows + l - to lock computer
windows + m - minimize all open windows
windows + f - find / search
windows + e - open explorer window
windows + r - open run window
windows + u - open utility manager

control + z - undo
control + x - cut
control + c - copy
control + v - paste
control + n - new window / file
control + a - select all
control + s - save
control + f - find / search
control + p - print
control + o - open file / web page

Hopefully these will be as useful to you as they are to me.

Dave

Leave a commentTrackback (0)

Did you like this post? If so, Share it!  del.icio.us digg reddit slashdot this article Facebook Twitter MySpace Email

10/12/08

Permalink 08:30:51 am, by dave Email , 330 words, 2492 views   English (US)
Categories: Open Source

Gzip for Windows

If you are like me and use a windows machine as your primary machine. You know what a headache it is when you finally find some snippet of code or other solution only to see that the solution is in a tar.gz file format. Sure you could purchase an archive software solution that supports the tar.gz format, but there is a free alternative, Gzip for Windows.

This is a command line utility, so there is no pretty GUI to use. For me, that is ok, I find it easier to deal with using the command line for extracting and building tar files.

Read more! »

Leave a commentTrackback (0)

Did you like this post? If so, Share it!  del.icio.us digg reddit slashdot this article Facebook Twitter MySpace Email

:: Next Page >>

Windows Tools & Utilities

A place to share interesting and cool windows related tools, utilities, and applications that might be helpful to folks.

| Next >

Search

Follow Me:

Misc

Who's Online?

  • Guest Users: 9

powered by b2evolution free blog software