What does this mean? It appears to be keeping the wizard from running the
distributor setup on the server.
Code used is:
use master go
sp_adddistributor @.distributor = @.@.servername GO
sp_adddistributiondb @.database='distribution' GO
Error is:
Server: Msg 14113, Level 16, State 1, Procedure sp_adddistributiondb, Line 304
Could not execute 'copy "d:\Program Files\Microsoft SQL
Server\MSSQL\DATA\DISTMDL.MDF" "d:\Program Files\Microsoft SQL
Server\MSSQL\DATA\distribution.MDF"'. Check 'instdist.out' in the install
directory.
Regards,
Jamie
What does 'instdist.out say?
You can also issue this command
sp_adddistributiondb 'distributionNew',@.data_folder='c:\temp,
@.data_file='distribution.mdf',
@.log_folder='ctemp', @.log_file='distribution.ldf',
@.log_file_size=5,@.create_mode=1
where c:\temp already exists
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"thejamie" <thejamie@.discussions.microsoft.com> wrote in message
news:B7FBF6B2-F8D0-40C6-9844-A21E386C991E@.microsoft.com...
> What does this mean? It appears to be keeping the wizard from running the
> distributor setup on the server.
> Code used is:
> use master go
> sp_adddistributor @.distributor = @.@.servername GO
> sp_adddistributiondb @.database='distribution' GO
> Error is:
> Server: Msg 14113, Level 16, State 1, Procedure sp_adddistributiondb, Line
> 304
> Could not execute 'copy "d:\Program Files\Microsoft SQL
> Server\MSSQL\DATA\DISTMDL.MDF" "d:\Program Files\Microsoft SQL
> Server\MSSQL\DATA\distribution.MDF"'. Check 'instdist.out' in the install
> directory.
>
> --
> Regards,
> Jamie
|||Unfortunately, it does not exist on the server.
Regards,
Jamie
"Hilary Cotter" wrote:
> What does 'instdist.out say?
> You can also issue this command
> sp_adddistributiondb 'distributionNew',@.data_folder='c:\temp,
> @.data_file='distribution.mdf',
> @.log_folder='ctemp', @.log_file='distribution.ldf',
> @.log_file_size=5,@.create_mode=1
> where c:\temp already exists
>
> --
> Hilary Cotter
> Director of Text Mining and Database Strategy
> RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
> This posting is my own and doesn't necessarily represent RelevantNoise's
> positions, strategies or opinions.
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
>
> "thejamie" <thejamie@.discussions.microsoft.com> wrote in message
> news:B7FBF6B2-F8D0-40C6-9844-A21E386C991E@.microsoft.com...
>
>
|||Let's try again... the last post appears blank on my screen.
Hilary,
We have searched the server hoping to find this file. The file does not
exist on the server so I don't know what it says. Thus my question - any
idea what it may mean?
Regards,
Jamie
"Hilary Cotter" wrote:
> What does 'instdist.out say?
> You can also issue this command
> sp_adddistributiondb 'distributionNew',@.data_folder='c:\temp,
> @.data_file='distribution.mdf',
> @.log_folder='ctemp', @.log_file='distribution.ldf',
> @.log_file_size=5,@.create_mode=1
> where c:\temp already exists
>
> --
> Hilary Cotter
> Director of Text Mining and Database Strategy
> RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
> This posting is my own and doesn't necessarily represent RelevantNoise's
> positions, strategies or opinions.
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
>
> "thejamie" <thejamie@.discussions.microsoft.com> wrote in message
> news:B7FBF6B2-F8D0-40C6-9844-A21E386C991E@.microsoft.com...
>
>
|||There is a script called instdist.sql which is run. Any errors are logged to
a file called instdist.out. Somehow you are having a problem running this
script.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"thejamie" <thejamie@.discussions.microsoft.com> wrote in message
news:225ACF20-532F-41E5-A1AB-C0FFB3EF6B35@.microsoft.com...[vbcol=seagreen]
> Let's try again... the last post appears blank on my screen.
> Hilary,
> We have searched the server hoping to find this file. The file does not
> exist on the server so I don't know what it says. Thus my question - any
> idea what it may mean?
> --
> Regards,
> Jamie
>
> "Hilary Cotter" wrote:
|||Someone deleted one of the folders that SQL Server installs. We reinstalled
SQL and voila, the file is there now.
Regards,
Jamie
"Hilary Cotter" wrote:
> There is a script called instdist.sql which is run. Any errors are logged to
> a file called instdist.out. Somehow you are having a problem running this
> script.
> --
> Hilary Cotter
> Director of Text Mining and Database Strategy
> RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
> This posting is my own and doesn't necessarily represent RelevantNoise's
> positions, strategies or opinions.
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
>
> "thejamie" <thejamie@.discussions.microsoft.com> wrote in message
> news:225ACF20-532F-41E5-A1AB-C0FFB3EF6B35@.microsoft.com...
>
>
Showing posts with label directory. Show all posts
Showing posts with label directory. Show all posts
Sunday, March 25, 2012
Sunday, February 12, 2012
Char to Base64 conversion
Hello. Anyone know a way to convert a char string into
BASE64? I'm loading some data to Active Directory from
SQL Server using an LDIF script and since there are
carriage returns imbedded, I BELEIVE the only way to do
this is BASE64 encoding. We wrote a function that loops
thru every character and converts it, but when doing a
large select, that encoding function takes too long for
each row.
INPUT CHAR STRING = "Hello World"
OUTPUT BASE64 STRING = "SGVsbG8gV29ybGQ="
Any ideas or hidden functions that do this conversion in
SQL Server? THanks, BruceCheckout the "FOR XML, BINARY BASE64" of the Select statement and see if it
helps you!
"Bruce de Freitas" <bruce@.defreitas.com> wrote in message
news:427201c49029$2a59bec0$a301280a@.phx.gbl...
> Hello. Anyone know a way to convert a char string into
> BASE64? I'm loading some data to Active Directory from
> SQL Server using an LDIF script and since there are
> carriage returns imbedded, I BELEIVE the only way to do
> this is BASE64 encoding. We wrote a function that loops
> thru every character and converts it, but when doing a
> large select, that encoding function takes too long for
> each row.
> INPUT CHAR STRING = "Hello World"
> OUTPUT BASE64 STRING = "SGVsbG8gV29ybGQ="
> Any ideas or hidden functions that do this conversion in
> SQL Server? THanks, Bruce|||wow, NICE!!! I've been doing some reading on that, and it
doesn't appear that it will convert a CHAR type field into
BINARY BASE64 but if you do the convert something like
this below, then you get it back as BASE64, very cool!
BUT, I'd like to strip the XML tags off, probably a
command to get it with just the straight BASE64 code?
Thanks a LOT, that was a great help!!
select top 1 convert(varbinary(8000),name) as 'name_binary'
from sysobjects
for XML RAW, BINARY BASE64
Thanks, Bruce
>--Original Message--
>Checkout the "FOR XML, BINARY BASE64" of the Select
statement and see if it
>helps you!
>
>"Bruce de Freitas" <bruce@.defreitas.com> wrote in message
>news:427201c49029$2a59bec0$a301280a@.phx.gbl...
>> Hello. Anyone know a way to convert a char string into
>> BASE64? I'm loading some data to Active Directory from
>> SQL Server using an LDIF script and since there are
>> carriage returns imbedded, I BELEIVE the only way to do
>> this is BASE64 encoding. We wrote a function that loops
>> thru every character and converts it, but when doing a
>> large select, that encoding function takes too long for
>> each row.
>> INPUT CHAR STRING = "Hello World"
>> OUTPUT BASE64 STRING = "SGVsbG8gV29ybGQ="
>> Any ideas or hidden functions that do this conversion in
>> SQL Server? THanks, Bruce
>
>.
>|||Hi Harman, Hi Bruce,
I am currently running into the same problem. I can convert it using the
technique you already mentione, but I can not put it into a variable to
strip off the XML-tags.
Do you have an idea how this could be done?
I tried to select it into a variable (not allowed) and tried to get it tino
a temp-table without success.
Maybe you could be so kind and give me a hint on that ;)
Thanks a lot in advance,
Andreas Bretl
andreas.bretl@.brainlab.com|||Andy, yes, the XML method was sooooooooo close... but no
cigar for the SAME reasons you mentioned! Amazing those
points you found that we did (and a zillion other did
also!). Maybe MS will fix that in the next release...
ANYWAY....... We ended up writing a SQL function, that
went thru the not-so-easy task of converting every
character to BASE64. There may be a better way with the
XML option, but we were ok with the function method for
our purposes. It's also pretty amazing that we have to
jump thru these hoops to stick a carriage return inside
an address block of lines, to send to AD, via an LDIF
script. BASE64 doesn't make for readable code at all,
strange that was needed, but it's working fine after we
figured out all the klooge... Bruce
>--Original Message--
>Hi Harman, Hi Bruce,
>I am currently running into the same problem. I can
convert it using the
>technique you already mentione, but I can not put it
into a variable to
>strip off the XML-tags.
>Do you have an idea how this could be done?
>I tried to select it into a variable (not allowed) and
tried to get it tino
>a temp-table without success.
>Maybe you could be so kind and give me a hint on that ;)
>Thanks a lot in advance,
>Andreas Bretl
>andreas.bretl@.brainlab.com
>
>.
>|||Hi Bruce,
I totally agree, that one was really close at all ;)
I ended up in a COM-DLL I installed on the server where I implemented the
Base64 algo. called via sp_OAMethod.
It works fine but it is strange that such a "simple" thing causes so much
workaround.
Do you think there is a chance to see how you handled it with the SQL
function?
I totally understand if you have to keep it "secret" but I just thought
asking could't harm anybody ;)
Seize the Day
Andy
"Bruce de Freitas" <bruce@.defreitas.com> wrote in message
news:114301c4a5c0$23054bb0$a601280a@.phx.gbl...
> Andy, yes, the XML method was sooooooooo close... but no
> cigar for the SAME reasons you mentioned! Amazing those
> points you found that we did (and a zillion other did
> also!). Maybe MS will fix that in the next release...
> ANYWAY....... We ended up writing a SQL function, that
> went thru the not-so-easy task of converting every
> character to BASE64. There may be a better way with the
> XML option, but we were ok with the function method for
> our purposes. It's also pretty amazing that we have to
> jump thru these hoops to stick a carriage return inside
> an address block of lines, to send to AD, via an LDIF
> script. BASE64 doesn't make for readable code at all,
> strange that was needed, but it's working fine after we
> figured out all the klooge... Bruce
> > >
BASE64? I'm loading some data to Active Directory from
SQL Server using an LDIF script and since there are
carriage returns imbedded, I BELEIVE the only way to do
this is BASE64 encoding. We wrote a function that loops
thru every character and converts it, but when doing a
large select, that encoding function takes too long for
each row.
INPUT CHAR STRING = "Hello World"
OUTPUT BASE64 STRING = "SGVsbG8gV29ybGQ="
Any ideas or hidden functions that do this conversion in
SQL Server? THanks, BruceCheckout the "FOR XML, BINARY BASE64" of the Select statement and see if it
helps you!
"Bruce de Freitas" <bruce@.defreitas.com> wrote in message
news:427201c49029$2a59bec0$a301280a@.phx.gbl...
> Hello. Anyone know a way to convert a char string into
> BASE64? I'm loading some data to Active Directory from
> SQL Server using an LDIF script and since there are
> carriage returns imbedded, I BELEIVE the only way to do
> this is BASE64 encoding. We wrote a function that loops
> thru every character and converts it, but when doing a
> large select, that encoding function takes too long for
> each row.
> INPUT CHAR STRING = "Hello World"
> OUTPUT BASE64 STRING = "SGVsbG8gV29ybGQ="
> Any ideas or hidden functions that do this conversion in
> SQL Server? THanks, Bruce|||wow, NICE!!! I've been doing some reading on that, and it
doesn't appear that it will convert a CHAR type field into
BINARY BASE64 but if you do the convert something like
this below, then you get it back as BASE64, very cool!
BUT, I'd like to strip the XML tags off, probably a
command to get it with just the straight BASE64 code?
Thanks a LOT, that was a great help!!
select top 1 convert(varbinary(8000),name) as 'name_binary'
from sysobjects
for XML RAW, BINARY BASE64
Thanks, Bruce
>--Original Message--
>Checkout the "FOR XML, BINARY BASE64" of the Select
statement and see if it
>helps you!
>
>"Bruce de Freitas" <bruce@.defreitas.com> wrote in message
>news:427201c49029$2a59bec0$a301280a@.phx.gbl...
>> Hello. Anyone know a way to convert a char string into
>> BASE64? I'm loading some data to Active Directory from
>> SQL Server using an LDIF script and since there are
>> carriage returns imbedded, I BELEIVE the only way to do
>> this is BASE64 encoding. We wrote a function that loops
>> thru every character and converts it, but when doing a
>> large select, that encoding function takes too long for
>> each row.
>> INPUT CHAR STRING = "Hello World"
>> OUTPUT BASE64 STRING = "SGVsbG8gV29ybGQ="
>> Any ideas or hidden functions that do this conversion in
>> SQL Server? THanks, Bruce
>
>.
>|||Hi Harman, Hi Bruce,
I am currently running into the same problem. I can convert it using the
technique you already mentione, but I can not put it into a variable to
strip off the XML-tags.
Do you have an idea how this could be done?
I tried to select it into a variable (not allowed) and tried to get it tino
a temp-table without success.
Maybe you could be so kind and give me a hint on that ;)
Thanks a lot in advance,
Andreas Bretl
andreas.bretl@.brainlab.com|||Andy, yes, the XML method was sooooooooo close... but no
cigar for the SAME reasons you mentioned! Amazing those
points you found that we did (and a zillion other did
also!). Maybe MS will fix that in the next release...
ANYWAY....... We ended up writing a SQL function, that
went thru the not-so-easy task of converting every
character to BASE64. There may be a better way with the
XML option, but we were ok with the function method for
our purposes. It's also pretty amazing that we have to
jump thru these hoops to stick a carriage return inside
an address block of lines, to send to AD, via an LDIF
script. BASE64 doesn't make for readable code at all,
strange that was needed, but it's working fine after we
figured out all the klooge... Bruce
>--Original Message--
>Hi Harman, Hi Bruce,
>I am currently running into the same problem. I can
convert it using the
>technique you already mentione, but I can not put it
into a variable to
>strip off the XML-tags.
>Do you have an idea how this could be done?
>I tried to select it into a variable (not allowed) and
tried to get it tino
>a temp-table without success.
>Maybe you could be so kind and give me a hint on that ;)
>Thanks a lot in advance,
>Andreas Bretl
>andreas.bretl@.brainlab.com
>
>.
>|||Hi Bruce,
I totally agree, that one was really close at all ;)
I ended up in a COM-DLL I installed on the server where I implemented the
Base64 algo. called via sp_OAMethod.
It works fine but it is strange that such a "simple" thing causes so much
workaround.
Do you think there is a chance to see how you handled it with the SQL
function?
I totally understand if you have to keep it "secret" but I just thought
asking could't harm anybody ;)
Seize the Day
Andy
"Bruce de Freitas" <bruce@.defreitas.com> wrote in message
news:114301c4a5c0$23054bb0$a601280a@.phx.gbl...
> Andy, yes, the XML method was sooooooooo close... but no
> cigar for the SAME reasons you mentioned! Amazing those
> points you found that we did (and a zillion other did
> also!). Maybe MS will fix that in the next release...
> ANYWAY....... We ended up writing a SQL function, that
> went thru the not-so-easy task of converting every
> character to BASE64. There may be a better way with the
> XML option, but we were ok with the function method for
> our purposes. It's also pretty amazing that we have to
> jump thru these hoops to stick a carriage return inside
> an address block of lines, to send to AD, via an LDIF
> script. BASE64 doesn't make for readable code at all,
> strange that was needed, but it's working fine after we
> figured out all the klooge... Bruce
> > >
Char to Base64 conversion
Hello. Anyone know a way to convert a char string into
BASE64? I'm loading some data to Active Directory from
SQL Server using an LDIF script and since there are
carriage returns imbedded, I BELEIVE the only way to do
this is BASE64 encoding. We wrote a function that loops
thru every character and converts it, but when doing a
large select, that encoding function takes too long for
each row.
INPUT CHAR STRING = "Hello World"
OUTPUT BASE64 STRING = "SGVsbG8gV29ybGQ="
Any ideas or hidden functions that do this conversion in
SQL Server? THanks, BruceCheckout the "FOR XML, BINARY BASE64" of the Select statement and see if it
helps you!
"Bruce de Freitas" <bruce@.defreitas.com> wrote in message
news:427201c49029$2a59bec0$a301280a@.phx.gbl...
> Hello. Anyone know a way to convert a char string into
> BASE64? I'm loading some data to Active Directory from
> SQL Server using an LDIF script and since there are
> carriage returns imbedded, I BELEIVE the only way to do
> this is BASE64 encoding. We wrote a function that loops
> thru every character and converts it, but when doing a
> large select, that encoding function takes too long for
> each row.
> INPUT CHAR STRING = "Hello World"
> OUTPUT BASE64 STRING = "SGVsbG8gV29ybGQ="
> Any ideas or hidden functions that do this conversion in
> SQL Server? THanks, Bruce|||wow, NICE!!! I've been doing some reading on that, and it
doesn't appear that it will convert a CHAR type field into
BINARY BASE64 but if you do the convert something like
this below, then you get it back as BASE64, very cool!
BUT, I'd like to strip the XML tags off, probably a
command to get it with just the straight BASE64 code?
Thanks a LOT, that was a great help!!
select top 1 convert(varbinary(8000),name) as 'name_binary'
from sysobjects
for XML RAW, BINARY BASE64
Thanks, Bruce
>--Original Message--
>Checkout the "FOR XML, BINARY BASE64" of the Select
statement and see if it
>helps you!
>
>"Bruce de Freitas" <bruce@.defreitas.com> wrote in message
>news:427201c49029$2a59bec0$a301280a@.phx.gbl...
>
>.
>|||Hi Harman, Hi Bruce,
I am currently running into the same problem. I can convert it using the
technique you already mentione, but I can not put it into a variable to
strip off the XML-tags.
Do you have an idea how this could be done?
I tried to select it into a variable (not allowed) and tried to get it tino
a temp-table without success.
Maybe you could be so kind and give me a hint on that ;)
Thanks a lot in advance,
Andreas Bretl
andreas.bretl@.brainlab.com|||Andy, yes, the XML method was sooooooooo close... but no
cigar for the SAME reasons you mentioned! Amazing those
points you found that we did (and a zillion other did
also!). Maybe MS will fix that in the next release...
ANYWAY....... We ended up writing a SQL function, that
went thru the not-so-easy task of converting every
character to BASE64. There may be a better way with the
XML option, but we were ok with the function method for
our purposes. It's also pretty amazing that we have to
jump thru these hoops to stick a carriage return inside
an address block of lines, to send to AD, via an LDIF
script. BASE64 doesn't make for readable code at all,
strange that was needed, but it's working fine after we
figured out all the klooge... Bruce
>--Original Message--
>Hi Harman, Hi Bruce,
>I am currently running into the same problem. I can
convert it using the
>technique you already mentione, but I can not put it
into a variable to
>strip off the XML-tags.
>Do you have an idea how this could be done?
>I tried to select it into a variable (not allowed) and
tried to get it tino
>a temp-table without success.
>Maybe you could be so kind and give me a hint on that ;)
>Thanks a lot in advance,
>Andreas Bretl
>andreas.bretl@.brainlab.com
>
>.
>|||Hi Bruce,
I totally agree, that one was really close at all ;)
I ended up in a COM-DLL I installed on the server where I implemented the
Base64 algo. called via sp_OAMethod.
It works fine but it is strange that such a "simple" thing causes so much
workaround.
Do you think there is a chance to see how you handled it with the SQL
function?
I totally understand if you have to keep it "secret" but I just thought
asking could't harm anybody ;)
Seize the Day
Andy
"Bruce de Freitas" <bruce@.defreitas.com> wrote in message
news:114301c4a5c0$23054bb0$a601280a@.phx.gbl...[vbcol=seagreen]
> Andy, yes, the XML method was sooooooooo close... but no
> cigar for the SAME reasons you mentioned! Amazing those
> points you found that we did (and a zillion other did
> also!). Maybe MS will fix that in the next release...
> ANYWAY....... We ended up writing a SQL function, that
> went thru the not-so-easy task of converting every
> character to BASE64. There may be a better way with the
> XML option, but we were ok with the function method for
> our purposes. It's also pretty amazing that we have to
> jump thru these hoops to stick a carriage return inside
> an address block of lines, to send to AD, via an LDIF
> script. BASE64 doesn't make for readable code at all,
> strange that was needed, but it's working fine after we
> figured out all the klooge... Bruce
BASE64? I'm loading some data to Active Directory from
SQL Server using an LDIF script and since there are
carriage returns imbedded, I BELEIVE the only way to do
this is BASE64 encoding. We wrote a function that loops
thru every character and converts it, but when doing a
large select, that encoding function takes too long for
each row.
INPUT CHAR STRING = "Hello World"
OUTPUT BASE64 STRING = "SGVsbG8gV29ybGQ="
Any ideas or hidden functions that do this conversion in
SQL Server? THanks, BruceCheckout the "FOR XML, BINARY BASE64" of the Select statement and see if it
helps you!
"Bruce de Freitas" <bruce@.defreitas.com> wrote in message
news:427201c49029$2a59bec0$a301280a@.phx.gbl...
> Hello. Anyone know a way to convert a char string into
> BASE64? I'm loading some data to Active Directory from
> SQL Server using an LDIF script and since there are
> carriage returns imbedded, I BELEIVE the only way to do
> this is BASE64 encoding. We wrote a function that loops
> thru every character and converts it, but when doing a
> large select, that encoding function takes too long for
> each row.
> INPUT CHAR STRING = "Hello World"
> OUTPUT BASE64 STRING = "SGVsbG8gV29ybGQ="
> Any ideas or hidden functions that do this conversion in
> SQL Server? THanks, Bruce|||wow, NICE!!! I've been doing some reading on that, and it
doesn't appear that it will convert a CHAR type field into
BINARY BASE64 but if you do the convert something like
this below, then you get it back as BASE64, very cool!
BUT, I'd like to strip the XML tags off, probably a
command to get it with just the straight BASE64 code?
Thanks a LOT, that was a great help!!
select top 1 convert(varbinary(8000),name) as 'name_binary'
from sysobjects
for XML RAW, BINARY BASE64
Thanks, Bruce
>--Original Message--
>Checkout the "FOR XML, BINARY BASE64" of the Select
statement and see if it
>helps you!
>
>"Bruce de Freitas" <bruce@.defreitas.com> wrote in message
>news:427201c49029$2a59bec0$a301280a@.phx.gbl...
>
>.
>|||Hi Harman, Hi Bruce,
I am currently running into the same problem. I can convert it using the
technique you already mentione, but I can not put it into a variable to
strip off the XML-tags.
Do you have an idea how this could be done?
I tried to select it into a variable (not allowed) and tried to get it tino
a temp-table without success.
Maybe you could be so kind and give me a hint on that ;)
Thanks a lot in advance,
Andreas Bretl
andreas.bretl@.brainlab.com|||Andy, yes, the XML method was sooooooooo close... but no
cigar for the SAME reasons you mentioned! Amazing those
points you found that we did (and a zillion other did
also!). Maybe MS will fix that in the next release...
ANYWAY....... We ended up writing a SQL function, that
went thru the not-so-easy task of converting every
character to BASE64. There may be a better way with the
XML option, but we were ok with the function method for
our purposes. It's also pretty amazing that we have to
jump thru these hoops to stick a carriage return inside
an address block of lines, to send to AD, via an LDIF
script. BASE64 doesn't make for readable code at all,
strange that was needed, but it's working fine after we
figured out all the klooge... Bruce
>--Original Message--
>Hi Harman, Hi Bruce,
>I am currently running into the same problem. I can
convert it using the
>technique you already mentione, but I can not put it
into a variable to
>strip off the XML-tags.
>Do you have an idea how this could be done?
>I tried to select it into a variable (not allowed) and
tried to get it tino
>a temp-table without success.
>Maybe you could be so kind and give me a hint on that ;)
>Thanks a lot in advance,
>Andreas Bretl
>andreas.bretl@.brainlab.com
>
>.
>|||Hi Bruce,
I totally agree, that one was really close at all ;)
I ended up in a COM-DLL I installed on the server where I implemented the
Base64 algo. called via sp_OAMethod.
It works fine but it is strange that such a "simple" thing causes so much
workaround.
Do you think there is a chance to see how you handled it with the SQL
function?
I totally understand if you have to keep it "secret" but I just thought
asking could't harm anybody ;)
Seize the Day
Andy
"Bruce de Freitas" <bruce@.defreitas.com> wrote in message
news:114301c4a5c0$23054bb0$a601280a@.phx.gbl...[vbcol=seagreen]
> Andy, yes, the XML method was sooooooooo close... but no
> cigar for the SAME reasons you mentioned! Amazing those
> points you found that we did (and a zillion other did
> also!). Maybe MS will fix that in the next release...
> ANYWAY....... We ended up writing a SQL function, that
> went thru the not-so-easy task of converting every
> character to BASE64. There may be a better way with the
> XML option, but we were ok with the function method for
> our purposes. It's also pretty amazing that we have to
> jump thru these hoops to stick a carriage return inside
> an address block of lines, to send to AD, via an LDIF
> script. BASE64 doesn't make for readable code at all,
> strange that was needed, but it's working fine after we
> figured out all the klooge... Bruce
Char to Base64 conversion
Hello. Anyone know a way to convert a char string into
BASE64? I'm loading some data to Active Directory from
SQL Server using an LDIF script and since there are
carriage returns imbedded, I BELEIVE the only way to do
this is BASE64 encoding. We wrote a function that loops
thru every character and converts it, but when doing a
large select, that encoding function takes too long for
each row.
INPUT CHAR STRING = "Hello World"
OUTPUT BASE64 STRING = "SGVsbG8gV29ybGQ="
Any ideas or hidden functions that do this conversion in
SQL Server? THanks, Bruce
Checkout the "FOR XML, BINARY BASE64" of the Select statement and see if it
helps you!
"Bruce de Freitas" <bruce@.defreitas.com> wrote in message
news:427201c49029$2a59bec0$a301280a@.phx.gbl...
> Hello. Anyone know a way to convert a char string into
> BASE64? I'm loading some data to Active Directory from
> SQL Server using an LDIF script and since there are
> carriage returns imbedded, I BELEIVE the only way to do
> this is BASE64 encoding. We wrote a function that loops
> thru every character and converts it, but when doing a
> large select, that encoding function takes too long for
> each row.
> INPUT CHAR STRING = "Hello World"
> OUTPUT BASE64 STRING = "SGVsbG8gV29ybGQ="
> Any ideas or hidden functions that do this conversion in
> SQL Server? THanks, Bruce
|||wow, NICE!!! I've been doing some reading on that, and it
doesn't appear that it will convert a CHAR type field into
BINARY BASE64 but if you do the convert something like
this below, then you get it back as BASE64, very cool!
BUT, I'd like to strip the XML tags off, probably a
command to get it with just the straight BASE64 code?
Thanks a LOT, that was a great help!!
select top 1 convert(varbinary(8000),name) as 'name_binary'
from sysobjects
for XML RAW, BINARY BASE64
Thanks, Bruce
>--Original Message--
>Checkout the "FOR XML, BINARY BASE64" of the Select
statement and see if it
>helps you!
>
>"Bruce de Freitas" <bruce@.defreitas.com> wrote in message
>news:427201c49029$2a59bec0$a301280a@.phx.gbl...
>
>.
>
|||Hi Harman, Hi Bruce,
I am currently running into the same problem. I can convert it using the
technique you already mentione, but I can not put it into a variable to
strip off the XML-tags.
Do you have an idea how this could be done?
I tried to select it into a variable (not allowed) and tried to get it tino
a temp-table without success.
Maybe you could be so kind and give me a hint on that ;)
Thanks a lot in advance,
Andreas Bretl
andreas.bretl@.brainlab.com
|||Andy, yes, the XML method was sooooooooo close... but no
cigar for the SAME reasons you mentioned! Amazing those
points you found that we did (and a zillion other did
also!). Maybe MS will fix that in the next release...
ANYWAY....... We ended up writing a SQL function, that
went thru the not-so-easy task of converting every
character to BASE64. There may be a better way with the
XML option, but we were ok with the function method for
our purposes. It's also pretty amazing that we have to
jump thru these hoops to stick a carriage return inside
an address block of lines, to send to AD, via an LDIF
script. BASE64 doesn't make for readable code at all,
strange that was needed, but it's working fine after we
figured out all the klooge... Bruce
>--Original Message--
>Hi Harman, Hi Bruce,
>I am currently running into the same problem. I can
convert it using the
>technique you already mentione, but I can not put it
into a variable to
>strip off the XML-tags.
>Do you have an idea how this could be done?
>I tried to select it into a variable (not allowed) and
tried to get it tino
>a temp-table without success.
>Maybe you could be so kind and give me a hint on that ;)
>Thanks a lot in advance,
>Andreas Bretl
>andreas.bretl@.brainlab.com
>
>.
>
|||Hi Bruce,
I totally agree, that one was really close at all ;)
I ended up in a COM-DLL I installed on the server where I implemented the
Base64 algo. called via sp_OAMethod.
It works fine but it is strange that such a "simple" thing causes so much
workaround.
Do you think there is a chance to see how you handled it with the SQL
function?
I totally understand if you have to keep it "secret" but I just thought
asking could't harm anybody ;)
Seize the Day
Andy
"Bruce de Freitas" <bruce@.defreitas.com> wrote in message
news:114301c4a5c0$23054bb0$a601280a@.phx.gbl...[vbcol=seagreen]
> Andy, yes, the XML method was sooooooooo close... but no
> cigar for the SAME reasons you mentioned! Amazing those
> points you found that we did (and a zillion other did
> also!). Maybe MS will fix that in the next release...
> ANYWAY....... We ended up writing a SQL function, that
> went thru the not-so-easy task of converting every
> character to BASE64. There may be a better way with the
> XML option, but we were ok with the function method for
> our purposes. It's also pretty amazing that we have to
> jump thru these hoops to stick a carriage return inside
> an address block of lines, to send to AD, via an LDIF
> script. BASE64 doesn't make for readable code at all,
> strange that was needed, but it's working fine after we
> figured out all the klooge... Bruce
BASE64? I'm loading some data to Active Directory from
SQL Server using an LDIF script and since there are
carriage returns imbedded, I BELEIVE the only way to do
this is BASE64 encoding. We wrote a function that loops
thru every character and converts it, but when doing a
large select, that encoding function takes too long for
each row.
INPUT CHAR STRING = "Hello World"
OUTPUT BASE64 STRING = "SGVsbG8gV29ybGQ="
Any ideas or hidden functions that do this conversion in
SQL Server? THanks, Bruce
Checkout the "FOR XML, BINARY BASE64" of the Select statement and see if it
helps you!
"Bruce de Freitas" <bruce@.defreitas.com> wrote in message
news:427201c49029$2a59bec0$a301280a@.phx.gbl...
> Hello. Anyone know a way to convert a char string into
> BASE64? I'm loading some data to Active Directory from
> SQL Server using an LDIF script and since there are
> carriage returns imbedded, I BELEIVE the only way to do
> this is BASE64 encoding. We wrote a function that loops
> thru every character and converts it, but when doing a
> large select, that encoding function takes too long for
> each row.
> INPUT CHAR STRING = "Hello World"
> OUTPUT BASE64 STRING = "SGVsbG8gV29ybGQ="
> Any ideas or hidden functions that do this conversion in
> SQL Server? THanks, Bruce
|||wow, NICE!!! I've been doing some reading on that, and it
doesn't appear that it will convert a CHAR type field into
BINARY BASE64 but if you do the convert something like
this below, then you get it back as BASE64, very cool!
BUT, I'd like to strip the XML tags off, probably a
command to get it with just the straight BASE64 code?
Thanks a LOT, that was a great help!!
select top 1 convert(varbinary(8000),name) as 'name_binary'
from sysobjects
for XML RAW, BINARY BASE64
Thanks, Bruce
>--Original Message--
>Checkout the "FOR XML, BINARY BASE64" of the Select
statement and see if it
>helps you!
>
>"Bruce de Freitas" <bruce@.defreitas.com> wrote in message
>news:427201c49029$2a59bec0$a301280a@.phx.gbl...
>
>.
>
|||Hi Harman, Hi Bruce,
I am currently running into the same problem. I can convert it using the
technique you already mentione, but I can not put it into a variable to
strip off the XML-tags.
Do you have an idea how this could be done?
I tried to select it into a variable (not allowed) and tried to get it tino
a temp-table without success.
Maybe you could be so kind and give me a hint on that ;)
Thanks a lot in advance,
Andreas Bretl
andreas.bretl@.brainlab.com
|||Andy, yes, the XML method was sooooooooo close... but no
cigar for the SAME reasons you mentioned! Amazing those
points you found that we did (and a zillion other did
also!). Maybe MS will fix that in the next release...
ANYWAY....... We ended up writing a SQL function, that
went thru the not-so-easy task of converting every
character to BASE64. There may be a better way with the
XML option, but we were ok with the function method for
our purposes. It's also pretty amazing that we have to
jump thru these hoops to stick a carriage return inside
an address block of lines, to send to AD, via an LDIF
script. BASE64 doesn't make for readable code at all,
strange that was needed, but it's working fine after we
figured out all the klooge... Bruce
>--Original Message--
>Hi Harman, Hi Bruce,
>I am currently running into the same problem. I can
convert it using the
>technique you already mentione, but I can not put it
into a variable to
>strip off the XML-tags.
>Do you have an idea how this could be done?
>I tried to select it into a variable (not allowed) and
tried to get it tino
>a temp-table without success.
>Maybe you could be so kind and give me a hint on that ;)
>Thanks a lot in advance,
>Andreas Bretl
>andreas.bretl@.brainlab.com
>
>.
>
|||Hi Bruce,
I totally agree, that one was really close at all ;)
I ended up in a COM-DLL I installed on the server where I implemented the
Base64 algo. called via sp_OAMethod.
It works fine but it is strange that such a "simple" thing causes so much
workaround.
Do you think there is a chance to see how you handled it with the SQL
function?
I totally understand if you have to keep it "secret" but I just thought
asking could't harm anybody ;)
Seize the Day
Andy
"Bruce de Freitas" <bruce@.defreitas.com> wrote in message
news:114301c4a5c0$23054bb0$a601280a@.phx.gbl...[vbcol=seagreen]
> Andy, yes, the XML method was sooooooooo close... but no
> cigar for the SAME reasons you mentioned! Amazing those
> points you found that we did (and a zillion other did
> also!). Maybe MS will fix that in the next release...
> ANYWAY....... We ended up writing a SQL function, that
> went thru the not-so-easy task of converting every
> character to BASE64. There may be a better way with the
> XML option, but we were ok with the function method for
> our purposes. It's also pretty amazing that we have to
> jump thru these hoops to stick a carriage return inside
> an address block of lines, to send to AD, via an LDIF
> script. BASE64 doesn't make for readable code at all,
> strange that was needed, but it's working fine after we
> figured out all the klooge... Bruce
Friday, February 10, 2012
Chaning login name
There have been some major changes here at work, and in order to keep up we
need to change some of the Group names in Active directory. Will the
changes that are made in Active Directory cascade down into SQL Server?
What is the protocol for this type of change?
Thanks,
DrewNo. On 2005, you can rename a login (to reflect the name change) using ALTER LOGIN.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Drew" <drew.laing@.swvtc.dmhmrsas.virginia.gov> wrote in message
news:OQx$0ftqIHA.5096@.TK2MSFTNGP02.phx.gbl...
> There have been some major changes here at work, and in order to keep up we need to change some of
> the Group names in Active directory. Will the changes that are made in Active Directory cascade
> down into SQL Server? What is the protocol for this type of change?
> Thanks,
> Drew
>|||What is the protocol for SQL Server 2000?
Thanks,
Drew
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:C42BDB9F-51A2-424C-8C25-58B905FB94E4@.microsoft.com...
> No. On 2005, you can rename a login (to reflect the name change) using
> ALTER LOGIN.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Drew" <drew.laing@.swvtc.dmhmrsas.virginia.gov> wrote in message
> news:OQx$0ftqIHA.5096@.TK2MSFTNGP02.phx.gbl...
>> There have been some major changes here at work, and in order to keep up
>> we need to change some of the Group names in Active directory. Will the
>> changes that are made in Active Directory cascade down into SQL Server?
>> What is the protocol for this type of change?
>> Thanks,
>> Drew
>|||You can't change the name for a login in 2000. You'd have to delete and re-create the login...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Drew" <drew.laing@.swvtc.dmhmrsas.virginia.gov> wrote in message
news:%234%233Q7tqIHA.2292@.TK2MSFTNGP03.phx.gbl...
> What is the protocol for SQL Server 2000?
> Thanks,
> Drew
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
> news:C42BDB9F-51A2-424C-8C25-58B905FB94E4@.microsoft.com...
>> No. On 2005, you can rename a login (to reflect the name change) using ALTER LOGIN.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>> "Drew" <drew.laing@.swvtc.dmhmrsas.virginia.gov> wrote in message
>> news:OQx$0ftqIHA.5096@.TK2MSFTNGP02.phx.gbl...
>> There have been some major changes here at work, and in order to keep up we need to change some
>> of the Group names in Active directory. Will the changes that are made in Active Directory
>> cascade down into SQL Server? What is the protocol for this type of change?
>> Thanks,
>> Drew
>>
>
need to change some of the Group names in Active directory. Will the
changes that are made in Active Directory cascade down into SQL Server?
What is the protocol for this type of change?
Thanks,
DrewNo. On 2005, you can rename a login (to reflect the name change) using ALTER LOGIN.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Drew" <drew.laing@.swvtc.dmhmrsas.virginia.gov> wrote in message
news:OQx$0ftqIHA.5096@.TK2MSFTNGP02.phx.gbl...
> There have been some major changes here at work, and in order to keep up we need to change some of
> the Group names in Active directory. Will the changes that are made in Active Directory cascade
> down into SQL Server? What is the protocol for this type of change?
> Thanks,
> Drew
>|||What is the protocol for SQL Server 2000?
Thanks,
Drew
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:C42BDB9F-51A2-424C-8C25-58B905FB94E4@.microsoft.com...
> No. On 2005, you can rename a login (to reflect the name change) using
> ALTER LOGIN.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Drew" <drew.laing@.swvtc.dmhmrsas.virginia.gov> wrote in message
> news:OQx$0ftqIHA.5096@.TK2MSFTNGP02.phx.gbl...
>> There have been some major changes here at work, and in order to keep up
>> we need to change some of the Group names in Active directory. Will the
>> changes that are made in Active Directory cascade down into SQL Server?
>> What is the protocol for this type of change?
>> Thanks,
>> Drew
>|||You can't change the name for a login in 2000. You'd have to delete and re-create the login...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Drew" <drew.laing@.swvtc.dmhmrsas.virginia.gov> wrote in message
news:%234%233Q7tqIHA.2292@.TK2MSFTNGP03.phx.gbl...
> What is the protocol for SQL Server 2000?
> Thanks,
> Drew
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
> news:C42BDB9F-51A2-424C-8C25-58B905FB94E4@.microsoft.com...
>> No. On 2005, you can rename a login (to reflect the name change) using ALTER LOGIN.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>> "Drew" <drew.laing@.swvtc.dmhmrsas.virginia.gov> wrote in message
>> news:OQx$0ftqIHA.5096@.TK2MSFTNGP02.phx.gbl...
>> There have been some major changes here at work, and in order to keep up we need to change some
>> of the Group names in Active directory. Will the changes that are made in Active Directory
>> cascade down into SQL Server? What is the protocol for this type of change?
>> Thanks,
>> Drew
>>
>
Subscribe to:
Posts (Atom)