Ola pessoal,

vasculhando uns scripts antigos achei uns outros legais.
Esse tenho até a fonte, achei legal o ano da criação:

Tabelas com Lock:
— Purpose: Display database locks and latched (with tables names, etc)
— Date: 12-Apr-1998
— Author: Frank Naude ([email protected])

[et_pb_dmb_code_snippet _builder_version=”4.0.6″ code=”U2VsZWN0IHMuU2lkLCBzLlNlcmlhbCMsCkRlY29kZShzLlByb2Nlc3MsIE51bGwsIERlY29kZShTdWJzdHIocC5Vc2VybmFtZSwgMSwgMSksICc/JywgVXBwZXIocy5Pc3VzZXIpLCBwLlVzZXJuYW1lKSwKRGVjb2RlKHAuVXNlcm5hbWUsICdPUkFDVVNSICcsIFVwcGVyKHMuT3N1c2VyKSwgcy5Qcm9jZXNzKSkgUHJvY2VzcywKTnZsKHMuVXNlcm5hbWUsICdTWVMgKCcgfHwgU3Vic3RyKHAuVXNlcm5hbWUsIDEsIDQpIHx8ICcpJykgVXNlcm5hbWUsCkRlY29kZShzLlRlcm1pbmFsLCBOdWxsLCBSdHJpbShwLlRlcm1pbmFsLCBDaHIoMCkpLCBVcHBlcihzLlRlcm1pbmFsKSkgVGVybWluYWwsCkRlY29kZShsLlR5cGUsCi0tIExvbmcgbG9ja3MKJ1RNJywgJ0RNTC9EQVRBIEVOUScsICdUWCcsICdUUkFOU0FDIEVOUScsICdVTCcsICdQTFMgVVNSIExPQ0snLAotLSBTaG9ydCBsb2NrcwonQkwnLCAnQlVGIEhBU0ggVEJMJywgJ0NGJywgJ0NPTlRST0wgRklMRScsICdDSScsICdDUk9TUyBJTlNUIEYnLCAnREYnLCAnREFUQSBGSUxFICcsICdDVScsCidDVVJTT1IgQklORCAnLCAnREwnLCAnRElSRUNUIExPQUQgJywgJ0RNJywgJ01PVU5UL1NUUlRVUCcsICdEUicsICdSRUNPIExPQ0sgJywgJ0RYJywKJ0RJU1RSSUIgVFJBTicsICdGUycsICdGSUxFIFNFVCAnLCAnSU4nLCAnSU5TVEFOQ0UgTlVNJywgJ0ZJJywgJ1NHQSBP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by5Pd25lciMgPSB1LlVzZXIjKCspCkFuZCBsLlR5cGUgJ01SJwpVbmlvbiBBbGwgLyoqKiBMQVRDSCBIT0xERVJTICoqKi8KU2VsZWN0IHMuU2lkLCBzLlNlcmlhbCMsIHMuUHJvY2Vzcywgcy5Vc2VybmFtZSwgcy5UZXJtaW5hbCwgJ0xBVENIJywgJ1gnLCAnTk9ORScsCmguTmFtZSB8fCAnIEFERFI9JyB8fCBSYXd0b2hleChMYWRkcikKRnJvbSBTeXMudl8kcHJvY2VzcyBwLCBTeXMudl8kc2Vzc2lvbiBzLCBTeXMudl8kbGF0Y2hob2xkZXIgaApXaGVyZSBoLlBpZCA9IHAuUGlkCkFuZCBwLkFkZHIgPSBzLlBhZGRyClVuaW9uIEFsbCAvKioqIExBVENIIFdBSVRFUlMgKioqLwpTZWxlY3Qgcy5TaWQsIHMuU2VyaWFsIywgcy5Qcm9jZXNzLCBzLlVzZXJuYW1lLCBzLlRlcm1pbmFsLCAnTEFUQ0gnLCAnTk9ORScsICdYJywKTmFtZSB8fCAnIExBVENIPScgfHwgcC5MYXRjaHdhaXQKRnJvbSBTeXMudl8kc2Vzc2lvbiBzLCBTeXMudl8kcHJvY2VzcyBwLCBTeXMudl8kbGF0Y2ggbApXaGVyZSBMYXRjaHdhaXQgSXMgTm90IE51bGwKQW5kIHAuQWRkciA9IHMuUGFkZHIKQW5kIHAuTGF0Y2h3YWl0ID0gbC5BZGRyOw==[/et_pb_dmb_code_snippet]

Esse outro é uma série de SQL’s básicos que podem ser executados no incio de uma análise de um banco.

Visão geral do banco de dados:

[et_pb_dmb_code_snippet _builder_version=”4.0.6″ code=”U2VsZWN0ICoKRnJvbSBWJGRhdGFiYXNlOwoKU2VsZWN0ICoKRnJvbSBWJGluc3RhbmNlOwoKU2VsZWN0ICoKRnJvbSBWJHZlcnNpb247CgpTZWxlY3QgYS5OYW1lLCBhLlZhbHVlCkZyb20gViRzZ2EgYTsKClNlbGVjdCBTdWJzdHIoYy5OYW1lLCA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TAuMDAnKSwgMTAsICcgJykgIlNpemUgKE0pIgpGcm9tIFYkZGF0YWZpbGUgZApPcmRlciBCeSAxOwoKU2VsZWN0IGwuR3JvdXAjICJHcm91cCIsIFN1YnN0cihsLk1lbWJlciwgMSwgNjApICJMb2dmaWxlIiwgTnZsKGwuU3RhdHVzLCAnVU5LTk9XTicpICJTdGF0dXMiCkZyb20gViRsb2dmaWxlIGwKT3JkZXIgQnkgMSwgMjs=[/et_pb_dmb_code_snippet]

Espero ter ajudado. O mais interessante disso é que aqui eles me ajudam em qualquer lugar, como ocorreu esses dias, guardado nos HDs externos da vida … ficam esquecidos.

Att,
capin