Click here to Skip to main content
15,892,927 members
Home / Discussions / Database
   

Database

 
AnswerRe: Accessing SQL server w/Oracle SQL Developer Pin
Eddy Vluggen22-Jan-16 7:02
professionalEddy Vluggen22-Jan-16 7:02 
Questionaccess data base Pin
mohammed.alchalabee21-Jan-16 10:39
mohammed.alchalabee21-Jan-16 10:39 
AnswerRe: access data base Pin
Corporal Agarn22-Jan-16 0:40
professionalCorporal Agarn22-Jan-16 0:40 
GeneralRe: access data base Pin
mohammed.alchalabee22-Jan-16 8:55
mohammed.alchalabee22-Jan-16 8:55 
QuestionMySQL Transaction Pin
Gilbert Consellado20-Jan-16 23:28
professionalGilbert Consellado20-Jan-16 23:28 
AnswerRe: MySQL Transaction Pin
Eddy Vluggen22-Jan-16 1:42
professionalEddy Vluggen22-Jan-16 1:42 
QuestionNot able to Login to the database after restoring on the different Server Pin
indian14320-Jan-16 15:52
indian14320-Jan-16 15:52 
AnswerRe: Not able to Login to the database after restoring on the different Server Pin
Mycroft Holmes20-Jan-16 16:33
professionalMycroft Holmes20-Jan-16 16:33 
After restoring a database I run this script to drop and add the expected users. It assumes the users are already created on the new server. The underlying ID for the user name will be different on each server.
SQL
Declare @Usr varchar(50),
    @SQL as varchar(5000)

Declare csrPV Cursor Fast_Forward For
    Select name
    From sysusers
    Where issqluser = 1
        and hasdbaccess = 1
        AND name NOT IN ('dbo','IBMSQLDBA')

OPEN csrPV 

FETCH NEXT FROM csrPV INTO @Usr

WHILE @@FETCH_STATUS = 0
BEGIN

    Set @SQL = 'DROP USER [' + @Usr + ']'
    Print @SQL
    exec (@SQL)

    Set @SQL = 'CREATE USER [' + @Usr + '] FOR LOGIN [' + @Usr + '] WITH DEFAULT_SCHEMA=[dbo]'
    print @SQL
    exec (@SQL)

    Set @sql = 'ALTER LOGIN [' + @Usr + '] ENABLE'
    exec (@SQL)

    EXEC sp_addrolemember N'db_owner', @Usr

    FETCH NEXT FROM csrPV INTO @Usr
END
CLOSE csrPV
DEALLOCATE csrPV
Never underestimate the power of human stupidity
RAH

GeneralRe: Not able to Login to the database after restoring on the different Server Pin
indian14320-Jan-16 21:08
indian14320-Jan-16 21:08 
Generaldata warehouse Pin
mohammed.alchalabee20-Jan-16 5:32
mohammed.alchalabee20-Jan-16 5:32 
GeneralRe: data warehouse Pin
Eddy Vluggen20-Jan-16 6:31
professionalEddy Vluggen20-Jan-16 6:31 
GeneralRe: data warehouse Pin
Corporal Agarn20-Jan-16 6:47
professionalCorporal Agarn20-Jan-16 6:47 
GeneralRe: data warehouse Pin
mohammed.alchalabee20-Jan-16 7:38
mohammed.alchalabee20-Jan-16 7:38 
GeneralRe: data warehouse Pin
Eddy Vluggen20-Jan-16 9:07
professionalEddy Vluggen20-Jan-16 9:07 
GeneralRe: data warehouse Pin
mohammed.alchalabee21-Jan-16 1:32
mohammed.alchalabee21-Jan-16 1:32 
QuestionLooking for a program for creating, compiling and hosting deductive databases with Datalog Pin
Dahamsta14-Jan-16 0:04
Dahamsta14-Jan-16 0:04 
QuestionRe: Looking for a program for creating, compiling and hosting deductive databases with Datalog Pin
Richard MacCutchan14-Jan-16 2:53
mveRichard MacCutchan14-Jan-16 2:53 
QuestionRe: Looking for a program for creating, compiling and hosting deductive databases with Datalog Pin
Dahamsta14-Jan-16 5:22
Dahamsta14-Jan-16 5:22 
SuggestionRe: Looking for a program for creating, compiling and hosting deductive databases with Datalog Pin
Richard MacCutchan14-Jan-16 2:55
mveRichard MacCutchan14-Jan-16 2:55 
GeneralRe: Looking for a program for creating, compiling and hosting deductive databases with Datalog Pin
Dahamsta14-Jan-16 5:24
Dahamsta14-Jan-16 5:24 
Questiondatabase Pin
Nirma Singh12-Jan-16 0:34
Nirma Singh12-Jan-16 0:34 
AnswerRe: database Pin
Richard MacCutchan12-Jan-16 0:48
mveRichard MacCutchan12-Jan-16 0:48 
AnswerRe: database Pin
ZurdoDev12-Jan-16 1:32
professionalZurdoDev12-Jan-16 1:32 
QuestionMerging rows Pin
jonatan_5565-Jan-16 0:47
jonatan_5565-Jan-16 0:47 
AnswerRe: Merging rows Pin
Michael_Davies5-Jan-16 1:02
Michael_Davies5-Jan-16 1:02 

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.