Blogs

Technical Article

RE: How to corrupt a db

  • Reply

Hello Markus, quote: Here you have a script which corrupts the IAM of a table. Note that after running the script the table in question is longer accessible while the database status remains online. thanks, I will try it in the next days! ...and surely come up with follow-up questions Cheers, Frank

2003-06-10

Technical Article

RE: File Batch Rename

  • Reply

If your 100 tables have similar names, e.g. all start with peter (peter1,peter2 etc). Then you could use this sp_MSforeachtable @command1="update ? set doc = replace(replace('?','[dbo].[',''),']','')+' '+doc",@whereand = "and name like 'peter%'"

2003-06-10

Technical Article

RE: How to corrupt a db

  • Reply

It seems that if you can't trust your DBA's, you'll have a problem... quote: Interesting! Hope there aren't any unscrupulous DBA's with a company grudge reading this. maybe something to use on the next compensation discussion? Cheers, Frank

2003-06-10

Technical Article

RE: Performance of a Database Restore

  • Reply

quote: restore database ProdCPWQuote from tapedrive with file = 40, unload, stats, norecovery, replace, move 'prodcpwquotelog' TO 'D:\atlantic\prod\cpwquote\db\prodcpwquotelog.ldf' Have you tested the restoration without 'replace' option when the database does not exist and underlying NTFS files do *not* exist?

2003-06-10

1 reads

Technical Article

RE: Stored Procedures

  • Reply

Thanks AW, but.... I don't understand like resolving the problem! I execute the stored procedure in local SQL Server. In the code of the stored procedure, I use (for example), to reference a table: INSERT INTO TABLE_NAME_1 select ....FIELDS_NAME, .... from [SERVER_NAME].[DB_NAME].[dbo].[TABLE_NAME_2] SERVER_NAME is the name of my local SQL Server. Executing the procedure the […]

2003-06-10

Technical Article

RE: Running an EXE from T-SQL

  • Reply

master..xp_cmdshell will let you run host commands from QA/ISQL/OSQL. Be careful not to run things that will pop up a dialog box or prompt for input because it'll just hang there. eg. exec master..xp_cmdshell 'time' ...will just hang there, whereas: exec master..xp_cmdshell 'time /t' ...will return some good info.

2003-06-10

1 reads

Blogs

Daily Coping 3 Feb 2023

By

Today’s coping tip is to ask other people about things they’ve enjoyed recently I...

Daily Coping 2 Feb 2023

By

Today’s coping tip is to challenge negative thoughts and look for the upside. I’m...

Deadline for Microsoft MVP contributions is 20 March 2023

By

Since changing to the new MVP renewal model, Microsoft MVPs have had until 31...

Read the latest Blogs

Forums

Coding Magic Values

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Coding Magic Values

How to Check previous data loaded records vs current day in a table

By Zond Sita

Hello Good Morning, I have three Tables, Assume Table1, Table2, Table3 these three tables...

Permissions Changes Not Doing Anything

By EsquireDeveloper

Hi friends, So I have a Login to a server that is a windows...

Visit the forum

Ask SSC Logo Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers