Showing posts with label manage. Show all posts
Showing posts with label manage. Show all posts

Friday, March 30, 2012

MSDE and "SQL Web Data Administrator"

Hello all,

I am sorry for repeating the question in another section of the forum.

I am using "SQL Web Data Administrator" to manage the security and the roles issues in my database. I am using MSDE and i get to a point that i can not create grant statements in "SQL Web Data Administrator" manualy. I only was able to create some user accounts and giving them some roles automaticly"by clicking" without writtng grant statemnts. Clearly for me there was no place in the program to write grant statments. eg: in the graphical user interface of the "Sql Web Data Administrator" you can not restrict an access to some table in a database, but you can restrict access to a specific database for some users. Now, the question is : Is there any way to write grant permissions for some users using "Sql Web Data Administrator", or alternatevely, where can i wite any T-sql in my application and execute them.

Note:
I do not have Enterprise manager or sql analyzer.

please help.I don't know all of the ins and outs of WDA, but I know you can use the osql command line utility to execute T-SQL statements. SeeHow To Manage the SQL Server Desktop Engine (MSDE 2000) by Using the Osql Utility

Terri|||Dear Terri,

My main problem is not knowing how to write T-SQL statemnts in Osql or SWDA. the concern is how these T-sql statemnts can be used and saved. Yes, i can execute them in both programs,but that i think is not enough to save them to be used in the application. I tried to use grant statemnts in my application, but i do not know where to plug it in to be executed when the application is running.

Terri, can you tell me where can i write and save these T-Sql statments to be used and executed in my application(asp.net) especially the grant statments below:

Eg:

grant select on table1 to user1
grant select on table2 to user1
grant select on table3 to user1

Thanks a lot|||Sorry, I misunderstood your question. Typically stored procedures are created to execute code that will be reused. And you'd execute stored procedures such as these with the ExecuteNonQuery command since they are not returning a resultset.

Terri|||you are suggesting that the only way to run the sql grant statments is by putting them in a stored procedure. But what if i do not want to use stored procedure. Eg: restricting the access to some tables through the application itself.

thanks any way Terri|||Then just use command text. I'm not really sure what the issue is here (well other than the possible security issues if you're not careful)?


Dim myConnection As New SqlConnection( _
"server=(local)\NetSDK;database=pubs;Integrated Security=SSPI")
Dim myCommand As New SqlCommand( _
"GRANT SELECT ON authors TO Mary, John, Tom", myConnection)

myCommand.Connection.Open()
myCommand.ExecuteNonQuery()
myCommand.Connection.Close()

Terri|||Hello Terri again,

I am sorry for not clarifying what i want to achieve. What i want to get is to prevent certain users from aceesing certian tables(table1 , table2) and not table 3, 4...
I have used this code to do that. Unfortunatel, my code prevent access to the authorised tables too. What is the suitable query string that do this task in the below code?

Sub Runquery_btn_Click(sender As Object, e As EventArgs)

Dim denyquerystr as string

Connectionstring = ctype(session("Connectionstr"), string)

if Sqlinput_txt.text <> "" then

try

Sqlconnection = New Sqlconnection (connectionString)

denyquerystr = "Deny SELECT ON table1 TO student"

SqlCommand = new SqlCommand(denyquerystr, Sqlconnection)

SqlConnection.Open()
SqlCommand.ExecuteNonQuery()

catch ex as Exception

Alermessage (ex.Message)

finally

SqlConnection.Close()

End try

End sub

Thanks again Terri|||I think the deny stataments has an effect on the whole application. Therefore i can not log in with the user student. Although, i did not use any deny stored procedure and deleted all the deny statemnts. Is there any way to get back to the normal situation. Means how it is possible to delete the effect of deny statments on the application

Pleas help.

Friday, March 23, 2012

MSDE 2000 database setup trouble

Hello
I am running a stand-alone test environment for an application in XP Pro
which I can only use MSDE to manage my databases.
I've successfully installed msde and am finally able to connect using 'osql
-Usa -Ppassword -S (local)\testmachine' , because I can get the '1>' command
prompt.
My trouble is when I try to create and/or restore a database for the test
application to use I'm running into trouble. For example enter this :
1> USE master
2> RESTORE DATABASE master FROM DISK='C:\master\master_db2.BAK'
3>GO
and I get an error message telling me that "RESTORE DATABASE must be used in
single user mode when trying to restore the master database" ...... I also
get a similar message when trying to create and restore a database called
'public'.
how do I successfully get into 'single user mode' ?
hi,
APB wrote:
> Hello
> I am running a stand-alone test environment for an application in XP
> Pro which I can only use MSDE to manage my databases.
> I've successfully installed msde and am finally able to connect using
> 'osql -Usa -Ppassword -S (local)\testmachine' , because I can get the
> '1>' command prompt.
> My trouble is when I try to create and/or restore a database for the
> test application to use I'm running into trouble. For example enter
> this :
> 1> USE master
> 2> RESTORE DATABASE master FROM DISK='C:\master\master_db2.BAK'
> 3>GO
> and I get an error message telling me that "RESTORE DATABASE must be
> used in single user mode when trying to restore the master database"
> ...... I also get a similar message when trying to create and
> restore a database called 'public'.
> how do I successfully get into 'single user mode' ?
have a look at http://msdn2.microsoft.com/en-us/library/ms180965.aspx ..
typically you open a command window, navigate to the \Binn folder of the
instance you want to start and execute something like
C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn\>sqlservr.exe -s
InstanceName -m
this will start the instance in single user modo, so that you'll be able to
restore the master database...
to restore "normal user's" database(s) the single user mode is not required,
but the database(s) to be restored must not be in use... so no active
connections must be running against the database(s) to be restored..
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.bizhttp://italy.mvps.org
DbaMgr2k ver 0.20.0 - DbaMgr ver 0.64.0 and further SQL Tools
-- remove DMO to reply

Monday, March 19, 2012

MSDE + Entreprise Manager.....again

But I thing that question has never been asked before...:-)
I use Entreprise manager to manage my MSDE on my windows XP machine.
I also have on my network a SQL Server 2000.
My problem is that I cannot add my MSDE to my Entreprise manager localted on
my SQL box.
Is this by design? Can I manage my MSDE remotely from my SQL box?
Thanks
JP
JP Breton wrote:
> But I thing that question has never been asked before...:-)
> I use Entreprise manager to manage my MSDE on my windows XP machine.
> I also have on my network a SQL Server 2000.
> My problem is that I cannot add my MSDE to my Entreprise manager localted on
> my SQL box.
> Is this by design? Can I manage my MSDE remotely from my SQL box?
> Thanks
> JP
>
Hi,
there is the option DISABLENETWORKPROTOCOLS by installing MSDE, if
DISABLENETWORKPROTOCOLS=1 you can't reach the MSDE instance remotely.
Matthias Beuder
Wenn schon Mails an diesen Account sein mssen, dann bitte mit *from NG*
im Subject. Ansonsten landet die Nachricht direkt im Trash-Ordner!
Please add *from NG* to subject, otherwise the message will be moved to
the trash directory!
http://www.beuder.de
|||thanks Mathias
"Matthias Beuder" <newsgroup.user@.beuder.de> wrote in message
news:d8bvf8$2go$1@.online.de...
> JP Breton wrote:
> Hi,
> there is the option DISABLENETWORKPROTOCOLS by installing MSDE, if
> DISABLENETWORKPROTOCOLS=1 you can't reach the MSDE instance remotely.
> --
> Matthias Beuder
> Wenn schon Mails an diesen Account sein mssen, dann bitte mit *from NG*
> im Subject. Ansonsten landet die Nachricht direkt im Trash-Ordner!
> Please add *from NG* to subject, otherwise the message will be moved to
> the trash directory!
> http://www.beuder.de