pra não esquecer…

October 16th, 2008

mudando owner de uma tabela

Posted by admin in MS SQL Server

SQL SERVER

SQL:
  1. EXEC sp_changeobjectowner 'ownerAntigo.TabelaOuObjeto', 'dbo';

uia que doce, as vezes o cara não consegue dar um select direto pq o owner está trocado, só fazer isso para cada uma das tabelas...

isso acontece normalmente com importações de versões diferentes de sql server.

September 12th, 2008

show tables para sql server

Posted by admin in MS SQL Server

select * FROM sys.sysobjects
WHERE xtype = 'u'
ORDER BY name

O xtype é o tipo de objeto, você pode selecionar tabelas do sistema com = 'S', só ver o que o cara quer...

July 1st, 2008

sql server, trocar schema ou owner de tabela

Posted by admin in MS SQL Server, xalassa

mudando schema para dbo.xxx

CODE:
  1. ALTER SCHEMA dbo TRANSFER ORIGEM.tabela;




nuvem de tags:

ícones 24 horas acentuação Apache bash benchmark bios boot celular charset comando console Download Firebird firefox http importação ipod iscsi kinghost legenda lighttpd Linux lost mod_deflate mod_magnet.so msn mssql MySQL owner Padel PHP placa mãe portabilidade Postgre SQL recovery root password selinux shell sinuca sql server ssh svn temporada completa veronica mars Windows