Subscribe to
Posts
Comments

Archive for the 'SQL Server' Category

SQLCmd is a very handy tool used to execute SQL script automatically and output results to a file. Here is an example:
sqlcmd -S “ServerName” -U “UID” -P “PWD” -d “DBName” -i “c:\input.txt” -o “c:\output.txt” -s “,” -h -1

The parameter names in command line are case sensitive. So -D is different from -d. As shown […]

The other day I was told to install SQL Server 2000 on to a

server that was already running SQL Server 2005. The 2005 version SQL server was running as the default instance on the server. So obviously I had to install SQL Server 2000 as a named instance and I installed it as ServerName\SQL2000. […]

The best way to grant user who is not a member of sysadmin the right

to execute xp_cmdshell system store proc is to have xp_cmdshell wrapped into a user store procedure so that users can do just the things you want them to do with xp_cmdshell without granting them explicitly the right to execute xp_cmdshell […]

The other day when I installed SQL server 2000 on a 64 bit machine a dialog box pop up and said I couldn’t install SQL server 2000 using the current installation program and and I had to use another executable under a different folder to do installation. Later on a person asked me whether the […]

Well it took me a while to figure out the easiest way to connect to a SQL server listening on a non standard port. The standard sql server port is 1433. When you connect to SQL server using enterprise manager or Query Analyzer this is the port the tools automatically connect to on the server. […]

Next »