Viewing 15 posts - 16 through 30 (of 34 total)
You can join the table with the names of tables also the statement.
November 17, 2008 at 5:28 am
If not references are present on the tables:
EXEC sp_MSForEachTable 'truncate TABLE ? ' will be enough to truncate all tables.
the sp_MSForEachTable replace the ? for the actual table Name.
November 17, 2008 at 5:23 am
We used a similar aproach,however, most of the time whe want the trigger to do as little and as fast as possible, so we move the data straight into an...
October 2, 2008 at 7:33 am
Yes, it will work, however, before trying this is always good to create a backup of your database; also, it doesn't hurt to set the database to single_user and run...
September 30, 2008 at 2:45 pm
I will gladly help you if you write about what are you trying to do. There are many uses for the script such as inserting into a bulk insert, deleting...
August 18, 2008 at 6:42 am
Here it is:
--------------4. Restore Relationships. ON delete NO action to be research ------------
/* Restore relationships for delete set to no action; for update set to no action as on
...
August 18, 2008 at 6:40 am
What about if all you want is to give an empty shell to a developers groups or you want to do a bulk insert into multiple tables?
June 3, 2008 at 9:50 am
The proper syntax should be:
EXEC sp_MSForEachTable 'ALTER TABLE ? NOCHECK CONSTRAINT ALL'
where the ? is been replace for the table name
June 3, 2008 at 9:47 am
Going forward, we kind of loose track of the actual question for the post. In conclusion:
1. A sql trace or profiler can be use to track what is been execute.
2....
June 2, 2008 at 12:47 pm
I do agree on the weakness of using the host name, however, we are making assumptions of how the users are connecting to the database, are they using an application?...
May 31, 2008 at 10:37 pm
What about the sql server 2005 Dashboard performance reports :
That will give you a lot of information about what is going on from the cache to the average...
May 31, 2008 at 10:23 pm
Third party tool like SQL Auditing from apex is not bad, however, what about using the host name from the connection string such as the computer name? Have a look...
May 31, 2008 at 10:20 pm
Thanks, this process can be used to many others uses, a cp files can be however, not many dba's like to have cmd other than sqlcmd runing on theirs boxes
May 31, 2008 at 10:04 pm
q1) there are many ways. The easiest would be to detach the database copy the .mdf,ldf and logs zip them (.rar ) get them to the second server and then...
April 11, 2008 at 12:45 pm
If all you want to do is rename just run this:
alter database database name set single_user with rollback immediate
go
alter database DatabaseName modify name = NewDatabaseName
go
alter database NewDatabaseName set multi_user
go
print...
April 11, 2008 at 11:56 am
Viewing 15 posts - 16 through 30 (of 34 total)