Showing posts with label connect. Show all posts
Showing posts with label connect. Show all posts

Friday, March 23, 2012

how to setup local SQL Server 2005 DB

I installed 2005 Developer edition on a local workstation in our lab. I can connect to a network SQL Server with it just fine. But I do not have a local instance of SQL Server on this workstation.

How do I create a local instance of SQL Server? (box is WinXPPro-SP3)

After accepting the defaults for this installation, I noticed that there were no "local" instances of SQL server available, whereby I could go out and create my own test databases locally or copy a few tables from a production server over to my local box for testing. I'm looking through the books online and do not see (maybe I missed it) the steps to creating a local instance for setting up a workstaiton as a 'test' environment.

Assistance is appreciated.

RLN

Bummer to find that no one responded to this problem because its the same exact problem I'm having except that I have Standard edition installed on XPPro SP2

Anyone have any ideas on how I can set this up?

Thanks

|||

Hi,

i do not understand what you are try to achieve here!!!

Local Instance of SQL Server !? you may try installing SQL 2005 Developer Edition / SQL 2005 Express Edition on your Workstation and then you may restore backup of your production database or you may detach db on prod server copy .mdf and .ldf files to your workstation and attach it on your work station to work as local/test environment and attach your prod db again so that prod server is also up for use.

is this you are looking for!?

Hemantgiri S. Goswami

|||

I'm in the same situation.

In S2K you could only do this with personal edition so I guess it could be the same here....Express edition maybe?

But if there's any help out there I too would welcome any advice.

Thanks,
Eamon
Ireland

|||Have you refer my reply !!!!

how to setup local SQL Server 2005 DB

I installed 2005 Developer edition on a local workstation in our lab. I can connect to a network SQL Server with it just fine. But I do not have a local instance of SQL Server on this workstation.

How do I create a local instance of SQL Server? (box is WinXPPro-SP3)

After accepting the defaults for this installation, I noticed that there were no "local" instances of SQL server available, whereby I could go out and create my own test databases locally or copy a few tables from a production server over to my local box for testing. I'm looking through the books online and do not see (maybe I missed it) the steps to creating a local instance for setting up a workstaiton as a 'test' environment.

Assistance is appreciated.

RLN

Bummer to find that no one responded to this problem because its the same exact problem I'm having except that I have Standard edition installed on XPPro SP2

Anyone have any ideas on how I can set this up?

Thanks

|||

Hi,

i do not understand what you are try to achieve here!!!

Local Instance of SQL Server !? you may try installing SQL 2005 Developer Edition / SQL 2005 Express Edition on your Workstation and then you may restore backup of your production database or you may detach db on prod server copy .mdf and .ldf files to your workstation and attach it on your work station to work as local/test environment and attach your prod db again so that prod server is also up for use.

is this you are looking for!?

Hemantgiri S. Goswami

|||

I'm in the same situation.

In S2K you could only do this with personal edition so I guess it could be the same here....Express edition maybe?

But if there's any help out there I too would welcome any advice.

Thanks,
Eamon
Ireland

|||Have you refer my reply !!!!

how to setup local SQL Server 2005 DB

I installed 2005 Developer edition on a local workstation in our lab. I can connect to a network SQL Server with it just fine. But I do not have a local instance of SQL Server on this workstation.

How do I create a local instance of SQL Server? (box is WinXPPro-SP3)

After accepting the defaults for this installation, I noticed that there were no "local" instances of SQL server available, whereby I could go out and create my own test databases locally or copy a few tables from a production server over to my local box for testing. I'm looking through the books online and do not see (maybe I missed it) the steps to creating a local instance for setting up a workstaiton as a 'test' environment.

Assistance is appreciated.

RLN

Bummer to find that no one responded to this problem because its the same exact problem I'm having except that I have Standard edition installed on XPPro SP2

Anyone have any ideas on how I can set this up?

Thanks

|||

Hi,

i do not understand what you are try to achieve here!!!

Local Instance of SQL Server !? you may try installing SQL 2005 Developer Edition / SQL 2005 Express Edition on your Workstation and then you may restore backup of your production database or you may detach db on prod server copy .mdf and .ldf files to your workstation and attach it on your work station to work as local/test environment and attach your prod db again so that prod server is also up for use.

is this you are looking for!?

Hemantgiri S. Goswami

|||

I'm in the same situation.

In S2K you could only do this with personal edition so I guess it could be the same here....Express edition maybe?

But if there's any help out there I too would welcome any advice.

Thanks,
Eamon
Ireland

|||Have you refer my reply !!!!sql

Wednesday, March 21, 2012

How to setup a repeated update to a table in SQL?

Hi:

I am fairly new to SQL Server 2005 and before now, I have only had to restore databases, and connect to tables via ODBC connection in a reference (read only) setup. Today, I have a very small project to set up using the server.

I have a userlogon.csv file that the network stores on a file server in a hidden share \logon$. It has 4 columns, UserID, Computer, Date, Time.

I was able to create a database called UserLogon and import the file as it was today. I want to create a scheduled update so the server would go to this file perhaps 4 times a day (or more) and grab any new logins that have appended itself to this CSV file.

So, as a newbie with a 1,900 page SQL Server 2005 unleashed manual at my side, could someone outline what the steps are in general I should follow to set this up?

I have the process laid out in my mind, but I don't know how to translate in into a scheduled task of the SQL Server :

1. Create DB and import the table (done)

2. create a stored procedure that connects to the CSV file and evaluates date and time stamps then appends any new records into the SQL db table. (appending records would be achieved by using the INSERT and WHERE statements?)

3. Schedule a job to perform this task on a routine basis.

It appears that the file connection portion of this set up is defined outside the evaluation and append record procedure? (not in the same stored procedure). Perhaps I tie the whole process together using the Job Manager, selecting the file settings, and then the stored procedure to be performed on the file.?

I hope I have been descriptive enough to ask if someone could outline the modules/features/processes involved so I can read up on them and figure them out using the book.

Thank you in advance.

David

David:

It sounds to me like you need a good book on the subject of "Database Design". I would suggest Pro SQL Server 2005 Database Design and Optimization by MVP Louis Davidson.

Maybe since you are just getting started a better choice for a first book would be Data Modeling Essentials by Graeme Simison

Kent

Monday, March 12, 2012

How to set the current connectionString user as a defualt value?

Hi,

I'm using username & password in my connectionString to connect my program (C#.net) with Sql Server 2005..

I put in defualt value in one feild: user_name()

it replace the user: dbo, not the user which I used in my connectionString.

so.. how to get this user?

I tried to put: currnet_user

but I get the same result, "dbo" not the user in my connectionString..

I tried SESSION_USER, it gave the same result :(|||

This is my connectionString:

connectionString="Provider=SQLOLEDB;Data Source=LEWEHSBF\LEWEENG;Persist Security Info=True;Password=HsBfL4w4;User ID=Lewe;Initial Catalog=MyDatabase"

|||

I think the resone is the user I which I used in myConnectionString, is Admin user, I tried with "dataread, datawrite" user and its worked..

Thank you myself

Friday, March 9, 2012

How to set my ASP.NET application to access SQL Server 2005 using clients user credentials

Hi guys,

I'm not sure if I'm just bad at googling but I can't seem to find a way to set an ASP.NET 2.0 web application to connect to SQL Server 2005 using the current client's user credentials. My web application is using Integrated Windows Authentication so its Page.User.Identity is set to a DOMAIN\username value... I want to pass that to my connectionstring or have my connections pick up the identity automatically and use that Identity when accessing the db server.

Oh and another thing, my IIS Application Pool is using a specific Identity itself, so I don't know if that might affect the above.

Hope someone could help.

Hi,

what you need is process impersonation, that allows asp.net to switch the execute owner to an other user. I have used this for asp.net and remoting calls, so that i have the original caller. I have two links for you:

http://msdn2.microsoft.com/en-us/library/ms998292.aspx|||Thanks Zhou. I'll the articles out once I get my hands on our dev server.Stick out tongue Thanks.

Friday, February 24, 2012

How to set Client Machine name when using ADO to connect to SQL Server 2000?

When you connect to SQL Server using SQLConnection, how to set client machine name(or IP address) so that you can monitor the process on Server side using Enterprise Manager?


Whatever IP address you provided in the connection string can be used to monitor along with the user id of sql in case mixed mode authentication is there.

Please post more details..

Satya

|||

In your connection string, you can add a name/value pair like

workstation id=MYCOMPUTERNAME

and now when you runsp_who you will see MYCOMPUTERNAME for the value in thehostname column.

You can also set a value for you application like

Application Name=Your Application

within your connection string.

Sunday, February 19, 2012

How to separator the ODBC and SQL client

I have one SQL server 2000 , and some client connect to SQL server through ODBC Client and use ACCESS to query database ,some client can use SQL server 2000 client to manage the database. Now I don't want the ODBC client install SQL client and connect to
SQL server 2000. I have install a host firewall in SQL server,but because ODBC client and SQL client can use two way (name pipe and TCP port 1433),so I also can't reject ODBC client use SQL client. Does someone any suggestion.
Depending on your environment several possibilites come to mind.
You can take out named pipe connections all together and only allow TCP/IP connections to your SQL server. Client DSNs used by Access are frequently set up to used named pipe connections instead of TCP/IP.
You can reassing SQL to use some other than the standard port '1433' - some higher number preferably.
You can hide the SQL port all together (Using Server Network Utility) This will most certainly also cause disruption for the already existing SQL client connections. You can also just monitor the current connections to your SQL server and isolate the non
SQL clients one at a time by isolating their connection properties.
|||Many thanks Sassan!
I can disable the port 1433 or name pipe, but I must enable the client connect to the SQL Server use ODBC, but how can I limit the user only connect the SQL server through ODBC, and reject the sql client connect one the same computer.
|||There is not a method to do this. If a client can connect from one
application he can also connect form any other application if he has a
login and knows the name of the SQL Server machine.
Rand
This posting is provided "as is" with no warranties and confers no rights.

How to separator the ODBC and SQL client

I have one SQL server 2000 , and some client connect to SQL server through O
DBC Client and use ACCESS to query database ,some client can use SQL server
2000 client to manage the database. Now I don't want the ODBC client install
SQL client and connect to
SQL server 2000. I have install a host firewall in SQL server,but because OD
BC client and SQL client can use two way (name pipe and TCP port 1433),so I
also can't reject ODBC client use SQL client. Does someone any suggestion.Depending on your environment several possibilites come to mind.
You can take out named pipe connections all together and only allow TCP/IP c
onnections to your SQL server. Client DSNs used by Access are frequently set
up to used named pipe connections instead of TCP/IP.
You can reassing SQL to use some other than the standard port '1433' - some
higher number preferably.
You can hide the SQL port all together (Using Server Network Utility) This
will most certainly also cause disruption for the already existing SQL clien
t connections. You can also just monitor the current connections to your SQL
server and isolate the non
SQL clients one at a time by isolating their connection properties.|||Many thanks Sassan!
I can disable the port 1433 or name pipe, but I must enable the client conne
ct to the SQL Server use ODBC, but how can I limit the user only connect th
e SQL server through ODBC, and reject the sql client connect one the same co
mputer.|||There is not a method to do this. If a client can connect from one
application he can also connect form any other application if he has a
login and knows the name of the SQL Server machine.
Rand
This posting is provided "as is" with no warranties and confers no rights.

How to separator the ODBC and SQL client

I have one SQL server 2000 , and some client connect to SQL server through ODBC Client and use ACCESS to query database ,some client can use SQL server 2000 client to manage the database. Now I don't want the ODBC client install SQL client and connect to SQL server 2000. I have install a host firewall in SQL server,but because ODBC client and SQL client can use two way (name pipe and TCP port 1433),so I also can't reject ODBC client use SQL client. Does someone any suggestion.Depending on your environment several possibilites come to mind
You can take out named pipe connections all together and only allow TCP/IP connections to your SQL server. Client DSNs used by Access are frequently set up to used named pipe connections instead of TCP/IP
You can reassing SQL to use some other than the standard port '1433' - some higher number preferably
You can hide the SQL port all together (Using Server Network Utility) This will most certainly also cause disruption for the already existing SQL client connections. You can also just monitor the current connections to your SQL server and isolate the non SQL clients one at a time by isolating their connection properties.|||Many thanks Sassan
I can disable the port 1433 or name pipe, but I must enable the client connect to the SQL Server use ODBC, but how can I limit the user only connect the SQL server through ODBC, and reject the sql client connect one the same computer.|||There is not a method to do this. If a client can connect from one
application he can also connect form any other application if he has a
login and knows the name of the SQL Server machine.
Rand
This posting is provided "as is" with no warranties and confers no rights.