The Kat's Work - Blog
Main | Blog | Registration | Login
Tuesday
2024-04-16
8:29 PM
Welcome Guest | RSS

Recently due to transposition errors ( I typed it in wrong,) i had to unlock the SA password on one of our servers (in my defence i didn't even know this database existed.)

Good thing with having an all Microsoft solution is that local admins ,if set up correctly, have access to sql servers as sysadmin.

To enable this behaviour though you must add the local admin to the user group SQLServer2008MSSQLUser$<servername>$<instance>. Which should already exist. A word of warning when I say local admin I mean local admin, not domain users with local admin rights I mean <servername>\<Administrator UserName>.

Now to log in using windows authentication using the local admin you must run the server in "single user mode.” To do this stop the SQL Server service. Add -m as a startup parameter than start the service.

You will now be able to login into to the sql server using enterprise manager and windows authentication. Once logged in unlock the SA user (you will need to change its password to unlock,). Once SA is unlocked restart the sql service without the -m parameter and log on as SA.

I would recommended at this point making a backup SA user and storing its details securely.

Views: 3466 | Added by: The_Kat | Date: 2011-09-20 | Comments (2)


After using the set oracle_sid method I had a few problems with connections in sqlplus. In that even though I would specify one database I would get the one set in oracle_sid. For this reason I would suggest it is good practice to run the following code after each connection just to check your are connected to the right database.

select name from v$database;


Tested in 10g and 11g.
Views: 1187 | Added by: The_Kat | Date: 2011-08-23 | Comments (0)


Simple few lines of code to loop through a request and print out every parameter and its value.

Enumeration parameterNames = request.getParameterNames();

while (parameterNames.hasMoreElements()){ 
 String requestName = (String)parameterNames.nextElement();
 String comment = equest.getParameter(requestName);

 System.out.println(requestName);
 System.out.println(comment);
}
Views: 2955 | Added by: The_Kat | Date: 2011-08-23 | Comments (0)

« 1 2 3 4 ... 12 13 »
Login form
Adverts
Search
Calendar
«  April 2024  »
SuMoTuWeThFrSa
 123456
78910111213
14151617181920
21222324252627
282930
Entries archive
Site friends
  • Create your own site
  • Spree4.com
  • My Blog
  • Statistics

    Total online: 1
    Guests: 1
    Users: 0
    spree4
    Copyright MyCorp © 2024
    Website builderuCoz