首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
社区首页 >问答首页 >使用c2dm时出现SERVICE_NOT_AVAILABLE错误

使用c2dm时出现SERVICE_NOT_AVAILABLE错误
EN

Stack Overflow用户
提问于 2011-12-10 23:51:01
回答 1查看 2.8K关注 0票数 1

我正在尝试让C2DM工作,我正在遵循ChrometoPhone示例here。当我的模拟器尝试注册到C2DM时,我得到了SERVICE_NOT_AVAILABLE。我已经检查了模拟器是否设置了gmail帐户,并且在示例代码中作为senderIdDeviceRegistrar.java传递了相同的帐户。我还确信我的模拟器可以访问Internet,并且我拥有所有权限(访问Internet、唤醒锁等)。这里还会有什么问题呢?

我不确定我是否很好地解释了这个问题。如果我需要解释什么,请告诉我。

这是C2DMBaseReceiver.java

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
package com.apps.terrapin;

import java.io.IOException;

import android.app.AlarmManager;
import android.app.IntentService;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.os.PowerManager;
import android.util.Log;

/**
 * Base class for C2D message receiver. Includes constants for the
 * strings used in the protocol.
 */
public abstract class C2DMBaseReceiver extends IntentService {
    private static final String C2DM_RETRY = "com.google.android.c2dm.intent.RETRY";

    public static final String REGISTRATION_CALLBACK_INTENT = "com.google.android.c2dm.intent.REGISTRATION";
    private static final String C2DM_INTENT = "com.google.android.c2dm.intent.RECEIVE";

    // Logging tag
    private static final String TAG = "C2DM";

    // Extras in the registration callback intents.
    public static final String EXTRA_UNREGISTERED = "unregistered";

    public static final String EXTRA_ERROR = "error";

    public static final String EXTRA_REGISTRATION_ID = "registration_id";

    public static final String ERR_SERVICE_NOT_AVAILABLE = "SERVICE_NOT_AVAILABLE";
    public static final String ERR_ACCOUNT_MISSING = "ACCOUNT_MISSING";
    public static final String ERR_AUTHENTICATION_FAILED = "AUTHENTICATION_FAILED";
    public static final String ERR_TOO_MANY_REGISTRATIONS = "TOO_MANY_REGISTRATIONS";
    public static final String ERR_INVALID_PARAMETERS = "INVALID_PARAMETERS";
    public static final String ERR_INVALID_SENDER = "INVALID_SENDER";
    public static final String ERR_PHONE_REGISTRATION_ERROR = "PHONE_REGISTRATION_ERROR";

    // wakelock
    private static final String WAKELOCK_KEY = "C2DM_LIB";

    private static PowerManager.WakeLock mWakeLock;
    private final String senderId;

    /**
     * The C2DMReceiver class must create a no-arg constructor and pass the 
     * sender id to be used for registration.
     */
    public C2DMBaseReceiver(String senderId) {
        // senderId is used as base name for threads, etc.
        super(senderId);
        this.senderId = senderId;
    }

    /**
     * Called when a cloud message has been received.
     */
    protected abstract void onMessage(Context context, Intent intent);

    /**
     * Called on registration error. Override to provide better
     * error messages.
     *  
     * This is called in the context of a Service - no dialog or UI.
     */
    public abstract void onError(Context context, String errorId);

    /**
     * Called when a registration token has been received.
     */
    public void onRegistered(Context context, String registrationId) throws IOException {
        // registrationId will also be saved
    }

    /**
     * Called when the device has been unregistered.
     */
    public void onUnregistered(Context context) {
    }


    @Override
    public final void onHandleIntent(Intent intent) {
        try {
            Context context = getApplicationContext();
            if (intent.getAction().equals(REGISTRATION_CALLBACK_INTENT)) {
                handleRegistration(context, intent);
            } else if (intent.getAction().equals(C2DM_INTENT)) {
                onMessage(context, intent);
            } else if (intent.getAction().equals(C2DM_RETRY)) {
                C2DMessaging.register(context, senderId);
            }
        } finally {
            //  Release the power lock, so phone can get back to sleep.
            // The lock is reference counted by default, so multiple 
            // messages are ok.

            // If the onMessage() needs to spawn a thread or do something else,
            // it should use it's own lock.
            mWakeLock.release();
        }
    }


    /**
     * Called from the broadcast receiver. 
     * Will process the received intent, call handleMessage(), registered(), etc.
     * in background threads, with a wake lock, while keeping the service 
     * alive. 
     */
    static void runIntentInService(Context context, Intent intent) {
        if (mWakeLock == null) {
            // This is called from BroadcastReceiver, there is no init.
            PowerManager pm = 
                (PowerManager) context.getSystemService(Context.POWER_SERVICE);
            mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, 
                    WAKELOCK_KEY);
        }
        mWakeLock.acquire();

        // Use a naming convention, similar with how permissions and intents are 
        // used. Alternatives are introspection or an ugly use of statics. 
        String receiver = context.getPackageName() + ".C2DMReceiver";
        intent.setClassName(context, receiver);

        context.startService(intent);

    }


    private void handleRegistration(final Context context, Intent intent) {
        final String registrationId = intent.getStringExtra(EXTRA_REGISTRATION_ID);
        String error = intent.getStringExtra(EXTRA_ERROR);
        String removed = intent.getStringExtra(EXTRA_UNREGISTERED);

        if (Log.isLoggable(TAG, Log.DEBUG)) {
            Log.d(TAG, "dmControl: registrationId = " + registrationId +
                ", error = " + error + ", removed = " + removed);
        }

        if (removed != null) {
            // Remember we are unregistered
            C2DMessaging.clearRegistrationId(context);
            onUnregistered(context);
            return;
        } else if (error != null) {
            // we are not registered, can try again
            C2DMessaging.clearRegistrationId(context);
            // Registration failed
            Log.e(TAG, "Registration error " + error);
            onError(context, error);
            if ("SERVICE_NOT_AVAILABLE".equals(error)) {
                long backoffTimeMs = C2DMessaging.getBackoff(context);

                Log.d(TAG, "Scheduling registration retry, backoff = " + backoffTimeMs);
                Intent retryIntent = new Intent(C2DM_RETRY);
                PendingIntent retryPIntent = PendingIntent.getBroadcast(context, 
                        0 /*requestCode*/, retryIntent, 0 /*flags*/);

                AlarmManager am = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
                am.set(AlarmManager.ELAPSED_REALTIME,
                        backoffTimeMs, retryPIntent);

                // Next retry should wait longer.
                backoffTimeMs *= 2;
                C2DMessaging.setBackoff(context, backoffTimeMs);
            } 
        } else {
            try {
                onRegistered(context, registrationId);
                C2DMessaging.setRegistrationId(context, registrationId);
            } catch (IOException ex) {
                Log.e(TAG, "Registration error " + ex.getMessage());
            }
        }
    }
}

C2DMBroadcastReceiver.java

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
package com.apps.terrapin;

import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

/**
 * Helper class to handle BroadcastReciver behavior.
 * - can only run for a limited amount of time - it must start a real service 
 * for longer activity
 * - must get the power lock, must make sure it's released when all done.
 * 
 */
public class C2DMBroadcastReceiver extends BroadcastReceiver {

    @Override
    public final void onReceive(Context context, Intent intent) {
        // To keep things in one place.
        C2DMBaseReceiver.runIntentInService(context, intent);
        setResult(Activity.RESULT_OK, null /* data */, null /* extra */);

        if (intent.getAction().equals("com.google.android.c2dm.intent.REGISTRATION")) {
            Log.e("TAG", "Broadcast receiver got REGISTRATION");
            Log.e("TAG", "ID: " + intent.getExtras().getString("registration_id"));

        } else if (intent.getAction().equals("com.google.android.c2dm.intent.RECEIVE")) {
            Log.e("TAG", "Broadcast receiver got message");
         }
    }
}

C2DMessaging.java

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
package com.apps.terrapin;

/*
 * Copyright 2010 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;

/**
 * Utilities for device registration.
 *
 * Will keep track of the registration token in a private preference.
 */
public class C2DMessaging {
    public static final String EXTRA_SENDER = "sender";
    public static final String EXTRA_APPLICATION_PENDING_INTENT = "app";
    public static final String REQUEST_UNREGISTRATION_INTENT = "com.google.android.c2dm.intent.UNREGISTER";
    public static final String REQUEST_REGISTRATION_INTENT = "com.google.android.c2dm.intent.REGISTER";
    public static final String LAST_REGISTRATION_CHANGE = "last_registration_change";
    public static final String BACKOFF = "backoff";
    public static final String GSF_PACKAGE = "com.google.android.gsf";


    // package
    static final String PREFERENCE = "com.google.android.c2dm";

    private static final long DEFAULT_BACKOFF = 30000;

    /**
     * Initiate c2d messaging registration for the current application
     */
    public static void register(Context context, String senderId) {
        Intent registrationIntent = new Intent("com.google.android.c2dm.intent.REGISTER");
        //registrationIntent.setPackage(GSF_PACKAGE);
        registrationIntent.putExtra("app", PendingIntent.getBroadcast(context, 0, new Intent(), 0));
        registrationIntent.putExtra("sender", senderId);
        context.startService(registrationIntent);
    }

    /**
     * Unregister the application. New messages will be blocked by server.
     */
    public static void unregister(Context context) {
        Intent regIntent = new Intent(REQUEST_UNREGISTRATION_INTENT);
        regIntent.setPackage(GSF_PACKAGE);
        regIntent.putExtra(EXTRA_APPLICATION_PENDING_INTENT, PendingIntent.getBroadcast(context,
                0, new Intent(), 0));
        context.startService(regIntent);
    }

    /**
     * Return the current registration id.
     *
     * If result is empty, the registration has failed.
     *
     * @return registration id, or empty string if the registration is not complete.
     */
    public static String getRegistrationId(Context context) {
        final SharedPreferences prefs = context.getSharedPreferences(
                PREFERENCE,
                Context.MODE_PRIVATE);
        String registrationId = prefs.getString("dm_registration", "");
        return registrationId;
    }

    public static long getLastRegistrationChange(Context context) {
        final SharedPreferences prefs = context.getSharedPreferences(
                PREFERENCE,
                Context.MODE_PRIVATE);
        return prefs.getLong(LAST_REGISTRATION_CHANGE, 0);
    }

    static long getBackoff(Context context) {
        final SharedPreferences prefs = context.getSharedPreferences(
                PREFERENCE,
                Context.MODE_PRIVATE);
        return prefs.getLong(BACKOFF, DEFAULT_BACKOFF);
    }

    static void setBackoff(Context context, long backoff) {
        final SharedPreferences prefs = context.getSharedPreferences(
                PREFERENCE,
                Context.MODE_PRIVATE);
        Editor editor = prefs.edit();
        editor.putLong(BACKOFF, backoff);
        editor.commit();

    }

    // package
    static void clearRegistrationId(Context context) {
        final SharedPreferences prefs = context.getSharedPreferences(
                PREFERENCE,
                Context.MODE_PRIVATE);
        Editor editor = prefs.edit();
        editor.putString("dm_registration", "");
        editor.putLong(LAST_REGISTRATION_CHANGE, System.currentTimeMillis());
        editor.commit();

    }

    // package
    static void setRegistrationId(Context context, String registrationId) {
        final SharedPreferences prefs = context.getSharedPreferences(
                PREFERENCE,
                Context.MODE_PRIVATE);
        Editor editor = prefs.edit();
        editor.putString("dm_registration", registrationId);
        editor.commit();

    }
}

C2DMReceiver.java

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
package com.apps.terrapin;

/*
 * Copyright 2010 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.util.Log;

public class C2DMReceiver extends C2DMBaseReceiver {
    public C2DMReceiver() {
        super(DeviceRegistrar.SENDER_ID);
    }

    @Override
    public void onRegistered(Context context, String registration) {
        DeviceRegistrar.registerWithServer(context, registration);
    }

    @Override
    public void onUnregistered(Context context) {
        SharedPreferences prefs = Prefs.get(context);
        String deviceRegistrationID = prefs.getString("deviceRegistrationID",
                null);
        DeviceRegistrar.unregisterWithServer(context, deviceRegistrationID);
    }

    @Override
    public void onError(Context context, String errorId) {
        Log.e("TAG", "Error ocurred in onError");
    }

    @Override
    public void onMessage(Context context, Intent intent) {
        Bundle extras = intent.getExtras();
        String msg = extras.getString("message");

        Log.e("TAG", "Got a message from cloud: " + msg);
    }
}

DeviceRegistrar.java

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
package com.apps.terrapin;

import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;

import org.apache.http.HttpResponse;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;

import android.content.Context;
import android.util.Log;

public class DeviceRegistrar {
    static final String SENDER_ID = "sender@gmail.com";

    public static void registerWithServer(final Context context, final String deviceRegistrationID) {
        HttpClient client = new DefaultHttpClient();
        HttpGet request = new HttpGet();

        String url = "http://" + "192.168.1.11" + "/message.php?";
        url += "device=" + deviceRegistrationID;

        try {
            request.setURI(new URI(url));
            HttpResponse response = client.execute(request);
            Log.d("@@@@@ Server response @@@@@", response.toString());
        } catch (URISyntaxException e) {
            e.printStackTrace();
        } catch (ClientProtocolException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public static void unregisterWithServer(final Context context, final String deviceRegistrationID) {

    }
}

清单:

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    android:installLocation="preferExternal"
    package="com.apps.terrapin"
    android:versionCode="1"
    android:versionName="1.0" >
    <!-- Only this application can receive the messages and registration result -->    
    <permission android:name="com.apps.terrapin.permission.C2D_MESSAGE" 
        android:protectionLevel="signature" />
    <uses-permission android:name="com.apps.terrapin.permission.C2D_MESSAGE" />
    <!-- This app has permission to register and receive data message -->
    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />

    <!-- Permissions for internet access and account access -->
    <uses-permission android:name="android.permission.INTERNET" />

    <!-- App must have this permission to use the library -->
    <uses-permission android:name="android.permission.WAKE_LOCK" />

    <application
        android:icon="@drawable/earth"
        android:label="@string/app_name" >
        <activity
            android:label="@string/app_name"
            android:name=".TerraPin" >
            <intent-filter >
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name=".TakePictureActivity" />
        <activity android:name=".SearchActivity" />
        <activity android:name=".SettingsActivity" />

        <uses-library android:name="com.google.android.maps" />

        <service android:name=".C2DMReceiver" />

        <!-- Only google service can send data messages for the app. If permission is not set -
             any other app can generate it --> 
        <receiver android:name="com.apps.terrapin.C2DMBroadcastReceiver"
                  android:permission="com.google.android.c2dm.permission.SEND">
            <!-- Receive the actual message -->
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.RECEIVE" />
                <category android:name="com.apps.terrapin" />
            </intent-filter>
            <!-- Receive the registration id -->
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.REGISTRATION" />
                <category android:name="com.apps.terrapin" />
            </intent-filter>
        </receiver>

    </application>

    <uses-sdk android:minSdkVersion="10" />

    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />

</manifest>

返回的错误为SERVICE_NOT_AVAILABLE

在我的主要活动中,我这样做:

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
C2DMessaging.register(this, DeviceRegistrar.SENDER_ID);
        String regId = C2DMessaging.getRegistrationId(this);
        if (regId != null && !"".equals(regId)) {
            DeviceRegistrar.registerWithServer(this, regId);
        } else {
            C2DMessaging.register(this, DeviceRegistrar.SENDER_ID);
        }
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2011-12-12 10:40:50

在Android虚拟设备管理器中,编辑Android虚拟设备(AVD)并将目标设置为"Google APIs (Google Inc.) - API Level 8“,而不是"Android 2.2 - API Level 8”。这样做之后,运行您的模拟器,并在设置中设置您的google帐户(放入白名单的电子邮件)。

这为我解决了这个问题。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/8460854

复制
相关文章
直传文件到Azure Storage的Blob服务中
题记:为了庆祝获得微信公众号赞赏功能,忙里抽闲分享一下最近工作的一点心得:如何直接从浏览器中上传文件到Azure Storage的Blob服务中。 为什么 如果你的Web应用程序利用了云存储(比如Az
逸鹏
2018/04/10
2.3K0
直传文件到Azure Storage的Blob服务中
.NET Core 批量重置 Azure Blob Storage 的 mime type
我的博客使用 Azure Blob Storage 存储文章配图,结果今天玩 Azure CDN 的时候爆了,原因是图片mime type不对。我们来看看如何在 .NET Core 里批量重置 Azure Blob Storage 中文件的mime type吧。
Edi Wang
2019/07/09
9020
.NET Core 批量重置 Azure Blob Storage 的 mime type
【壹刊】Azure Data Box
  最近博主又要面临考试了,随笔又再次缓慢更新,说起考试,之前在微软的 ms learn的课程上有接触到一个叫 Azure Data Box的,刚好今天也花了一个多小时看了一下相关文档,下面就正式开始介绍今天的主要内容 -----Azure Data Box
老张的哲学
2022/04/11
2930
【壹刊】Azure Data Box
MySQL 中Blob类型数据的插入和读取
​ 我们在操作数据存入blob数据的类型,常用来存储头像图片等流数据,blob类型如果想要存储比较大的流文件的数据,建议选用longBlob的数据类型,Demo中的数据就简单的示范了一下,sql文件如下:
Dream城堡
2019/05/24
9.6K0
基于data.table的“tidyverse”?
tidyverse作为R语言数据分析中的瑞士军刀,非常好用,一个小小的缺点就是速度慢,data.table速度快,所以他们团队又开发了dtplyr,加快运行速度。
医学和生信笔记
2022/11/15
4640
基于data.table的“tidyverse”?
【数据湖】Azure 数据湖分析(Azure Data Lake Analytics )概述
在本文中,我们将探索 Azure 数据湖分析并使用 U-SQL 查询数据。 Azure 数据湖分析 (ADLA) 简介 Microsoft Azure 平台支持 Hadoop、HDInsight、数据湖等大数据。通常,传统数据仓库存储来自各种数据源的数据,将数据转换为单一格式并进行分析以做出决策。开发人员使用可能需要更长时间进行数据检索的复杂查询。组织正在增加他们在云基础架构中的足迹。它利用了云基础设施仓库解决方案,例如 Amazon RedShift、Azure Synapse Analytics(A
架构师研究会
2022/03/08
1.1K0
关于data.table中i, j, by都为数字的理解
本期还是由村长来为大家供稿,这期讲一个村长遇到的关于data.table比较有趣的问题,希望大家支持!!
用户7652506
2020/10/23
1.3K0
关于data.table中i, j, by都为数字的理解
Ajax文件上传时:Formdata、File、Blob的关系
“Formdata”接口提供了一种表示表单数据的键值对 key/value 的构造方式,并且可以轻松的将数据通过XMLHttpRequest.send() 方法发送出去。
房东的狗丶
2023/02/17
3.2K0
PG中的blob cleanup
PG提供了一个很好的BLOB接口,得到了广泛应用。然而最近我们遇到了各种客户遇到的问题,有必要对PG如何处理blob进行一次思考,尤其是BLOB清理。
yzsDBA
2021/01/05
1.5K0
深入理解xhr的responseType中blob和arrayBuffer
版权声明:本文为吴孔云博客原创文章,转载请注明出处并带上链接,谢谢。 https://blog.csdn.net/wkyseo/article/details/78232485
空空云
2018/09/27
3.2K0
支持alter table move 的数据类型 :raw blob clob
结论: 支持alter table move 的数据类型 :raw blob clob  不支持的数据类型 :long 和 long raw 实践是检验真理的最佳方法! 测试过程 1.测试raw和blob类型 SQL> create table t_move (id raw(16),btype blob) tablespace users; Table created. SQL> insert into t_move values ('411FC4193
吹水老王
2022/05/17
6540
jquery中的 $.data() 和 $dom.data() 区别
其中 dataUser 是一个Data() 对象,Data对象没有任何特殊的地方。
用户7293182
2022/01/17
6440
jquery中的 $.data() 和 $dom.data() 区别
ADF 第三篇:Integration runtime和 Linked Service
Integration runtime(IR) 是Azure 数据工厂在不同的网络环境中进行数据集成的组件,用于几个环境中:
huofo
2022/03/18
1.5K0
ADF 第三篇:Integration runtime和 Linked Service
Shell中的管道
管道 管道,从一头进去,从另一头出来。 在Shell中,管道将一个程序的标准输出作为另一个程序的标准输入,就像用一根管子将一个程序的输出连接到另一个程序的输入一样。 管道的符号是|,下面的程序将cat的标准输出作为less的标准输入,以实现翻页的功能: $ cat source.list.bk | less tee 有时候我们想要同时将程序的输出显示在屏幕上(或进入管道)和保存到文件中,这个时候可以使用tee。 tee程序的输出和它的输入一样,但是会将输入内容额外的保存到文件中: $ cat hello.t
mwangblog
2018/07/04
9100
将数据从 SQL Server 导入 Azure Storage Table
最近有个需求要将数据存储从 SQL Server 数据库切换到 Azure Storage 中的 Table。然而不管是 SSMS 还是 Azure Portal 都没有提供直接的导入功能,是不是又想自己写程序去导数据了?其实不用!没有点过数据库天赋的我996了一个晚上,终于找到了点点鼠标就搞定的方法,今天分享给大家。
Edi Wang
2020/06/15
2K0
运行mysql时,提示Table ‘performance_schema.session_variables’ doesn’t exist
第一步:在管理员命令中输入: mysql_upgrade -u root -p --force 第二步:关闭并重启数据库 service mysql stop service mysql start
用户1558882
2018/04/03
8500
运行mysql时,提示Table ‘performance_schema.session_variables’ doesn’t exist
第一步:在管理员命令中输入: mysql_upgrade -u root -p --force 第二步:关闭并重启数据库 service mysql stop service mysql start
用户1558882
2018/10/11
3.3K0
MySQL 中 blob 和 text 数据类型详解
前面文章我们介绍过一些常用数据类型的用法,比如 int、char、varchar 等。一直没详细介绍过 blob 及 text 类型,虽然这两类数据类型不太常用,但在某些场景下还是会用到的。本篇文章将主要介绍 blob 及 text 数据类型的相关知识。
MySQL技术
2021/12/21
7.3K0
【数据仓库】什么是 Azure Synapse,它与 Azure Data Bricks 有何不同?
Azure Synapse Analytics 是一项针对大型公司的无限信息分析服务,它被呈现为 Azure SQL 数据仓库 (SQL DW) 的演变,将业务数据存储和宏或大数据分析结合在一起。 在处理、管理和提供数据以满足即时商业智能和数据预测需求时,Synapse 为所有工作负载提供单一服务。后者通过与 Power BI 和 Azure 机器学习的集成而成为可能,因为 Synapse 能够使用 ONNX 格式集成数学机器学习模型。它提供了处理和查询大量信息的自由度.作为微软在西班牙为数不多的 Pow
架构师研究会
2022/03/08
1.6K0
点击加载更多

相似问题

存储在Azure Blob中时缺少列名

18

如何从Azure ADF管道运行azure CLI命令?

123

停止运行Azure Data管道

41

azure ADF管道查询

27

data.table &列名

11
添加站长 进交流群

领取专属 10元无门槛券

AI混元助手 在线答疑

扫码加入开发者社群
关注 腾讯云开发者公众号

洞察 腾讯核心技术

剖析业界实践案例

扫码关注腾讯云开发者公众号
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档
查看详情【社区公告】 技术创作特训营有奖征文