How-to: Create a new Oracle User

Every now and then I need to create a new Oracle user to test the CodeSmith Generator OracleSchemaProvider. I wanted to outline the steps that I use to create a new user as well as change the password of an existing user. The first step one needs to take is to create a new user but you may not remember your login information if it has been a while. At this point I always open up SQL Plus from the start menu and enter in the following user name when prompted. / as sysdba This allows you to connect as the sysdba user without remembering any credentials. Please note that the passwords and/or steps...

How to attach a MS SQL database (.mdf) file with a missing log file (.ldf)

Tonight I ran into a dilemma where I was only supplied with a Microsoft SQL .mdf file. I thought that I would have no problems and just have to attach the database file and Microsoft SQL would rebuild the log file for me. I was wrong and it didn't take any longer than five minutes for me to figure that out. I thought to myself that quite a few people would have had the same problem as me and a solution would be available the World Wide Web. Thanks to Google, I eventually came across a post where a guy had available the SQL command that will attach the database file and build the log from scratch...