September 18, 2008 at 12:16 am
hi all,
how can i find location of log file?
how can i empty the log file?
how can i see the construct of database in words?
regards
thaya
September 18, 2008 at 5:43 am
1. Answered
2. It depends on the database recovery mode. If it's in simple recovery, there's nothing for you to do because the log is being flushed of all committed transactions at checkpoint. If it's in some other recovery mode, you'll need to back up the log to remove committed transactions.
BACKUP LOG MyDb TO DISK = 'somefilepath'
There's a lot more to that topic of course, but that'll get you started. There are great articles on backups, recovery and recovery to a point in time on the site here. Just search for them using the search box at the top of the screen.
3. I agree with the last poster. What are you looking for? Databases are defined be a set of words unless you're referring to the script. Use Management Studio, right click on the database in question, select Tasks then Generate Scripts. That will allow you to script all the objects in a database. There are a bunch of other options around this depending what it is you're really looking for sp_help, INFORMATION_SCHEMA tables, dynamic management views, system views...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
September 18, 2008 at 5:10 pm
how can i script the database construct only?
when you create Database,you have to write
Create Database MYDb ... right,
once you finished creating a database using script,if you wanted to see the script of the creation of database excluding table,stored procs or views,what keyword is there to use.
thanks.
thaya
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply