xtina: (Default)
What I want today is a way to copy data from SQL Server to MySQL.

Production data is kept on the former on server A, and invoicing is kept on the latter on server B.  There's this fifteen-million-step process of exporting the data from SQL Server, using sed to prettify the data, then importing it into MySQL... why not cut all that out?

If I can, of course.

Query!  Is this a sensical thing to do?  I found this...

Originally posted on Dreamwidth.  Number of comments so far:
xtina: (Default)
What I want today is a way to copy data from SQL Server to MySQL.

Production data is kept on the former on server A, and invoicing is kept on the latter on server B.  There's this fifteen-million-step process of exporting the data from SQL Server, using sed to prettify the data, then importing it into MySQL... why not cut all that out?

If I can, of course.

Query!  Is this a sensical thing to do?  I found this...
xtina: (Default)
I want this very much, plaes (sic).

I have a script right now from userscripts.org that lets me hit Ctrl-Enter in phpMyAdmin to submit a SQL query.

Is there any goddamn way at all to have that work as well for F5, when the SQL query textarea has the focus?

I ask because I also use SQL Server here at work, which uses F5 to run its queries, and if I hit F5 in phpMyAdmin and refresh the web page one more time, I'm gonna snap.

Originally posted on Dreamwidth.  Number of comments so far: comment count unavailable
xtina: (Default)
I want this very much, plaes (sic).

I have a script right now from userscripts.org that lets me hit Ctrl-Enter in phpMyAdmin to submit a SQL query.

Is there any goddamn way at all to have that work as well for F5, when the SQL query textarea has the focus?

I ask because I also use SQL Server here at work, which uses F5 to run its queries, and if I hit F5 in phpMyAdmin and refresh the web page one more time, I'm gonna snap.
xtina: "But today, the pattern of lights is *all wrong*!" "Oh god! Try pressing more buttons!" "*It's not helping*!" (tech support)
That whole thing yesterday about the unknown string thing?

Yeah, I forgot to close a single quote, halfway up in the string.

*siiigh*

I'm real bright when I'm frustrated, I tell you what.

Originally posted on Dreamwidth.  Number of comments so far: comment count unavailable
xtina: "But today, the pattern of lights is *all wrong*!" "Oh god! Try pressing more buttons!" "*It's not helping*!" (tech support)
That whole thing yesterday about the unknown string thing?

Yeah, I forgot to close a single quote, halfway up in the string.

*siiigh*

I'm real bright when I'm frustrated, I tell you what.
xtina: (Default)
We migrated the database over from one server to another, and now?  Now, kitties, now I am going to die of frustration.

In phpMyAdmin:

INSERT INTO tbl_table (name, website) VALUES ('Company', 'http://www.google.com');

ERROR: Unknown Punctuation String @ ###
STR: ://


I am full of hate.

What's really getting to me is the part where if I click Insert and manually enter the data that way, it submits fine.  If I copy that code and change it for the next name in the list, it fails.

fjdsklfjdsjfeuyaoi5t7238

Originally posted on Dreamwidth.  Number of comments so far: comment count unavailable
xtina: (Default)
We migrated the database over from one server to another, and now?  Now, kitties, now I am going to die of frustration.

In phpMyAdmin:

INSERT INTO tbl_table (name, website) VALUES ('Company', 'http://www.google.com');

ERROR: Unknown Punctuation String @ ###
STR: ://


I am full of hate.

What's really getting to me is the part where if I click Insert and manually enter the data that way, it submits fine.  If I copy that code and change it for the next name in the list, it fails.

fjdsklfjdsjfeuyaoi5t7238
xtina: (Default)
Stupid question time.

PHP/MySQL.  I have this line:

mysql_query("INSERT IGNORE INTO table SELECT * FROM othertbl") or die(mysql_error());

When I run this elsewhere (phpMyAdmin, command line, mysql prompt), I get an indication of how many rows were changed.

How can I capture that in PHP, for writing to elsewhere?

Originally posted on Dreamwidth.  Number of comments so far: comment count unavailable
xtina: (Default)
Stupid question time.

PHP/MySQL.  I have this line:

mysql_query("INSERT IGNORE INTO table SELECT * FROM othertbl") or die(mysql_error());

When I run this elsewhere (phpMyAdmin, command line, mysql prompt), I get an indication of how many rows were changed.

How can I capture that in PHP, for writing to elsewhere?
xtina: (Default)
A fuller thing from yesterday's post re PHP/MySQL.

The steps, laid out. )

So, it's probably that the data's being exported from type bit to type boolean for some daft reason, and MySQL is all like, "I'm taking in tinyint, what's this boolean bullshit?", and setting it to 0, because that's the default value.

It's still bloody annoying that command line works but PHP doesn't, on the same file.

Oh well.  I put cast(the_column as int) as the_column in the query for the package; that should help.

--

[eta] Except that didn't change a goddamn thing.  Motherfuck.  FINE.  LINE BY LINE IT IS, ASSHOLES.

Originally posted on Dreamwidth.  Number of comments so far: comment count unavailable
xtina: (Default)
A fuller thing from yesterday's post re PHP/MySQL.

The steps, laid out. )

So, it's probably that the data's being exported from type bit to type boolean for some daft reason, and MySQL is all like, "I'm taking in tinyint, what's this boolean bullshit?", and setting it to 0, because that's the default value.

It's still bloody annoying that command line works but PHP doesn't, on the same file.

Oh well.  I put cast(the_column as int) as the_column in the query for the package; that should help.

--

[eta] Except that didn't change a goddamn thing.  Motherfuck.  FINE.  LINE BY LINE IT IS, ASSHOLES.
xtina: (Default)
PHP/MySQL question.

There is a tab-separated file that contains, among other things, true/false values.

I run this from the command line:

mysqlimport -v --fields-terminated-by='\t' --fields-optionally-enclosed-by="'" --lines-terminated-by='\n' --user=user --password=password dbname filename.csv

The true/false values are updated fine.

I do the exact same damn thing from PHP, and all true/false columns are set to false.

What gives?

[eta] Same if I run this in PHP:

mysql_query("LOAD DATA INFILE '$file' INTO TABLE table_name FIELDS TERMINATED BY '\t' ENCLOSED BY \"'\" LINES TERMINATED BY '\n'");

WRYYYYYYYy

Originally posted on Dreamwidth.  Number of comments so far: comment count unavailable
xtina: (Default)
PHP/MySQL question.

There is a tab-separated file that contains, among other things, true/false values.

I run this from the command line:

mysqlimport -v --fields-terminated-by='\t' --fields-optionally-enclosed-by="'" --lines-terminated-by='\n' --user=user --password=password dbname filename.csv

The true/false values are updated fine.

I do the exact same damn thing from PHP, and all true/false columns are set to false.

What gives?

[eta] Same if I run this in PHP:

mysql_query("LOAD DATA INFILE '$file' INTO TABLE table_name FIELDS TERMINATED BY '\t' ENCLOSED BY \"'\" LINES TERMINATED BY '\n'");

WRYYYYYYYy
xtina: (Default)
Riddle me this, network/DBA folk.

* We have three servers that hold the production data.  They are on NewNetwork.  The rest of the computers here are on OldNetwork.

* I can use Remote Desktop to get to MainServer, which is on OldNetwork.  It can talk to the three servers.  As in, I can use SQL Server to connect to each of the three servers to access their databases.

(This is really really good, as using VNC to use Remote Desktop to each of the three servers bugs the flying crap outta me.)

* MainServer is using SQL Server 2008 R2.  The server itself is Windows 2008 Server R2.

* The second invoicing system is stored on a Linux box, on OldNetwork.  cat /proc/version gives me: Linux version 2.6.12-2.3.legacy_FC3 (mockbuild@petra.fedoralegacy.org) (gcc version 3.4.4 20050721 (Red Hat 3.4.4-2)) #1 Sun Feb 19 07:48:10 EST 2006

* It is running MySQL 3.23.58, for reasons that utterly frustrate me, but I can't change that at this time.


I want to set something up on the Linux box to get the data from the three data servers into the MySQL db, programmatically.

Can I?

If so, how?

Originally posted on Dreamwidth.
xtina: (Default)
Riddle me this, network/DBA folk.

* We have three servers that hold the production data.  They are on NewNetwork.  The rest of the computers here are on OldNetwork.

* I can use Remote Desktop to get to MainServer, which is on OldNetwork.  It can talk to the three servers.  As in, I can use SQL Server to connect to each of the three servers to access their databases.

(This is really really good, as using VNC to use Remote Desktop to each of the three servers bugs the flying crap outta me.)

* MainServer is using SQL Server 2008 R2.  The server itself is Windows 2008 Server R2.

* The second invoicing system is stored on a Linux box, on OldNetwork.  cat /proc/version gives me: Linux version 2.6.12-2.3.legacy_FC3 (mockbuild@petra.fedoralegacy.org) (gcc version 3.4.4 20050721 (Red Hat 3.4.4-2)) #1 Sun Feb 19 07:48:10 EST 2006

* It is running MySQL 3.23.58, for reasons that utterly frustrate me, but I can't change that at this time.


I want to set something up on the Linux box to get the data from the three data servers into the MySQL db, programmatically.

Can I?

If so, how?
xtina: (Default)
I'm always late to the party.

EOL of MySQL Query Browser, MySQL Administrator, MySQL Migration Toolkit

They're moving over to MySQL Workbench.  Here's a screenshot of the home page.
xtina: (Default)
I'm always late to the party.

EOL of MySQL Query Browser, MySQL Administrator, MySQL Migration Toolkit

They're moving over to MySQL Workbench.  Here's a screenshot of the home page.
xtina: (Default)
- Vista 64-bit.
- Excel 2007.
- MyODBC 3.51.  (We're using MySQL 3.23.)

Steps:

- Go to Data Sources (ODBC) and add a user data source to connect to the db.
- Test the connection - it works.
- In Excel, go to the Data section, and click From Other Sources.
- Choose From Data Connection Wizard.
- ODBS DSN, next.

Suck:

No matter what I select, clicking Next gives me nothing.  No delay, no display, no closing windows, no hanging, nothing.  This isn't just MySQL (though I listed it to be thorough) - no option does anything.

What &$(# gives?
xtina: (Default)
- Vista 64-bit.
- Excel 2007.
- MyODBC 3.51.  (We're using MySQL 3.23.)

Steps:

- Go to Data Sources (ODBC) and add a user data source to connect to the db.
- Test the connection - it works.
- In Excel, go to the Data section, and click From Other Sources.
- Choose From Data Connection Wizard.
- ODBS DSN, next.

Suck:

No matter what I select, clicking Next gives me nothing.  No delay, no display, no closing windows, no hanging, nothing.  This isn't just MySQL (though I listed it to be thorough) - no option does anything.

What &$(# gives?

May 2017

S M T W T F S
 12 3456
78910111213
14151617181920
21222324252627
28293031   

Most Popular Tags

Style Credit

Page generated 2017-05-25 05:13
Powered by Dreamwidth Studios