Click here to Skip to main content
15,921,454 members
Home / Discussions / Database
   

Database

 
QuestionSetting password to my own SQL database. Pin
deepseeindeepsy9-Jun-09 20:23
deepseeindeepsy9-Jun-09 20:23 
AnswerRe: Setting password to my own SQL database. Pin
Vimalsoft(Pty) Ltd9-Jun-09 21:07
professionalVimalsoft(Pty) Ltd9-Jun-09 21:07 
GeneralRe: Setting password to my own SQL database. Pin
deepseeindeepsy9-Jun-09 21:47
deepseeindeepsy9-Jun-09 21:47 
GeneralRe: Setting password to my own SQL database. Pin
Vimalsoft(Pty) Ltd9-Jun-09 21:59
professionalVimalsoft(Pty) Ltd9-Jun-09 21:59 
GeneralRe: Setting password to my own SQL database. Pin
Jerry Hammond10-Jun-09 5:36
Jerry Hammond10-Jun-09 5:36 
GeneralRe: Setting password to my own SQL database. Pin
deepseeindeepsy11-Jun-09 18:45
deepseeindeepsy11-Jun-09 18:45 
GeneralRe: Setting password to my own SQL database. Pin
Vimalsoft(Pty) Ltd11-Jun-09 20:31
professionalVimalsoft(Pty) Ltd11-Jun-09 20:31 
AnswerRe: Setting password to my own SQL database. Pin
Isaac Gordon10-Jun-09 0:13
Isaac Gordon10-Jun-09 0:13 
Many Time I am Also Suffer From this Problem but at a long time i find a solution
about this problem's.
First you Have To Change Window Authentication mode to mix mode authentication.
use Done this by Done From Inside SQL Server Object Explore\Properties\Security\Server Authentication Change to mix mode Authentication
or
by using Query run in Window Authentication mode
1)EXEC xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\MSSQLServer\MSSQLServer', N'LoginMode', REG_DWORD, 2

2)Alter login sa enable
3)Alter login sa with password ='[abc]' --any Password
4)EXEC sp_revokelogin 'BUILTIN\Administrators'
5)Restart you'r SQL Server Service
and Batch File in C#.NEt is
int iChar = 34;
char aChar = (char)iChar;
StreamWriter sStr = new StreamWriter(GetWorkingDir + "//SQLSEREVR.Bat");
sStr.WriteLine("@echo off ");
sStr.WriteLine(@"CD\");
sStr.WriteLine(@"osql -E -S .\sqlexpress -Q "+aChar.ToString()+"Alter login sa enable"+aChar.ToString()+"");
sStr.WriteLine(@"osql -E -S .\sqlexpress -Q " + aChar.ToString() + "Alter login sa with password ='[abc]'" + aChar.ToString() + "");
sStr.WriteLine("Net stop " + aChar.ToString() + "SQL Server (SQLEXPRESS)" + aChar.ToString() + "");
sStr.WriteLine("Net start " + aChar.ToString() + "SQL Server (SQLEXPRESS)" + aChar.ToString() + "");
sStr.WriteLine(@"osql -E -S .\sqlexpress -Q " + aChar.ToString() + @"EXEC sp_revokelogin 'BUILTIN\Administrators'" + aChar.ToString() + "");
sStr.WriteLine("Net stop " + aChar.ToString() + "SQL Server (SQLEXPRESS)" + aChar.ToString() + "");
sStr.WriteLine("Net start " + aChar.ToString() + "SQL Server (SQLEXPRESS)" + aChar.ToString() + "");



string sBatchFileName = GetWorkingDir + "//SQLSEREVR.Bat";
AnswerRe: Setting password to my own SQL database. Pin
Jerry Hammond10-Jun-09 5:35
Jerry Hammond10-Jun-09 5:35 
GeneralAbout .mdf Database..... Pin
Isaac Gordon9-Jun-09 20:22
Isaac Gordon9-Jun-09 20:22 
GeneralRe: About .mdf Database..... Pin
Jerry Hammond10-Jun-09 5:38
Jerry Hammond10-Jun-09 5:38 
QuestionNeed Query for this Pin
sujithkumarsl9-Jun-09 19:31
sujithkumarsl9-Jun-09 19:31 
AnswerRe: Need Query for this Pin
_Damian S_9-Jun-09 19:37
professional_Damian S_9-Jun-09 19:37 
GeneralRe: Need Query for this Pin
sujithkumarsl9-Jun-09 20:08
sujithkumarsl9-Jun-09 20:08 
AnswerRe: Need Query for this Pin
sujithkumarsl9-Jun-09 19:43
sujithkumarsl9-Jun-09 19:43 
GeneralRe: Need Query for this Pin
_Damian S_9-Jun-09 19:47
professional_Damian S_9-Jun-09 19:47 
GeneralRe: Need Query for this Pin
sujithkumarsl9-Jun-09 20:08
sujithkumarsl9-Jun-09 20:08 
Questioncross query question in access 2007 (sum & avg) Pin
E_Gold9-Jun-09 19:31
E_Gold9-Jun-09 19:31 
AnswerRe: cross query question in access 2007 (sum & avg) Pin
E_Gold9-Jun-09 19:31
E_Gold9-Jun-09 19:31 
AnswerRe: cross query question in access 2007 (sum & avg) Pin
_Damian S_9-Jun-09 19:46
professional_Damian S_9-Jun-09 19:46 
GeneralRe: cross query question in access 2007 (sum & avg) Pin
E_Gold10-Jun-09 0:14
E_Gold10-Jun-09 0:14 
Questionpassword protect sql views Pin
Anoop Brijmohun9-Jun-09 4:57
Anoop Brijmohun9-Jun-09 4:57 
AnswerRe: password protect sql views Pin
Mycroft Holmes9-Jun-09 14:45
professionalMycroft Holmes9-Jun-09 14:45 
Questionconnection parameters in configuration file Pin
Fadi Yoosuf9-Jun-09 4:29
Fadi Yoosuf9-Jun-09 4:29 
AnswerRe: connection parameters in configuration file Pin
Eddy Vluggen9-Jun-09 7:30
professionalEddy Vluggen9-Jun-09 7:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.