Showing posts with label file. Show all posts
Showing posts with label file. Show all posts

Thursday, 22 March 2012

Connect to MSDE file on ISP Server

Are there any articles about connecting a MDB or ADP front-end to a MSDE
database that is located on our ISP's server? When I try to Google the
subject, I get a bazillion hits but non really apply to WAN connections.
Any help or pointers would be appreciated
Paul P
There is nothing special to do when connecting to MSDE over the WAN, all you
have to do is to use the connection parameters given to you by your ISP; the
only condition being that the port 1433 has not been blocked. (Because of
security concerns, more and more ISP are blocking the port 1433 at the
firewall level.)
If you want to have more details for the connection string:
http://www.able-consulting.com/ADO_Conn.htm
http://www.connectionstrings.com/
I suggest that you ask your ISP about this.
S. L.
"Paul Proefrock" <proefrock@.sbcglobal.net> wrote in message
news:OXISVonAFHA.904@.TK2MSFTNGP12.phx.gbl...
> Are there any articles about connecting a MDB or ADP front-end to a MSDE
> database that is located on our ISP's server? When I try to Google the
> subject, I get a bazillion hits but non really apply to WAN connections.
> Any help or pointers would be appreciated
> Paul P
>
|||Hi Sylvain,
I can't connect to MSDE on my ISP also. I just called them (my ISP) and
they informed me that port 1433 was not blocked. I know that the TCP/IP is
enabled on the MSDE and sql server logins are allowed. When I try to
register the msde from my local enterprise manager I can't. Is there
anything else that may cause it to fail that you are aware of? Oh - is there
a way to remotely check to see if 1433 is blocked just in case I was given
bad info?
Thanks in advance, Mike
"Sylvain Lafontaine" wrote:

> There is nothing special to do when connecting to MSDE over the WAN, all you
> have to do is to use the connection parameters given to you by your ISP; the
> only condition being that the port 1433 has not been blocked. (Because of
> security concerns, more and more ISP are blocking the port 1433 at the
> firewall level.)
> If you want to have more details for the connection string:
> http://www.able-consulting.com/ADO_Conn.htm
> http://www.connectionstrings.com/
> I suggest that you ask your ISP about this.
> S. L.
> "Paul Proefrock" <proefrock@.sbcglobal.net> wrote in message
> news:OXISVonAFHA.904@.TK2MSFTNGP12.phx.gbl...
>
>
|||You may try to add the port 1433 after the TCP/IP address (separated by a
comma) and also specify that you want to use the TCP/IP protocol by
explicitely mentionning the DBMSSOCN network library; something like:
Provider=sqloledb;Data Source=190.190.200.100,1433;Network
Library=DBMSSOCN;Initial Catalog=pubs;User ID=sa;Password=asdasd
The Network library was mandatory on Win98, if I remember correctly, but
shouldn't be necessary with WinXP. Also, make sure that you have the latest
service pack applied, as well as MDAC 2.8 (won't hurt). Don't forget to
check for a firewall on your own side.
You can try to ping the remote address on the port 1433. Often, the address
of the SQL-Server is not the same as the address of the web site; because it
is located on another machine than the web server.
Beside that, I don't know.
S. L.
"Michael McTaggart" <Michael McTaggart@.discussions.microsoft.com> wrote in
message news:BC06CED5-780A-4B21-8D40-1C2332D796F6@.microsoft.com...[vbcol=seagreen]
> Hi Sylvain,
> I can't connect to MSDE on my ISP also. I just called them (my ISP) and
> they informed me that port 1433 was not blocked. I know that the TCP/IP
> is
> enabled on the MSDE and sql server logins are allowed. When I try to
> register the msde from my local enterprise manager I can't. Is there
> anything else that may cause it to fail that you are aware of? Oh - is
> there
> a way to remotely check to see if 1433 is blocked just in case I was given
> bad info?
> Thanks in advance, Mike
>
> "Sylvain Lafontaine" wrote:

connect to MDF file without having SQL Server 2005 Express installed

All --

Please help.

Is it possible to connect to MDF file without having SQL Server 2005 Express installed on the machine?

That is-- can one connect directly to an MDF in the same way and Access MDB file can be used?

If no, then is there any way around this?

If yes, then are there any limitations?

Please advise.

Thank you.

-- Mark Kamoski

No, it's not possible. However, you can try Sql Compact

http://www.microsoft.com/sql/editions/compact/default.mspx

Tuesday, 20 March 2012

Connect to a SQL Server database file

Hi,

I am a beginner on using SQL Server Express. I have two different questions. Here is the first:

I've developed a simple C# application in Visual Studio 2005 that connects to a SQL Server database file. In the application I connect to the database using this connection string:

@."Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Databases\mydatabas.mdf ;Integrated Security=True;Connect Timeout=30;User Instance=True";

and It works perfect.

But when I move the database file(and the corresponding log-file) to another computer it fails. I've changed the connection string to this

@."Data Source=.\SQLEXPRESS;AttachDbFilename=\\myserver\Databases\mydatabase.mdf ;Integrated Security=True;Connect Timeout=30;User Instance=True";

This is the error message I get when I try to open the database

The file \\myserver\Databases\myDatabase.mdf is on a network path that is not supported for database files.An attempt to attach an auto-named database for file \\myServer\Databases\myDatabase.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

Both computer runs Windows XP SP2.

My second question is:

When I deployed my solution to my production PC(witch also runs Windows XP SP2, .NET Framwork 2.0 is installed on the computer) .When I then tried to run the application I did get this error message

An error has occured when establishing a connection to the server. When connection to a SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remomte conections.....

Appearently I cant treat SQL Server database files in the same way as Access-files, or?

Jan Olsson

To use the database on a different machine, SQLExpress would need to be installed on that machine (\\myserver) and the database attached there. Then you would connect to that SQL Server from your local machine. Use the "SQL Server Configuration Manager" to enable network connectivity. The AttachDBFilename really is only intended for local machine use.

SQL Server uses a client/server paradigm and you cannot treat SQL Server database files the same way as Access files.

|||

In Access the runtime is in the database files SQL Server is RDBMS(relational database management systems) the runtime is in the server, there is a fixed location for the data files MDF and LDF log data files. They are located in the following location in your c drive, if you intend to use another location you must let SQL Server by code before creating the database. Hope this helps.

C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data

|||

Thanks, for your good answer.

/Jan O.

|||

Thanks Peter, I have installed SQL Server Express on my remote computer and attached my database file to SQL Server. it works properly. But how shall I connect to the database from my local machine? I tried to connect from Server Explorer in Visual Studio but it didn't work. I got the message "Login failed for user \\myserver\Guest" and if I want to connect from my C# application how shall the connection string look like.

Jan Olsson

Monday, 19 March 2012

Connect to .mdb Database in Crystal Report 9 from VB

Hi,

Some one Pls tell me How to connect to a .mdb file from Visual Basic

Am using Crystal Report 9.

I have created a CRAXDRT. Application and Report and I have opened the Report.

How should I pass the database name (.mdb) after this..

I want to add App.Path also when I connect to the database

Thanks
PremodDim CrxRep As New CRAXDDRT.report
Dim CrxApp As New CRAXDDRT.Application
Dim CrxDataFiles As CRAXDDRT.DatabaseTables

strDBPath = "Path to DB Goes Here"

Set CrxRep = CrxApp.OpenReport(App.Path & "\CrystalRpt\BPOilAnalysis.rpt", 1)
Set CrxDataFiles = CrxRep.Database.Tables
CrxDataFiles(1).SetLogOnInfo (strDBPath)

I used this code since my DB path can change and wanted it to remain versatile to the user.

Hope this helps! Tricia =)

Sunday, 11 March 2012

Connect from SQL server to Excel file

Is it possible to connect from SQL server directly to .xls file ?
I imagine someting like opening .xls file in Query Analyzer to perform slect
into
You can use a linked server. Take a look at this topic from Books Online
"sp_addlinkedserver"
http://msdn.microsoft.com/library/de..._adda_8gqa.asp
Cristian Lefter, SQL Server MVP
MCT, MCSA, MCDBA, MCAD, MCSD .NET
"Mikus" <Mikus@.discussions.microsoft.com> wrote in message
news:CFDDF854-1800-4B8A-ABBA-3AE7BAB55E32@.microsoft.com...
> Is it possible to connect from SQL server directly to .xls file ?
> I imagine someting like opening .xls file in Query Analyzer to perform
> slect
> into
|||In addition to using a Linked Server as Cristian suggested, you can also use
the OPENQUERY command.
--Brian
(Please reply to the newsgroups only.)
"Cristian Lefter" <nospam_CristianLefter@.hotmail.com> wrote in message
news:eeETVNHsFHA.1172@.TK2MSFTNGP11.phx.gbl...
> You can use a linked server. Take a look at this topic from Books Online
> "sp_addlinkedserver"
> http://msdn.microsoft.com/library/de..._adda_8gqa.asp
> Cristian Lefter, SQL Server MVP
> MCT, MCSA, MCDBA, MCAD, MCSD .NET
> "Mikus" <Mikus@.discussions.microsoft.com> wrote in message
> news:CFDDF854-1800-4B8A-ABBA-3AE7BAB55E32@.microsoft.com...
>

Connect from SQL server to Excel file

Is it possible to connect from SQL server directly to .xls file ?
I imagine someting like opening .xls file in Query Analyzer to perform slect
into :)You can use a linked server. Take a look at this topic from Books Online
"sp_addlinkedserver"
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_sp_adda_8gqa.asp
Cristian Lefter, SQL Server MVP
MCT, MCSA, MCDBA, MCAD, MCSD .NET
"Mikus" <Mikus@.discussions.microsoft.com> wrote in message
news:CFDDF854-1800-4B8A-ABBA-3AE7BAB55E32@.microsoft.com...
> Is it possible to connect from SQL server directly to .xls file ?
> I imagine someting like opening .xls file in Query Analyzer to perform
> slect
> into :)|||In addition to using a Linked Server as Cristian suggested, you can also use
the OPENQUERY command.
--
--Brian
(Please reply to the newsgroups only.)
"Cristian Lefter" <nospam_CristianLefter@.hotmail.com> wrote in message
news:eeETVNHsFHA.1172@.TK2MSFTNGP11.phx.gbl...
> You can use a linked server. Take a look at this topic from Books Online
> "sp_addlinkedserver"
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_sp_adda_8gqa.asp
> Cristian Lefter, SQL Server MVP
> MCT, MCSA, MCDBA, MCAD, MCSD .NET
> "Mikus" <Mikus@.discussions.microsoft.com> wrote in message
> news:CFDDF854-1800-4B8A-ABBA-3AE7BAB55E32@.microsoft.com...
>> Is it possible to connect from SQL server directly to .xls file ?
>> I imagine someting like opening .xls file in Query Analyzer to perform
>> slect
>> into :)
>

Connect from SQL server to Excel file

Is it possible to connect from SQL server directly to .xls file ?
I imagine someting like opening .xls file in Query Analyzer to perform slect
into You can use a linked server. Take a look at this topic from Books Online
"sp_addlinkedserver"
http://msdn.microsoft.com/library/d... />
a_8gqa.asp
Cristian Lefter, SQL Server MVP
MCT, MCSA, MCDBA, MCAD, MCSD .NET
"Mikus" <Mikus@.discussions.microsoft.com> wrote in message
news:CFDDF854-1800-4B8A-ABBA-3AE7BAB55E32@.microsoft.com...
> Is it possible to connect from SQL server directly to .xls file ?
> I imagine someting like opening .xls file in Query Analyzer to perform
> slect
> into |||In addition to using a Linked Server as Cristian suggested, you can also use
the OPENQUERY command.
--Brian
(Please reply to the newsgroups only.)
"Cristian Lefter" <nospam_CristianLefter@.hotmail.com> wrote in message
news:eeETVNHsFHA.1172@.TK2MSFTNGP11.phx.gbl...
> You can use a linked server. Take a look at this topic from Books Online
> "sp_addlinkedserver"
> http://msdn.microsoft.com/library/d...>
dda_8gqa.asp
> Cristian Lefter, SQL Server MVP
> MCT, MCSA, MCDBA, MCAD, MCSD .NET
> "Mikus" <Mikus@.discussions.microsoft.com> wrote in message
> news:CFDDF854-1800-4B8A-ABBA-3AE7BAB55E32@.microsoft.com...
>

Thursday, 8 March 2012

Connect .mdf file to MSDE 2000

I'm using a product (SAP Business one) using MSDE 2000A. Another product I
receintly bought also uses SQL. According to this products manual I need to
connect the *.mdf database to my SQL server using SQL Enterprise Manager. How
does it work?
hi,
GV wrote:
> I'm using a product (SAP Business one) using MSDE 2000A. Another
> product I receintly bought also uses SQL. According to this products
> manual I need to connect the *.mdf database to my SQL server using
> SQL Enterprise Manager. How does it work?
you are required to "attach" the provided database to an existing SQL
Server/MSDE instance...
as MSDE does not provide Entrprise Manager, you have to resort on the
command line tool, oSql.exe, to execute the corresponding Transact-SQL
statement to attach the database using the system stored procedure
sp_attach_db...
you can find the full synopsis of the introduced stored procedure at
http://msdn.microsoft.com/library/de...ae-az_52oy.asp
at http://support.microsoft.com/default...;EN-US;q325003 you will
find some information on how to use oSql.exe to perform this task as long as
other related management tasks..
for your convenience, you can have a look at a free prj of mine, available
at the link following my sign., which provides a graphical user interface
similar to Enterprise Manager in order to accomplish management tasks,
including the one here discussed..
futher tools for MSDE, both commercial and free, are listed
http://www.microsoft.com/sql/msde/partners/default.asp and/or
http://www.aspfaq.com/show.asp?id=2442
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.10.0 - DbaMgr ver 0.56.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply

Conncetiviti error

I have this error only when reading a certain file from SQL
server, and not with all the other files, so it's very strange.
I have a Visual FoxPro cursoradapter who gets populated with a
record from a table in SQL server, and the CursorFill method of
the CursorAdapter (which populates it using the CursorAdapter
properties) raises this error:
Connectivity error: [ODBS SQL Server driver] [SQL Server] Line 1:
incorrect sintax near ")".
The message was in italian so I translated it.
I checked the CursorAdapter's SelList, the SelectCmd, the
KeyFieldList, the Cursorschema... none of them contains
parentheses except the selectcmd, as modified in the
BeforeCursorfill event. The selectcmd is the command that Visual
FoxPro will internally use to call SQL server and populate the
cursoradapter.
This select statement contains the list of fields, the FROM
clause and the following "WHERE" condition:
WHERE FLG_LOAD=0 and (substring(TAG1,1,16) >= ' '
and substring(TAG1,1,16)<=(SELECT
COALESCE(min(substring(TAG1,1,16)),'') FROM AR_ANAGR_ANA_IP WHERE
substring(TAG1,1,16) > ' ' and FLG_LOAD = .F.))
FLO_LOAD and TAG1 are both fields of that table.
Someone sees something strange, in that condition?
TIA
VilliHi
FLG_LOAD = .F.))
The ".F." is not a valid expression in SQL Server. Is it a variable, a value
or ?
Regards
Mike
"Villi Bernaroli" wrote:

> I have this error only when reading a certain file from SQL
> server, and not with all the other files, so it's very strange.
> I have a Visual FoxPro cursoradapter who gets populated with a
> record from a table in SQL server, and the CursorFill method of
> the CursorAdapter (which populates it using the CursorAdapter
> properties) raises this error:
> Connectivity error: [ODBS SQL Server driver] [SQL Server] Line 1:
> incorrect sintax near ")".
> The message was in italian so I translated it.
> I checked the CursorAdapter's SelList, the SelectCmd, the
> KeyFieldList, the Cursorschema... none of them contains
> parentheses except the selectcmd, as modified in the
> BeforeCursorfill event. The selectcmd is the command that Visual
> FoxPro will internally use to call SQL server and populate the
> cursoradapter.
> This select statement contains the list of fields, the FROM
> clause and the following "WHERE" condition:
> WHERE FLG_LOAD=0 and (substring(TAG1,1,16) >= ' '
> and substring(TAG1,1,16)<=(SELECT
> COALESCE(min(substring(TAG1,1,16)),'') FROM AR_ANAGR_ANA_IP WHERE
> substring(TAG1,1,16) > ' ' and FLG_LOAD = .F.))
> FLO_LOAD and TAG1 are both fields of that table.
> Someone sees something strange, in that condition?
> TIA
> Villi
>
>|||Mi e' parso che Mike Epprecht (SQL MVP) abbia scritto:

> Hi
> FLG_LOAD = .F.))
> The ".F." is not a valid expression in SQL Server. Is it
> a variable, a value or ?
Ooooooooooooooops!
Thanks, Mike :)
--
The answer to the ethernal question is:
put a read events after the launch of the form

Conn Obj

Hi All -

Prior to ASP .Net I use to create a connection object for SQL Server in my global.asa file and I would reference the obj whenever needed. how can I do the same in asp .net.

Here is my old asp sample:

Global.asa file:

Sub Session_OnStart

set session("conn") = createobject("adodb.connection")
session("conn").Open "PROVIDER=MSDASQL;DRIVER={SQL Server};SERVER=xxx.xxx.xxx.xxx;DATABASE=xxxxx_db;UID=xx;PWD=xxxxxxxx;"

End Sub


Call from Other Pages:

sqlstr = "select * from members WHERE memberid = '" & session("mbr_memberno") & "'"
set objRS = session("conn").Execute(sqlstr)

... How can I do this in .net?

rich

You can do a similar thing in ASP.NET using the global.asax file.Though, I would caution against it: check out this article for somereasons why you want to avoid this:
http://www.codeproject.com/asp/dbobjects.asp
Jason

|||

So is it better to just set session variables for servername, uid and pass so if it changes its in one file rather than shifting through tons of code replacing sql server names. Also if I do create a session var of these items can I call them in the vb.net portion of the code?

rich

|||web.config is the place to do it...there's an article on my blog on how to do it..check it out.|||The proper way to do it is to store the connection string itself in theweb.config (as the previous post suggests -- though others say thatstoring usernames and passwords in an unecrypted format is a bad idea-- trusted connections are better they say) and instantiate theconnection object and close the connection object on each page.
Jason
|||

You can encrypt the connection string and put it in the web config. There's a good example of doing so here:http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetHT08.asp

Confusion over SP versions

Hi,
I have downloaded and run the file sql2ksp3.exe for
SQL Server 2000.
However, when I run select @.@.version in SQL Analyser it
returns the details for version 2.
ie,
Microsoft SQL Server 2000 - 8.00.534 (Intel X86) Nov 19
2001 13:23:50
Is this OK? Has the SP deployed correctly?
regards
john
Hi,
After the SP3 upgrade the build number should be Microsoft SQL Server
2000 - 8.00.760.
You could check this in SQL 2000 using the below command in query analyzer:-
select serverproperty('ProductLevel')
Can you down load the SP3a from below site and try applying it. After the
upgrade execute the above statement
to get service pack level.
http://www.microsoft.com/sql/downloads/2000/sp3.asp
Thanks
Hari
MCDBA
"John Mullen" <anonymous@.discussions.microsoft.com> wrote in message
news:c4ea01c47a35$714a3300$a501280a@.phx.gbl...
> Hi,
> I have downloaded and run the file sql2ksp3.exe for
> SQL Server 2000.
> However, when I run select @.@.version in SQL Analyser it
> returns the details for version 2.
> ie,
> Microsoft SQL Server 2000 - 8.00.534 (Intel X86) Nov 19
> 2001 13:23:50
> Is this OK? Has the SP deployed correctly?
> regards
> john
>
|||IIRC, if you run the sp3.exe file, it just extracts the contents into a
folder. You need to go to that folder and run setup.exe ...
http://www.aspfaq.com/
(Reverse address to reply.)
"John Mullen" <anonymous@.discussions.microsoft.com> wrote in message
news:c4ea01c47a35$714a3300$a501280a@.phx.gbl...
> Hi,
> I have downloaded and run the file sql2ksp3.exe for
> SQL Server 2000.
> However, when I run select @.@.version in SQL Analyser it
> returns the details for version 2.
> ie,
> Microsoft SQL Server 2000 - 8.00.534 (Intel X86) Nov 19
> 2001 13:23:50
> Is this OK? Has the SP deployed correctly?
> regards
> john
>
|||Thanks Aaron,
sometimes the most obvious things are the most elusive
regards
john

>--Original Message--
>IIRC, if you run the sp3.exe file, it just extracts the
contents into a
>folder. You need to go to that folder and run
setup.exe ...
>--
>http://www.aspfaq.com/
>(Reverse address to reply.)
>
>
>"John Mullen" <anonymous@.discussions.microsoft.com> wrote
in message[vbcol=seagreen]
>news:c4ea01c47a35$714a3300$a501280a@.phx.gbl...
19
>
>.
>

Confusion over SP versions

Hi,
I have downloaded and run the file sql2ksp3.exe for
SQL Server 2000.
However, when I run select @.@.version in SQL Analyser it
returns the details for version 2.
ie,
Microsoft SQL Server 2000 - 8.00.534 (Intel X86) Nov 19
2001 13:23:50
Is this OK? Has the SP deployed correctly?
regards
johnOn my version its saying Microsoft SQL Server 2000 -
8.00.760 (Intel X86) Dec 17 2002 14:22:05.
So my version seems to be ahead of yours.
Peter
>--Original Message--
>Hi,
>I have downloaded and run the file sql2ksp3.exe for
>SQL Server 2000.
>However, when I run select @.@.version in SQL Analyser it
>returns the details for version 2.
>ie,
>Microsoft SQL Server 2000 - 8.00.534 (Intel X86) Nov
19
>2001 13:23:50
>Is this OK? Has the SP deployed correctly?
>regards
>john
>.
>|||Hi,
After the SP3 upgrade the build number should be Microsoft SQL Server
2000 - 8.00.760.
You could check this in SQL 2000 using the below command in query analyzer:-
select serverproperty('ProductLevel')
Can you down load the SP3a from below site and try applying it. After the
upgrade execute the above statement
to get service pack level.
http://www.microsoft.com/sql/downloads/2000/sp3.asp
Thanks
Hari
MCDBA
"John Mullen" <anonymous@.discussions.microsoft.com> wrote in message
news:c4ea01c47a35$714a3300$a501280a@.phx.gbl...
> Hi,
> I have downloaded and run the file sql2ksp3.exe for
> SQL Server 2000.
> However, when I run select @.@.version in SQL Analyser it
> returns the details for version 2.
> ie,
> Microsoft SQL Server 2000 - 8.00.534 (Intel X86) Nov 19
> 2001 13:23:50
> Is this OK? Has the SP deployed correctly?
> regards
> john
>|||IIRC, if you run the sp3.exe file, it just extracts the contents into a
folder. You need to go to that folder and run setup.exe ...
--
http://www.aspfaq.com/
(Reverse address to reply.)
"John Mullen" <anonymous@.discussions.microsoft.com> wrote in message
news:c4ea01c47a35$714a3300$a501280a@.phx.gbl...
> Hi,
> I have downloaded and run the file sql2ksp3.exe for
> SQL Server 2000.
> However, when I run select @.@.version in SQL Analyser it
> returns the details for version 2.
> ie,
> Microsoft SQL Server 2000 - 8.00.534 (Intel X86) Nov 19
> 2001 13:23:50
> Is this OK? Has the SP deployed correctly?
> regards
> john
>|||Thanks Aaron,
sometimes the most obvious things are the most elusive
regards
john
>--Original Message--
>IIRC, if you run the sp3.exe file, it just extracts the
contents into a
>folder. You need to go to that folder and run
setup.exe ...
>--
>http://www.aspfaq.com/
>(Reverse address to reply.)
>
>
>"John Mullen" <anonymous@.discussions.microsoft.com> wrote
in message
>news:c4ea01c47a35$714a3300$a501280a@.phx.gbl...
>> Hi,
>> I have downloaded and run the file sql2ksp3.exe for
>> SQL Server 2000.
>> However, when I run select @.@.version in SQL Analyser it
>> returns the details for version 2.
>> ie,
>> Microsoft SQL Server 2000 - 8.00.534 (Intel X86) Nov
19
>> 2001 13:23:50
>> Is this OK? Has the SP deployed correctly?
>> regards
>> john
>
>.
>

Confusion over SP versions

Hi,
I have downloaded and run the file sql2ksp3.exe for
SQL Server 2000.
However, when I run select @.@.version in SQL Analyser it
returns the details for version 2.
ie,
Microsoft SQL Server 2000 - 8.00.534 (Intel X86) Nov 19
2001 13:23:50
Is this OK? Has the SP deployed correctly?
regards
johnHi,
After the SP3 upgrade the build number should be Microsoft SQL Server
2000 - 8.00.760.
You could check this in SQL 2000 using the below command in query analyzer:-
select serverproperty('ProductLevel')
Can you down load the SP3a from below site and try applying it. After the
upgrade execute the above statement
to get service pack level.
http://www.microsoft.com/sql/downloads/2000/sp3.asp
Thanks
Hari
MCDBA
"John Mullen" <anonymous@.discussions.microsoft.com> wrote in message
news:c4ea01c47a35$714a3300$a501280a@.phx.gbl...
> Hi,
> I have downloaded and run the file sql2ksp3.exe for
> SQL Server 2000.
> However, when I run select @.@.version in SQL Analyser it
> returns the details for version 2.
> ie,
> Microsoft SQL Server 2000 - 8.00.534 (Intel X86) Nov 19
> 2001 13:23:50
> Is this OK? Has the SP deployed correctly?
> regards
> john
>|||IIRC, if you run the sp3.exe file, it just extracts the contents into a
folder. You need to go to that folder and run setup.exe ...
http://www.aspfaq.com/
(Reverse address to reply.)
"John Mullen" <anonymous@.discussions.microsoft.com> wrote in message
news:c4ea01c47a35$714a3300$a501280a@.phx.gbl...
> Hi,
> I have downloaded and run the file sql2ksp3.exe for
> SQL Server 2000.
> However, when I run select @.@.version in SQL Analyser it
> returns the details for version 2.
> ie,
> Microsoft SQL Server 2000 - 8.00.534 (Intel X86) Nov 19
> 2001 13:23:50
> Is this OK? Has the SP deployed correctly?
> regards
> john
>|||Thanks Aaron,
sometimes the most obvious things are the most elusive
regards
john

>--Original Message--
>IIRC, if you run the sp3.exe file, it just extracts the
contents into a
>folder. You need to go to that folder and run
setup.exe ...
>--
>http://www.aspfaq.com/
>(Reverse address to reply.)
>
>
>"John Mullen" <anonymous@.discussions.microsoft.com> wrote
in message
>news:c4ea01c47a35$714a3300$a501280a@.phx.gbl...
19[vbcol=seagreen]
>
>.
>

Wednesday, 7 March 2012

Confusion for loading data

Hi,
I am building in a data mart using SQL server DTS. I have
confusion that
Example
Suppose we have text file for Cust table. It has 3
customers
A,
B,
C
This information comes in text file from legacy system.
We load this data in cust table in staging.
Now we get a new text file with 5 customers i.e
A,
B,
C,
D,
E.
What query shall I write to include the 2 new customers
i.e D & E in my Staging Table. How will I refer to text
file. Meaning that
select new_customers
from text file (what shall I write here to refer my text
file).
Or how is done.
If some one can solve this simple puzzle it will be great
help.
Thanks
Steve
What I usually do is import the text file "as is" in a staging table and
manipulate the data from there. Tables are a lot easier to query than text
files.
You can get your new customers with a query similar to:
SELECT customer AS new_customer
FROM staging_table s
LEFT OUTER JOIN existing_table e
ON s.customer = e.customer
WHERE e.customer IS NULL
Jacco Schalkwijk
SQL Server MVP
"Steve" <anonymous@.discussions.microsoft.com> wrote in message
news:49d101c47392$055e44a0$a301280a@.phx.gbl...
> Hi,
> I am building in a data mart using SQL server DTS. I have
> confusion that
> Example
> Suppose we have text file for Cust table. It has 3
> customers
> A,
> B,
> C
> This information comes in text file from legacy system.
> We load this data in cust table in staging.
> Now we get a new text file with 5 customers i.e
> A,
> B,
> C,
> D,
> E.
> What query shall I write to include the 2 new customers
> i.e D & E in my Staging Table. How will I refer to text
> file. Meaning that
> select new_customers
> from text file (what shall I write here to refer my text
> file).
> Or how is done.
> If some one can solve this simple puzzle it will be great
> help.
> Thanks
> Steve

Confusion for loading data

Hi,
I am building in a data mart using SQL server DTS. I have
confusion that
Example
Suppose we have text file for Cust table. It has 3
customers
A,
B,
C
This information comes in text file from legacy system.
We load this data in cust table in staging.
Now we get a new text file with 5 customers i.e
A,
B,
C,
D,
E.
What query shall I write to include the 2 new customers
i.e D & E in my Staging Table. How will I refer to text
file. Meaning that
select new_customers
from text file (what shall I write here to refer my text
file).
Or how is done.
If some one can solve this simple puzzle it will be great
help.
Thanks
SteveWhat I usually do is import the text file "as is" in a staging table and
manipulate the data from there. Tables are a lot easier to query than text
files.
You can get your new customers with a query similar to:
SELECT customer AS new_customer
FROM staging_table s
LEFT OUTER JOIN existing_table e
ON s.customer = e.customer
WHERE e.customer IS NULL
Jacco Schalkwijk
SQL Server MVP
"Steve" <anonymous@.discussions.microsoft.com> wrote in message
news:49d101c47392$055e44a0$a301280a@.phx.gbl...
> Hi,
> I am building in a data mart using SQL server DTS. I have
> confusion that
> Example
> Suppose we have text file for Cust table. It has 3
> customers
> A,
> B,
> C
> This information comes in text file from legacy system.
> We load this data in cust table in staging.
> Now we get a new text file with 5 customers i.e
> A,
> B,
> C,
> D,
> E.
> What query shall I write to include the 2 new customers
> i.e D & E in my Staging Table. How will I refer to text
> file. Meaning that
> select new_customers
> from text file (what shall I write here to refer my text
> file).
> Or how is done.
> If some one can solve this simple puzzle it will be great
> help.
> Thanks
> Steve

Confusing question or should I address it some where else?

I posted a question here on 12/6/05 about importing data from .csv file and
no one addressed it.
Here is the link
http://www.microsoft.com/technet/co...ogramming&fltr=
And the title is
Subject: import data properly from csv file.
Should I post it some where else or the question was not clear?
Please let me know if there is a better design for this.
I would really appreciate it.
ThanksActually, this is the direct link to your original quiestion:
http://msdn.microsoft.com/newsgroup...86f3&sloc=en-us
I don't really see any need for a global temporary table here. Why can't you
simply query the file directly? You're building stairs in the football field
.
If for some reason you do need a temporary table, create a local one (#name
instead of ##name). Of course local temporary tables are scope-specific, so
you'd have to create it in a top level procedure that starts the whole
process (creates the table, calls a sub procedure to import data, then does
the rest of transformations).
ML
http://milambda.blogspot.com/|||Assuming you know the structure of the resulting table, which would
be likely if you have other code to process it, how about
create table #temptbl (
thisCol thisType,
thatCol thatType
)
insert into #temptbl exec (
'SELECT * into ##temptbl FROM '+
@.linked_server + '...['+@.file + '#' +
@.extension + ']')
-- process as before
drop table #temptbl
If this is all in a procedure, you don't have to explicitly drop
#temptbl, but it's not a bad idea to do so.
Steve Kass
Drew University
sqlster wrote:

>I posted a question here on 12/6/05 about importing data from .csv file and
>no one addressed it.
>Here is the link
>http://www.microsoft.com/technet/co...ogramming&fltr=
>And the title is
>Subject: import data properly from csv file.
>Should I post it some where else or the question was not clear?
>Please let me know if there is a better design for this.
>I would really appreciate it.
>Thanks
>
>|||ML and Steve,
Thank you very much...
"Steve Kass" wrote:

> Assuming you know the structure of the resulting table, which would
> be likely if you have other code to process it, how about
> create table #temptbl (
> thisCol thisType,
> thatCol thatType
> )
> insert into #temptbl exec (
> 'SELECT * into ##temptbl FROM '+
> @.linked_server + '...['+@.file + '#' +
> @.extension + ']')
> -- process as before
> drop table #temptbl
> If this is all in a procedure, you don't have to explicitly drop
> #temptbl, but it's not a bad idea to do so.
> Steve Kass
> Drew University
> sqlster wrote:
>
>

Confused...SA Account

Hi
I have a two node cluster with SQL2000 SP3. When the node1 fails over to
node2, the SQL Server Agent fails. The log file says "Login Failed for user
'sa'" I don't understand how the SA account can fail on node2 and not on
node1. Can anyone shed some light on this and possibly how to resolve the
issue.
Thank You
Marc
What security account context is the SQL Agent running under? Is it a domain account and does it have adequate permissions/rights on both nodes?
|||Hi Stephen
SQL security is set for "SQL Server and Windows" and the service account is
in the Domain Admins group. Same service account is used for both nodes.
Regards
Marc
"Stephen Strong" <anonymous@.discussions.microsoft.com> wrote in message
news:39A963C4-A818-487F-8B10-C38CC58715FA@.microsoft.com...
> What security account context is the SQL Agent running under? Is it a
domain account and does it have adequate permissions/rights on both nodes?
|||Is the SQL Server Agent startup account a member of the local admin group
on both nodes. If you are using SQL Server authentication for SQL Server
Agent to connect to SQL Server then the SQL Server Agent startup account
has to be a local Admin.
You can check the SQL Agent connection properties by right clicking on SQL
Server Agent - Properties - Connection and see how the connection to SQL
Server is set up.
Rand
This posting is provided "as is" with no warranties and confers no rights.
|||Thanks Guys
As it turns out, one of our programmers changed the authentication method to
Windows rather than SQL. I changed it back and all is well.
Regards
Marc
"Marc" <Marc@.nospam.com> wrote in message
news:%23u4AZPJJEHA.2736@.TK2MSFTNGP12.phx.gbl...
> Hi
> I have a two node cluster with SQL2000 SP3. When the node1 fails over to
> node2, the SQL Server Agent fails. The log file says "Login Failed for
user
> 'sa'" I don't understand how the SA account can fail on node2 and not on
> node1. Can anyone shed some light on this and possibly how to resolve the
> issue.
> Thank You
> Marc
>

Saturday, 25 February 2012

Confliction between SQL Server 2005 and SQL Server 2005 Express Edition

Hi,

My objective is using a single DB file (mdf file) + SQL Server Express 2005 to run my program

I got two softwares here, Visual Studio 2005 and SQL Server 2005. Firstly, I installed Visual Studio 2005, normally the SQL Server 2005 Express Edition will be installed with this software. After finishing the installation. I opened a new project and try to open a DB file (.mdf) from Visual Studio 2005, it works. The problem is that I can't restore the mdf file from an old database file since it lose a lot of functions that appear in SQL Server 2000 / SQL Server 2005. And it is too troublesome and inconvenient to edit a DB file in Visual Stuio 2005.

Therefore, I have to install SQL Server 2005 for me to edit the mdf file, so that I can modify, backup, or even restore the mdf file with another DB file. After the installation of SQL Server 2005, I got a tool, SQL Server Managment Studio, to edit the mdf file. I can open the mdf file but when I double-clicked on the mdf file in Visual Studio 2005, it gives me the following error message:

Connections to SQL Server files (*.mdf) require SQL Server Express 2005 to function properly. Please verify the installation of the component or download from the URL:http://go.microsoft.com/fwlink/?LinkId=49251

It seems the SQL Server 2005 modify some of the files in SQL Server 2005 Express Edition. Is that SQL Server 2005 and SQL Server 2005 Express Edition cannot be exist at the same time?

The issue is I'm working on my computer, but I dun want to install SQL Server 2005 in the server that I will transfer to. It will be much like using Access DB file, without the Microsoft Access software, the program can still work well. However, when I'm still in programming stage, I do hope to have a DB file as the source file for my program, but I can do some editing works with SQL Server 2005.

Does anyone can give me a suggestion? Thanks for your kindly reply.

Calvin

On my machine I have SQL2005 and SQL Express installed at the same time, and both of them work fine. I guess the problem lays in connection string of the database. You can check as following:

Go to database explorer-data connections.
Right click your mdf database and click "modify connection"...
Click the advanced button
Search for the "data source" string
Set the string to refer to your SQL Server2005 instance.

You can take a look at this link:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=124596&SiteId=1.

BTW, if you just want to operate on the database file more directly, you do not need to install SQL Server2005. You can intall "SQL Server Management Studio Express " from here:

http://msdn.microsoft.com/vstudio/express/sql/download/

.

Sunday, 19 February 2012

Confirmation on Script Task Behavior

Hello,

I am looking for some confirmation on a behavior of the SSIS Script Task. I have a custom script task that takes an input file, and archives it after it has been processed into the database.

When I run this package in the Visual Studio GUI, if the destination drive is full, it throws an exception telling me that there is not enough disk space. So, my questions are:

1) If this happens when the package is running through the command line, would this exception still be thrown? (I am thinking it will be)

2) Also, Do I need to explicitly fail the script task in the event handler, in order to ensure this .Net exception being thrown will cause the component to fail. (I am fairly certain I do, since this is what I had to do inside of the Visual Studio GUI, but does anyone know if this same behavior would occur when running from the command line?)

Thanks,

Chris

If you don't catch the exception, it should cause your script task to fail. Otherwise, you would need to explicitly fail it by setting Dts.TaskResult=Dts.Results.Failure. The exception-related behavior will be the same between the GUI and the command-line.

Configuring Text Log File Path in dtxConfig

Hi,

I am having trouble configuring the log file path in dtsconfig. I don't want to keep changing the log file path every time I change environments.

Here are the parameters.

<Configuration ConfiguredType="Property" Path="\Package.LogProviders[SSIS log provider for Text files].Properties[ConfigString]" ValueType="String">
<ConfiguredValue>SalesForceConnectLog</ConfiguredValue>
</Configuration>

<Configuration ConfiguredType="Property" Path="\Package.LogProviders[SSIS log provider for Text files].Properties[Name]" ValueType="String">
<ConfiguredValue>SSIS log provider for Text files</ConfiguredValue>
</Configuration>

I tried to enter the path on [ConfigString] but it didn't work.

Any Help is appreciated

Gulden

You don't update the log provider, you update the connection manager for that log provider.|||

You are absolutely right. Your email also reminded me why I had ruled that out. It was a problem with logging to the same file from two different packages. I went back and corrected that.

Thanks for your answer..