Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
O diagrama a seguir mostra os vários estados e transições no ciclo de vida de um stream.
Primeiro, crie um stream. O Datastream usa esse stream para transferir dados de um banco de dados de origem para um destino. Depois que o stream é criado, o estado dele é Not started.
Depois de criar o stream, é possível iniciá-lo. O status do stream muda para Starting. Isso significa que o stream está em processo de início e validação.
Se o stream for válido, o status do stream mudará de Starting para Running.
Se o stream não for válido, o status do stream mudará de Starting de volta para Not started. Em seguida, corriga os problemas do stream. Por exemplo, se houver erros associados às informações de conectividade do stream, modifique a definição dele. Após resolver todos os problemas do stream, inicie-o novamente, e o status será alterado para Starting e, em seguida, para Running.
É possível pausar um stream. Quando um stream é pausado, o Datastream não extrai nenhum dado novo do banco de dados de origem para o destino. No entanto, alguns dados podem continuar sendo gravados no destino porque os dados em trânsito continuam sendo transmitidos.
Portanto, depois de pausar um stream, o status do stream muda de Running para Draining. Drenar um stream é o processo de esvaziar o stream para que ele não contenha dados. Depois que o fluxo for drenado para todos os dados, o status do fluxo mudará de Draining para Paused.
Um stream em execução pode encontrar erros que podem fazer com que o stream mude o estado para Failed ou Failed permanently:
Um status Failed significa que o fluxo encontrou um erro recuperável. Isso significa que o stream ainda está ativo ou está tentando ser executado continuamente.
Um fluxo Failed permanently é um fluxo que encontrou um erro irreversível que impede a execução. Esses erros podem causar perda de dados.
Você pode resolver os problemas de uma transmissão Failed, e ela será retomada automaticamente. O estado muda de Failed para Running. Para mais informações, consulte Resolver problemas com uma transmissão.
É possível recuperar manualmente uma transmissão Failed permanently. Para mais informações, consulte Recuperar um stream.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-08-12 UTC."],[[["\u003cp\u003eA stream's lifecycle begins with creation, resulting in a \u003ccode\u003eNot started\u003c/code\u003e status, and it progresses through states like \u003ccode\u003eStarting\u003c/code\u003e and \u003ccode\u003eRunning\u003c/code\u003e as it's initiated and validated.\u003c/p\u003e\n"],["\u003cp\u003ePausing a \u003ccode\u003eRunning\u003c/code\u003e stream transitions it to \u003ccode\u003eDraining\u003c/code\u003e, where remaining data is processed, before finally reaching the \u003ccode\u003ePaused\u003c/code\u003e state.\u003c/p\u003e\n"],["\u003cp\u003eStreams can be modified or deleted at any point, offering flexibility in managing their operation.\u003c/p\u003e\n"],["\u003cp\u003eIf a \u003ccode\u003eRunning\u003c/code\u003e stream encounters errors, it may transition to a \u003ccode\u003eFailed\u003c/code\u003e state (recoverable) or \u003ccode\u003eFailed permanently\u003c/code\u003e state (unrecoverable), requiring manual intervention in the latter case.\u003c/p\u003e\n"],["\u003cp\u003eWhen a \u003ccode\u003eFailed\u003c/code\u003e stream is addressed, it will automatically try to resume running, and when a \u003ccode\u003ePaused\u003c/code\u003e stream is resumed it will go to a \u003ccode\u003eRunning\u003c/code\u003e state.\u003c/p\u003e\n"]]],[],null,["# Stream lifecycle\n\nThe following diagram shows the various states and transitions in the lifecycle of a stream.\n\n\u003cbr /\u003e\n\n| In this diagram, the upside-down trapezoid boxes represent actions that the user performs with the stream, and the rectangle boxes represent the resultant states of the stream based on the user's actions.\n\n\u003cbr /\u003e\n\nFirst, you [create a stream](/datastream/docs/create-a-stream). Datastream uses this stream to transfer data from a source database into a destination. After the stream is created, the state of the stream is `Not started`.\n\nAfter creating the stream, you [start it](/datastream/docs/run-a-stream#startastream). The status of the stream changes to `Starting`. This signifies that the stream is in the process of being started and validated.\n\n- If the stream is valid, then the status of the stream changes from `Starting` to `Running`.\n- If the stream isn't valid, then the status of the stream changes from `Starting` back to `Not started`. You can then [rectify the problems of the stream](/datastream/docs/troubleshoot-a-stream). For example, if errors are associated with the connectivity information of the stream, then modify the stream definition. After resolving all problems of the stream, start it again, and the status changes to `Starting`, and then to `Running`.\n\nYou can [pause a stream](/datastream/docs/run-a-stream#pauseastream). When a stream is paused, Datastream doesn't pull any new data from the source database into the destination. However, some data may continue to be written to the destination because *in flight* data continues to flow.\n\nTherefore, after you pause a stream, the status of the stream changes from `Running` to `Draining`. Draining a stream is the process of emptying the stream so that it doesn't contain any data. After the stream is drained of all data, then the status of the stream changes from `Draining` to `Paused`.\n\nWhen you [resume a paused stream](/datastream/docs/run-a-stream#resumeastream), the status of the stream changes from `Paused` to `Running`.\n\nThere are two actions that you can perform at any time during the lifecycle of the stream:\n\n- [Modify the stream](/datastream/docs/modify-a-stream). Any changes that you make to it take effect immediately.\n- [Delete the stream](/datastream/docs/delete-a-stream) after you no longer need it.\n\nStream errors\n-------------\n\nA running stream can encounter errors which might cause the stream to change its state to `Failed` or `Failed permanently`:\n\n- A `Failed` status means that the stream encountered a recoverable error. This means that the stream is either still active, or continuously attempting to run.\n- A `Failed permanently` stream is a stream that ran into an unrecoverable error which prevents it from continuing to run. Such errors might cause data loss.\n\nYou can address the issues for a `Failed` stream, and the stream automatically resumes. Its state changes from `Failed` back to `Running`. For more information, see [Troubleshoot a stream](/datastream/docs/troubleshoot-a-stream).\n\nYou can manually recover a `Failed permanently` stream. For more information, see [Recover a stream](/datastream/docs/troubleshoot-a-stream).\n\nWhat's next\n-----------\n\n- For information about running a stream, see [Run a stream](/datastream/docs/run-a-stream).\n- For information about modifying your streams, see [Modify a stream](/datastream/docs/modify-a-stream).\n- For information about troubleshooting a stream, see [Troubleshoot a stream](/datastream/docs/troubleshoot-a-stream).\n- For information about recovering a stream, see [Recover a stream](/datastream/docs/recover-a-stream).\n- For information about deleting a stream, see [Delete a stream](/datastream/docs/delete-a-stream)."]]