How can Admin access the database

Last Post 27 Mar 2009 12:47 AM by vkc12uec. 0 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
New Member
New Member

27 Mar 2009 12:47 AM
Hi all
I made a database instance on MSSQL 2005, name SQL_TEST1. The Log On permissions are given to windows account user = sql1 ( password = sql2)

This instance is made under mixed mode authentication. i.e user sa can also access this db by sa/getin

Is there any method ( using osql queries by which the Administrator/ NT Authority system user can access SQL_TEST1 ?

One method which I can think of is using the query

"C:\Program Files\Microsoft SQL Server\90\Tools\binn\osql.exe" -U sa -P getin -S ccsesx1win64\SQL_TEST1 -u -i 1.sql -o 2.sql -I -n -w 2048

where the query file 1.sql contains:
select * from master.dbo.sysdatabases

The result will be produced in 2.sql

Is there any other method by which Adminuser can use query like

"C:\Program Files\Microsoft SQL Server\90\Tools\binn\osql.exe" -S ccsesx1win64\SQL_TEST1 -u -i 1.sql -o 2.sql -I -n -w 2048 -E

You are not authorized to post a reply.

Acceptable Use Policy