Showing posts with label working. Show all posts
Showing posts with label working. Show all posts

Wednesday, March 28, 2012

MS SQL Server Run time Error

Hi

We are using MS SQL Server 2000 as back end database for our application. It was working fine certainly we are getting Run time error while try to open this application through front end.

The Error number says that the SQL Transaction Log file is file. find belo the error

Thanks in advance.
S KaliyanI think I missed the error in the post. If this is still unresolved can you resend with the appropriate error?

Friday, March 23, 2012

MS SQL Server 2005 EE & MS SQL Server 2005 Express Manager

I recently installed SQL Server 2005 Express Edition CTP (It appears to be working fine). I then found the SQL Server 2005 Express Manager, and tried to load it, but I keep getting the error:

This computer must have at least Windows 2000 SP4 and the user must have administrator privileges in order to continue. Also, you must first install the SMO Components and the .NET Framework version 2.0.

Well, the machine is Windows XP Pro SP2 (fully patched), the account I am installing with is a member of the local admin group, my machine has both .Net framework 1.1 and 2.0 loaded (could this be the issue?). I guessed that installing 2.0 would upgrade 1.1. but that does not appear to be the case. I also went back and reinstalled SQL Server, unselected "Hide advanced configuration options", clicked on Client Components and selected "Entire feature will be installed on local hard drive", and finished the install. The docs I found on SQL 2005 indicate that this would install the SMO Components. Thus, I should have all of the bases covered, but the Express Manager install still errors out with the message above.

Any help on this would be greatly appreciated,
JonLooking at the Product page for SQL Express, the Management App is not included with the CTP. To use it you are going to have to use the beta 2 version.

MS SQL Express product page
http://lab.msdn.microsoft.com/express/sql/|||I have installed the latest SQL Server 2005 Express, and even with the problems with remote connections(a new port number by default) I also recieve the error about the SMO components and .Net Framework version 2.0. .Net Framework version 2.0 is installed, and functioning, according the the install I have the SMO components; BUT I still receive the message when attempting to install the Express Manager.

I have not installed any beta versions.

Is it possible that the SMO components are not registered correctly? Any suggestions would be appreciated.

MS SQL Server 2005 EE & MS SQL Server 2005 Express Manager

I recently installed SQL Server 2005 Express Edition CTP (It appears to be working fine). I then found the SQL Server 2005 Express Manager, and tried to load it, but I keep getting the error:

This computer must have at least Windows 2000 SP4 and the user must have administrator privileges in order to continue. Also, you must first install the SMO Components and the .NET Framework version 2.0.

Well, the machine is Windows XP Pro SP2 (fully patched), the account I am installing with is a member of the local admin group, my machine has both .Net framework 1.1 and 2.0 loaded (could this be the issue?). I guessed that installing 2.0 would upgrade 1.1. but that does not appear to be the case. I also went back and reinstalled SQL Server, unselected "Hide advanced configuration options", clicked on Client Components and selected "Entire feature will be installed on local hard drive", and finished the install. The docs I found on SQL 2005 indicate that this would install the SMO Components. Thus, I should have all of the bases covered, but the Express Manager install still errors out with the message above.

Any help on this would be greatly appreciated,
JonLooking at the Product page for SQL Express, the Management App is not included with the CTP. To use it you are going to have to use the beta 2 version.

MS SQL Express product page
http://lab.msdn.microsoft.com/express/sql/|||I have installed the latest SQL Server 2005 Express, and even with the problems with remote connections(a new port number by default) I also recieve the error about the SMO components and .Net Framework version 2.0. .Net Framework version 2.0 is installed, and functioning, according the the install I have the SMO components; BUT I still receive the message when attempting to install the Express Manager.

I have not installed any beta versions.

Is it possible that the SMO components are not registered correctly? Any suggestions would be appreciated.

Wednesday, March 21, 2012

MS SQL Server 2000, and ASP.NET 2.0 membership controls (login)

when my ASP.NET 2.0 web site working against MS SQL Server 2000,
I Usually have a connection string to the DB, I create a connection, and start working on the data.

While reading about the MemberShip provider of ASP.NET 2.0 (Login control, Forgot password, etc.),
I read that it's possible to save the MDF file of the membership controls, within the APP_DATA folder.

But how can it be ? the MDF file must be at the server folder,
How can I access this MDF file ? with which connection string ?
How does MS SQL Server 2000 syncronize against this MDF file within my APP_DATA folder ?

And by the way, if my hosting company allow me to use 1 db schema of the MS SQL Server 2000 server,
Does this method (saving the MDF file within thr APP_DATA folder) allow me to use multiple schemas ?

Thanks.

Hi,

But how can it be ? the MDF file must be at the server folder

For your first question, the built-in database is a new feature in .NET 2.0 which needs SQLExpress to support. The database is together with your application, you don't need to deploy the database additionally. The MDF file is stored in a folder called APP_DATA. When you application runs, the files in APP_DATA will be shipped as a database with your application automatically.


How can I access this MDF file ? with which connection string ?

If you want to access the database in SQLExpress, you also need connection string to achieve that. By default, the connection string for SQLExpress (built-in database) is located in Machine.Config, the name of the connection string is "LocalSqlServer", and you also can overwrite it and declare it at web.config file, even change the name of the connection string. But what you should note is, don't forget to modify the connection string attribute of the provider so that all the features supported by provider mechanism (i.e. Membership,Profile and etc) can work.

How does MS SQL Server 2000 syncronize against this MDF file within my APP_DATA folder

When you have decided to use SQLExpress to support your provider mechanism application, you don't need to use SQLServer2000. But if you want those provider supported application to work with SQLServer2000. You should use aspnet_regsql tool to transport the ASPNETDB to SQLServer2000 database, and modify the connection string attribute of corresponding provider.

For aspnet_regsql.exe tool, see:http://msdn2.microsoft.com/en-us/library/ms229862(VS.80).aspx

For more information about ASP.NET provider, see:
http://msdn2.microsoft.com/en-us/library/aa478948.aspx

Thanks.

|||

Thanks,

At my development machine :
But I removed SQL Server express from my machine, that means I can't just add the login control, than the MDF file will be created at the APP_DATA,
And everything will be ok ? I must install MS SQL Server express ?

At the hosting server :
There is ms sql server 2000, just copying the MDF data to the AAP_DATA, I guess will not work, right ?
I will need to mograte this MDF file, from my APP_DATA folder, to the real DB, right?

|||

Hi,

But I removed SQL Server express from my machine, that means I can't just add the login control, than the MDF file will be created at the APP_DATA,
And everything will be ok ? I must install MS SQL Server express ?

When you remove your SQLExpress edtion, you still can use such features like membership. (Login controls,CreateUserWizard controls and etc.) But you should export the ASPNETDB in SQLExpress to SQLServer Database before you removing your SQLExpress, and change the membership provider.

There is ms sql server 2000, just copying the MDF data to the AAP_DATA, I guess will not work, right ?

It will not work. To use the database in APP_DATA, you must have SQLExpress installed on your server.

I will need to mograte this MDF file, from my APP_DATA folder, to the real DB, right

Right, you need to export the ASPNETDB.mdf to your SQLServer 2000 database.

Thanks.

|||

Thanks

MS SQL Server 2000 - Run query as a different user

Can we run some query as a different user working with MS SQL Server 2000?
For example if we connected to the DB in the Enterprise Manager as User1,
can we run some query as User2?
We need to select from a VIEW pulling data from some DB, we can encrypt the
text of this view hiding the target tales and their structure on the target
DB. But since the view works with this DB it should have the permissions to
SELECT from this DB, and that gives the green light to the user to see these
tables in the Enterprise Manager.
It would be nice if we could run the queries inside the view under another
user account and then encrypt the view so that the user will see the view as
it works but should never see the DB tables or the text of the view.
Just D.Of course you can do that, this is one of the benefits of the views.
Example:
Make dbo owner of table employees
Create a view owned by dbo to access some of the fields of employee table
Give permissions to user1 to this view
User1 will be able to access the view but not the employees table
Ben Nevarez, MCDBA, OCP
Database Administrator
"Dmitri Shvetsov" wrote:

> Can we run some query as a different user working with MS SQL Server 2000?
> For example if we connected to the DB in the Enterprise Manager as User1,
> can we run some query as User2?
> We need to select from a VIEW pulling data from some DB, we can encrypt th
e
> text of this view hiding the target tales and their structure on the targe
t
> DB. But since the view works with this DB it should have the permissions t
o
> SELECT from this DB, and that gives the green light to the user to see the
se
> tables in the Enterprise Manager.
> It would be nice if we could run the queries inside the view under another
> user account and then encrypt the view so that the user will see the view
as
> it works but should never see the DB tables or the text of the view.
> Just D.
>
>

Friday, March 9, 2012

MS SQL conn string

My MS SQL Server was working perfectly fine locally when I used the following connection string:

server=(local)\\DB;Integrated Security=True;uid=;pwd=;database=AspNetDb

When I moved my SQL server to another machine within my LAN, it stopped functioning.
server=(192.168.1.3)\\DB;IntegratedSecurity=True;uid=;pwd=;database=AspNetDb

Could someone kindly give me some advice? I appreciate your assistance.look at:

http://www.connectionstrings.com/

Saturday, February 25, 2012

MS SQL 2000 LEFT OUTER JOIN and RIGHT OUTER JOIN problem?

I'm a little with a JOIN that should be working but isn't.
If I run the same SQL statement in MS Access (same data) I get the join
results I expect. If I run the SQL statement in Enterprise Manager I get a
different result (again same data).
I thought both are supposed to be ANSI compliant?
What I'm trying to accomplish is to force return results even if one table
(FS) doesn't return any records:
SELECT FS.CR, S.SN, S.SID
FROM FS RIGHT OUTER JOIN
S ON FS.SID = S.SID
WHERE (FS.DDate = '4/30/2004')
I'm expecting to see one record with SN and SID values populated and CR
null -- the same query in MS Access produces the expected result, but the
same view in MS SQL 2000 returns NO records.
(true field name and table names have been removed to protect the innocent)
;)
Any suggestions?
Rob.>> I thought both are supposed to be ANSI compliant? <<
ACCESS ain't even close to standards and the underlying model is a file
system. That is why they use the words "record" and "field" instead of
rows and columns.
Since the WHERE clause is applied last, that is probably the culprit.
Did you consider using ISO-8601 dates, as required by Standard SQL? Is
ddate a temporal data type?
WHERE FS.ddate = '2004-04-30';|||> WHERE FS.ddate = '2004-04-30';
Actually Joe, in SQL Server, '20040430' is much safer than the (admittedly,
more sensible and legible) yyyy-mm-dd format.
A|||You've referenced the unpreserved table in the WHERE clause, which
effectively turns your outer join into an inner join. Also, your date
format isn't necessarily reliable in SQL Server. Try:
SELECT FS.cr, S.sn, S.sid
FROM FS
RIGHT OUTER JOIN S
ON FS.sid = S.sid
AND FS.ddate = '20040430'
Personally, I would prefer to turn this around as a LEFT join:
SELECT FS.cr, S.sn, S.sid
FROM S
LEFT OUTER JOIN FS
ON FS.sid = S.sid
AND FS.ddate = '20040430'
I think it's fair to say that LEFT outer joins are used much more often
than RIGHT and perhaps one intuitively expects to see the preserved
table specified first. Maybe that confusion is what caused you to
reference FS in the WHERE clause?
Access's basic syntax differs from ANSI SQL92 in several ways. Don't
expect Access and SQL Server results to correspond every time.
David Portas
SQL Server MVP
--|||> Actually Joe, in SQL Server, '20040430' is much safer than the
(admittedly,
> more sensible and legible) yyyy-mm-dd format.
Indeed. On my (German) server, this is interpreted as yyyy-dd-mm. Therefore,
I prefer to use the also safe (and legible) ODBC version: {d 'yyyy-mm-dd'}
Axel|||> Indeed. On my (German) server, this is interpreted as yyyy-dd-mm.
> Therefore,
> I prefer to use the also safe (and legible) ODBC version: {d 'yyyy-mm-dd'}
But I don't know if you will always be able to rely on SQL Server internally
processing that syntax correctly.
This is my signature. It is a general reminder.
Please post DDL, sample data and desired results.
See http://www.aspfaq.com/5006 for info.|||If I'm not mistaken, in SQL Server (per a Kalen Delaney article from some ti
me
ago), if you use the following format: yyyymmdd SQL will always interpret th
at
correctly regardless of the collation or regional settings. Note that this
format has no dashes.
Thomas
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:Ozy7TI4PFHA.2788@.TK2MSFTNGP09.phx.gbl...
> But I don't know if you will always be able to rely on SQL Server internal
ly
> processing that syntax correctly.
> --
> This is my signature. It is a general reminder.
> Please post DDL, sample data and desired results.
> See http://www.aspfaq.com/5006 for info.
>|||Yes, that's the format I recommended. What I was commenting on was {d
'yyyy-mm-dd'}
This is my signature. It is a general reminder.
Please post DDL, sample data and desired results.
See http://www.aspfaq.com/5006 for info.
"Thomas" <replyingroup@.anywhere.com> wrote in message
news:OKO2Jw4PFHA.2252@.TK2MSFTNGP15.phx.gbl...
> If I'm not mistaken, in SQL Server (per a Kalen Delaney article from some
> time ago), if you use the following format: yyyymmdd SQL will always
> interpret that correctly regardless of the collation or regional settings.
> Note that this format has no dashes.|||Some additional information, in case anyone is interested...
That format (ODBC escape clause format) is still in BOL for SQL Server 2005.
My guess is that it
will be around for a while. Personally, I'm not too found of it. It was intr
oduced in ODBC to allow
ODBC to catch the string and convert into a format that the DBMS will unders
tand. As of 7.0, it was
added to the DBMS. Try passing it using ISQL against 6.5 and 7.0 to see the
difference. AFAIK, both
ODBC and OLEDB are supposed to convert these escape clauses, I have no idea
whether ADO.NET catches
ODBC-style escape clauses.
I prefer unseparated (as most do). I wish that MS would make the ANSI SQL fo
rmat unambiguous, but I
doubt that will happen in the upcoming 2.4 versions (if at all).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:%230pyPH5PFHA.1932@.tk2msftngp13.phx.gbl...
> Yes, that's the format I recommended. What I was commenting on was {d 'yy
yy-mm-dd'}
> --
> This is my signature. It is a general reminder.
> Please post DDL, sample data and desired results.
> See http://www.aspfaq.com/5006 for info.
>
> "Thomas" <replyingroup@.anywhere.com> wrote in message
> news:OKO2Jw4PFHA.2252@.TK2MSFTNGP15.phx.gbl...
>|||> I wish that MS would make the ANSI SQL format unambiguous
Me too. To me it's rather irritating that it is so hard to find an
internationally constant DATETIME literal format in SQL Server enabling me
to write software compiling INSERT statements writing a date value into a
DATETIME column.

> I prefer unseparated (as most do).
From my perspective I dislike the unseparated format. It's hard to read and
it's even harder to find typing errors in it giving me likely a hard time to
find errors that don't even exist.
Axel Dahmen

Monday, February 20, 2012

MS SQL 05 auto increment

Hello,

Firstly Hello to everyone I'm new the forum and fairly new to .net

I'm working on web datbase application using visual studios 05 and MS SQL05 I've used 2003 (briefly) before but 2005 is very new to me.

To my problem I download the GUI interface from microsoft so I can now setup a local database and do my own testing.

I have created the table and fields with in it however on a particular table i have made a primary Key and left it as an INT but I would like to set it as auto increment ! I dont know how to select that option as i was used to mysql way of doing things or does this have to be done as a stored procedure ?

Any assistance much appreciated.

in the management studio you can right click on the table name and click on "modify table" then in the right pane select the column you want to set autoidenty on to and in the bottom pane check the Identity property.