SQL Server Version Info

Posted on 2013-06-04
Last Modified: 2013-06-10
I am gathering the version info of some SQL servers for an audit. Is there a way to get the same information as you would from running the Select @@version query without having to log into the SQL management studio?

Question by:Allanore

Expert Comment

ID: 39219289

You can use sqlcmd to do it from the command line.

Something like

sqlcmd -S myServer\instanceName -i C:\version.sql

where version.sql cotains the sql command

select @@version

This can obviously be done remotely as well assuming you have rights. If you need to specify a username\password then just add -U and -P switches.

LVL 19

Accepted Solution

Bhavesh Shah earned 500 total points
ID: 39219313

check out this link.
and follow the step.

if you need any assitance, get back to us.
LVL 40

Expert Comment

ID: 39220645

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Using Aggregate Functions to Count 3 34
datetime in sql 6 28
Help with Sorting Full Text results 2 14
How to use Full Text CONTAINS with Case in SQL 6 19
In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now