Questions tagged [osql]

6 questions
3
votes
1 answer

Sql Server 2008 - Use OSQL utility to shrink files and then log result

I'm running batch processes via a batch file and I want SQL server to log the reslt when I execute my DBCC SHRINKFILE command from my batch file. Is there anyway to do this? Example: - Run.bat rem Shrink transaction log and log the…
contactmatt
  • 229
  • 3
  • 10
1
vote
1 answer

Backup databases from MS SQL Server 2008 Express database thru batch script

I need batch script to backup selected databases from Microsoft SQL 2008 Express Edition. Unfortunately MS SQL Server 2008 Express edition lacks of visual database backup tools called Maintenance in MS SQL 2008 Standard, thus We need a batch script…
integratorIT
  • 139
  • 1
  • 1
  • 11
1
vote
1 answer

Suggestions for Scheduled Tasks to call OSQL without hard-coding cleartext password

Can anyone think of any techniques where i can have a Windows scheduled task run OSQL, but not have to pass the clear-text password with cleartext password being in the clear? E.g.: >osql -U iboyd -P BabyBatterStapleCorrect Assumption: No Windows…
Ian Boyd
  • 5,131
  • 14
  • 57
  • 79
1
vote
5 answers

SQL commands when SQL only exists on network

I'm trying to find a list of all sql servers on the network using the osql -L command in the command prompt. This command only works when SQLServer is installed on the computer that I'm working on. Is there any way to run this command when…
chama
0
votes
2 answers

Granting rights to the sa account using osql

I'm installing sql instances through script, and after creating a certain instance, I cannot get the sa account to be enabled through osql. What I've tried osql -S .\INSTANCENAME -E use master ALTER LOGIN sa ENABLE GO Using SSMS to enable the…
Jan Jongboom
0
votes
1 answer

SQL Server queries take forever to enumerate the dataset?

I've got an interesting sounding problem with SQL queries run from a particular machine. This machine is a VM running Windows Server 2003, and it has SQL Server Express 2005 on it. The VM was migrated from a VMWare Player image into a proper VMWare…
Coxy
  • 201
  • 1
  • 2
  • 8