Jump to content

Recommended Posts

Posted

Olá,

A minha questão é, tenho informação de uma tabela no sql server, e gostaria de fazer uma mecanismo que me mandasse essa informaçao para um ficherio txt?

Posted

Mas queres ter uma aplicação para fazer isso, ou basta uma rotina para o sql server fazer isso? se for a ultima opção, pesquisa por Integration Services.

Mas para uma coisa tão simples, há na net scripts para o sql server exportar para txt....

Oracle Certified Professional - AdministraçãoOracle Certified Professional - Pl/sqlMCPD - Microsoft Certified Professional DeveloperMCTS - Microsoft Certified Technology Specialist

Posted

Boas,

Tentei usar este sript EXEC xp_cmdshell 'bcp "SELECT * FROM Paises" queryout "C:\teste.txt" -T -c -t,'

Mas está a dar o seguinte erro:

SQLState = 08001, NativeError = 2

Error = [Microsoft]

Named Pipes Provider: Could not open a connection to SQL Server [2]. 

SQLState = 08001, NativeError = 2

Error = [Microsoft][sql Server Native Client 10.0]A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is config

ured to allow remote connections. For more information see SQL Server Books Online.

SQLState = S1T00, NativeError = 0

Error = [Microsoft][sql Server Native Client 10.0]Login timeout expired

NULL

Alguém ,e consegue ajudar?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.