SQL Migration Assistant for MySQL - mysql

I want to convert my MySQL database to SQL Server, so that I can migrate my website into Azure.
I have two problems:
I downloaded SQL Server Migration Assistant for MySQL. I expect to see a "Connect to SQL Server" button, but there is only a "Connect to SQL Azure" button instead.
"OK" I said. "Why not convert it directly into Azure?" So I created an Azure account, and a SQL database in it. But when I tried to connect the MySQLToSQL to SQL Azure, it asks for user name, so I put my account email, "xyz#hotmail.com". It complained that "Cannot open server hotmail.com requested by the login". If I use "xyz", it complains "incorrect user name or password."
So what is my user name and password? I am totally new to Azure.

When you create a new project you specify the target database version in the Migrate To dropdown box. The default is SQL Azure. I suspect you didn't check the dropdown and created a project with the default value.
If you select another version, eg SQL Server 2016 or SQL Server 2014 you'll be able to use the Connect to SQL Server button.

Related

Why am I getting a Connection Error When Trying to Create a New SQL Server Database?

In Visual Studio's Server Explorer, I right-clicked Data Connections and selected Create New SQL Server Database.
In the same-named dialog that is then invoked, I entered a ServerName, a New Database Name, accepted the default of Windows authorization, but get this:
I'm pretty sure I installed MS SQL Server when I installed VS (2019). What is causing this error and what do I need to do to fix it?
Am I not allowed to create a Server Name and must use a specific one? If so, what?
UPDATE
I'm also getting problems now with MySql. I recently created MySql Databases (they are displaying on the left -- "movies" and "statesdb" and I've got connections to them, as indicated by the green connector icon), but now trying to create a new Database also fails (after I hit the "Test Connection" button):
UPDATE 2
I still get the same exact err msg after installing SQL Server Express.
And that's even though I do have a bunch of SQLExpress services running now (the only non-new one is the last one):
Do I need to use SQL Server Authentication instead of Windows?
To see if you have sql server installed and it’s running, you can open services.msc and look for SQL Server. The name in between the brackets is the instance name, I.e.: SQLEXPRESS.
To connect to a localhost instance you simply do .\instancename or for SQLEXPRESS: .\SQLEXPRESS

How to connect azure with SQL manager

How do I connect Azure with SQL management if I want to link my database with azure
Connecting to SQL Azure with SQL Management Studio
Steps to Connect SQL Management Studio to SQL Azure
Authenticate to the Azure Portal
Click on SQL Databases
Click on Servers
Click on the name of the Server you wish to connect to…
Click on Configure…
If not already in place, click on ‘Add to the allowed IP addresses’ to add your current IP address (or specify an address you wish to connect from) and click ‘Save’
Open SQL Management Studio and connect to Database services (usually comes up by default)
Enter the fully qualified server name (.database.windows.net)
Change to SQL Server Authentication
Enter the login preferred (if a new database, the username you specified when yuo created the DB server)
Enter the correct password
Hit the Connect button
First consider to add the current IP address of your computer to Azure SQL Database firewall as explained on this official documentation.
Now get the connection information you need to connect to the Azure SQL database. You'll need the fully qualified server name or host name, database name, and login information for the upcoming procedures.
Sign in to the Azure portal.
Navigate to the SQL databases or SQL managed instances page.
On the Overview page, review the fully qualified server name next to Server name for a single database or the fully qualified server name next to Host for a managed instance. To copy the server name or host name, hover over it and select the Copy icon.
After creating the firewall rule and get the server information, the steps to connect to an Azure SQL Database are the following:
1.Open SSMS. The Connect to Server dialog box appears.
2.Enter the server information as shown in the following image:
3.Select Options in the Connect to Server dialog box. In the Connect to database drop-down menu, select your database.
4.Select Connect. The Object Explorer window opens.
5.To view the database's objects, expand Databases and then expand your database.
For a detailed step-by-step tutorial please read this documentation.

SQL Server 2008 Express server information

I installed a company specific program which can connect to a SQL Server. I installed SQL Server 2008 Express with mixed authentication. I called the instance SQLExpress.
What I want to do is to create a new database via the program. (see image). In point 5 I tried many logins like sa-login, MyComputerName\User-Password, User-Pass, but nothing works. In point 6 I used for the server name SQLExpress or MyComputerName\SQLExpress and for the (new) database name I used MyDB, but same thing here. Can't connect.
It keeps saying:
cannot create database master.MyDB. SQL Server doesn't exist or access denied.
Can anyone help me please?
Image: http://imageshack.us/photo/my-images/248/sqlserverinfo.png/
Thx
I figured it out.
I've created a user in SQL Server and added him to the "sysadmin"
role and gave him access to the "master" database.
After that I added an inbound rule (allow port 1433) to my Windows Firewall to allow remote connections to the SQL Server.
See http://msdn.microsoft.com/en-us/library/ms175043.aspx

ASP can't connect to SQL Server database

I'm trying to get a classic ASP application to connect to a local SQL Server 2008 database. The app and database were built by someone else. I'm just trying to get them installed and running on my machine (Windows 7).
I'm getting the following error when when the ASP app tries to connect to the database:
Could not connect to database:
Error Number: -2147467259
Error Message: [ConnectionOpen (Connect()).] does not exist or access denied.
I don't see any messages in the Windows Event Viewer. I'm looking at: Event Viewer->Windows Logs->Application.
It's a fresh database install using a simple restore. The SQL Server install uses the default instance. SQL Server and Windows authentication are both allowed. I left the existing connection string (in the ASP code) in tact and just tried adding that to my SQL Server installation. Here's the connection string:
strConn = "PROVIDER=SQLOLEDB;SERVER=localhost;UID=TheUser;PWD=ThePassword;DATABASE=TheDatabase;"
To add that user to SQL Server, I went to Security/Logins in SSMS and added the user and the password. I selected the database in question as the Default database. I thought that might do the trick, but it didn't. Then, I went into TheDatabase, then went into Security there. I added a new user there, referencing the new user I had already added in server Security. Under Owned Schemas, I clicked db_owner and under Role Members I checked db_accessadmin and db_owner. None of this gave the ASP application access to the database. The sid values match in sys.database_principals and sys.server_principals for the login in question. I am able to login to SSMS using this login.
The app needs to execute selects against the database like this:
oConn.Execute('select * from someTable')
I'm not a DBA and am sort of grasping at straws here. How do I get this thing connected?
Thanks,
Jay
It occurred to me that SQL Server or the website in IIS might be running as users with the wrong permissions. Based on what I read, it's okay for SQL Server to be running as Local System, so I left that alone.
In IIS, my website was using "Application user (pass-through authentication)". This is set in the Basic Settings->Connect As ("Edit Site" dialog box). When I clicked "Test Settings...", next to Authorization it said "Cannot verify access to path (c:\mywebsitepath)." I increased access permissions on that directory, but that didn't help. In the "Connect As" dialog box, I then changed "Path credentials" to use "Specific user" instead of "Application user (pass-through authentication)". I set it to use the user that I log in to my machine as. After that, when I click the "Test Settings..." button, next to "Authorization" it says "Path is accessible (c:\mywebsitepath)." After that, the ASP website is able to connect to SQL Server just fine.
Since the connection string was using a specific SQL Server username and password, I'm not exactly sure why this fixed the problem, but it seems to have.

SQL Server 2000 creating a linked server to SQL Server 2008

In SQL Server 2000, I'm trying to create a linked server to SQL Server 2008. Everything I've tried raises errors of one flavor or another.
In SQL Server 2000 Enterprise Manager, I:
Right-click Linked Servers under the server's Security node, then choose New Linked Server... and name the link "SQL2008R2"
I choose the "Other data source" radio button because I don't think SQL Server 2000 can natively connect to 2008.
I choose "SQL Server Native Client 10.0" in the Provider name field, type "SQL2008R2" in the Product name field, enter "VIRTUALXP-62910\SQLEXPRESS" (Servername and named instance name) in the Data source field, leave Provider string blank, and type the database name "RWUtils" in the Catalog field.
On the security tab, I type "Link" as the local login and as the Remote user, and enter the password. I choose the "Not be made" radio button for logins not listed above. I previously set up a "Link" user on both servers, with the same password, with access to the right databases.
I click OK to create the link. The SQL2008R2 link is created.
When I expand the link I just created and click on Tables, I get the error,
Error 7416: Access to the remote
server is denied because no
login-mapping exists.
Can anyone tell me what I'm doing wrong or what the correct sequence of steps or T-SQL is to create this link successfully?
Thanks much.
I just did this for the first time (after seeing your question) and it worked - going from SQL 2000 Standard 32-bit (default instance) to a named instance on SQL 2008 R2 64-bit.
Using similar steps to what you have above:
fine
choose "SQL Server" as the Server Type, enter servername\instance
not applicable
I chose "Be made using this security context", and entered in my new SQL Standard Account that exists on the target server only (2008 R2).
I tested with a query and it worked. Be sure new SQL Standard user has access to the database and table. Query should look like: select * from [linkedservername\instance].[database].[dbo].[table]
Other notes: I took the defaults on the Server Options tab, which are "Data Access", "RPC", and "RPC Out" all checked.
The other direction: I previously had it working the other direction from SQL 2008 R2 linked server to SQL 2000. That required this: http://blog.raffaeu.com/archive/2008/06/19/sql-2005-and-linked-server-cannot-obtain-the-schema-rowset.aspx.
I have use this steps and configuration options:
SqlServerEnterpriseManager\Security\Linked Servers\New Linked Server
General:
Linked server: mylinkedservername
Provider name: Microsoft OLE DB Prvider for SQL Server
Product name:
Data Source: (my server name)
Provider string:
Location:
Catalog:
Security:
Be made using this security context:
Remote login: (my sql remote user. I use sa for the test)
With password: (my remote password)
Server Options:
DataAccess: checked
RPC: checked
RPC Out: checked
Use Remote Collation: checked
Qry used in the test:
select * from [linkedservername].[database].dbo.[table]