|
It may be firewall issue.
Parwej Ahamad
|
|
|
|
|
If your instance isn't the default instance, you must specify it. Try adding to the end:
-S.\instancename
|
|
|
|
|
I have just the one instance running. Now my belief is getting stronger. Its vista thats playing evil.
C isn't that hard: void (*(*f[])())() defines f as an array of unspecified size, of pointers to functions that return pointers to functions that return void
"Always program as if the person who will be maintaining your program is a violent psychopath that knows where you live." - Martin Golding
|
|
|
|
|
d@nish wrote: Its vista thats playing evil
I'm not so sure about it. I've got Vista and just tested your problem. Nothing wrong...
Even though you only have one instance it's not necessarily configured as the default. It still may be a named instance. Give it a try. At least if not working it eliminates one possibility.
|
|
|
|
|
Thanks Mika. I have sort of progressed. Now this is what I have done:
exec master..xp_cmdshell 'bcp "select * from cab.useraudit" queryout "c:\test.xls" -S "MACHINE\SQLEXPRESS" -U "uid" -P "pwd"'
Now I am getting this error:
Error = [Microsoft][SQL Native Client][SQL Server]Login failed for user 'Machine\Danish'.
The user is not associated with a trusted SQL Server connection.
How to deal with this?
Please bear. This is the first time I am writing a decent stored procedure.
C isn't that hard: void (*(*f[])())() defines f as an array of unspecified size, of pointers to functions that return pointers to functions that return void
"Always program as if the person who will be maintaining your program is a violent psychopath that knows where you live." - Martin Golding
|
|
|
|
|
Try also with -T and -P switches.
Parwej Ahamad
|
|
|
|
|
Its not a trusted connection. And with a trusted connection, why would I give a password?
C isn't that hard: void (*(*f[])())() defines f as an array of unspecified size, of pointers to functions that return pointers to functions that return void
"Always program as if the person who will be maintaining your program is a violent psychopath that knows where you live." - Martin Golding
|
|
|
|
|
Instead of using -U and -P switches, use the -T switch (integrated security). In that case yuo connect to the database with the same credentials which actually run the database.
d@nish wrote: Please bear. This is the first time I am writing a decent stored procedure
No problem at all
|
|
|
|
|
Thats where the problem is. SQL doesnt trusts the connection I am using. How can I win its trust?
C isn't that hard: void (*(*f[])())() defines f as an array of unspecified size, of pointers to functions that return pointers to functions that return void
"Always program as if the person who will be maintaining your program is a violent psychopath that knows where you live." - Martin Golding
|
|
|
|
|
Did you try -T after using the instance name with -S?
Also with -S and -T switches, what kind of error message you get. The test call I used for this is:
exec master..xp_cmdshell 'bcp "SELECT GETDATE()" queryout "e:\result.txt" -S ".\SOMEINSTANCENAME" -c -T'
Note that I'm using dot instead of server name. This may affect the protocol used.
|
|
|
|
|
I have got things working now. The problen is that the data gets corrupted when saved to file. I have tried '-N' but doesnt helps.
C isn't that hard: void (*(*f[])())() defines f as an array of unspecified size, of pointers to functions that return pointers to functions that return void
"Always program as if the person who will be maintaining your program is a violent psychopath that knows where you live." - Martin Golding
|
|
|
|
|
d@nish wrote: I have got things working now
Good
d@nish wrote: The problen is that the data gets corrupted when saved to file. I have tried '-N' but doesnt helps
have you tried -w
|
|
|
|
|
Great job Mika. I really appreciate your patience and skills. Thanks a lot. you made it possible for me. Next task is to send mail and this time I will do it on my own.
Some more praise for you right here.[^]
C isn't that hard: void (*(*f[])())() defines f as an array of unspecified size, of pointers to functions that return pointers to functions that return void
"Always program as if the person who will be maintaining your program is a violent psychopath that knows where you live." - Martin Golding
|
|
|
|
|
d@nish wrote: Thanks a lot
You're welcome
d@nish wrote: Next task is to send mail and this time I will do it on my own
I'm sure it will be good!
|
|
|
|
|
Response like these increase my respect for CP community.
Its time for me sleep(12:35 AM here). Have a great day/ Good night.
C isn't that hard: void (*(*f[])())() defines f as an array of unspecified size, of pointers to functions that return pointers to functions that return void
"Always program as if the person who will be maintaining your program is a violent psychopath that knows where you live." - Martin Golding
|
|
|
|
|
How do you find how many active connections are present to a SQL Server or MSDE database? We have some performance issues and we suspect that there are unnecessary connections left open by the application. Is there a tool in SQL Server Management Studio to indicate that? Thanks.
Insert funny quote here.
|
|
|
|
|
There are several ways. For example:
- exec sp_who lists current sessions
- there's a graphical tool in Enterprise Manager which show a bit more than sp_who
- you can use Performance Monitor in Windos to monitor session count...
|
|
|
|
|
Hi all
Iam using Sql reporting services.i want to generate serial No .
I have placed the serialno field inside a group and used the expression rownumber("datasetname")
serial Number is generating in random wise..it Should come in ascending order...
any one can help me
|
|
|
|
|
Could you put the numbering into the datatable instead of the report (I'm assuming you use dataaset as the datasource to the report). One way is to create an autonumbered field into the datatable.
|
|
|
|
|
while adding a new datafiled in dataset and i kept the expression field as rownumber("dataset")..it automatically closes the application..
suggest me any other solution to keeppa autonumber in report and i want to keep tat filed in grouping row...
|
|
|
|
|
cbenan wrote: while adding a new datafiled in dataset and i kept the expression field as rownumber("dataset")..it automatically closes the application
I don't understand this. If you simply add a column to the datatable and put the numbers in the rows, you would have the data you want when launching the report. I don't see how this would close the application unless you have an error.
cbenan wrote: suggest me any other solution to keeppa autonumber in report and i want to keep tat filed in grouping row
That was the only solution that came into my mind.
|
|
|
|
|
Hi
I am developing a website that will have an advertising bussiness model, I am wondering if I should store flash animated adverts in the DB, I think that storing them as files will greatly reduce the load on the DB and allow it to serve more people -> more efficient design decision.
Am I right with this or do you think otherwise? Please explain your answer.
Thaaaaaaaaanks alot
And ever has it been that love knows not its own depth until the hour of separation
Mohammad Gdeisat
|
|
|
|
|
Mohammad A Gdeisat wrote: if I should store flash animated adverts in the D
Few considerations:
- are the advertisements changed often
- does the changing need to be transactional
- do you want to have a backup of your advertisements when you backup the database
Based on those questions you could decide whether to use db or not.
Mohammad A Gdeisat wrote: storing them as files will greatly reduce the load on the DB and allow it to serve more people
They still got to be stored somewhere and propably be backed up. Depending on your configuration and layers, the database may not be any slower than the file system.
|
|
|
|
|
Hi,
Thanks for the answer. About these considerations:
1. are the advertisements changed often? Well, I do not expect them to change so often, it is a typical website, companies are expected to buy several thousands of ad impressions that will last for sometime, new companies may buy as time passes.
2. does the changing need to be transactional? No, at all.
3. do you want to have a backup of your advertisements when you backup the database? No, not necessary at all.
Mika Wendelius wrote: They still got to be stored somewhere and propably be backed up. Depending on your configuration and layers, the database may not be any slower than the file system
Well, they have to be stored somewhere, but I am worried that if I store them in a DB (which is mainly used to store text, and is expected serve thousands of users per minute) then this will make DB queries take much longer time, which will lead to limitation to the overall number of users I can serve/minute.
In short, I am thinking of move this load from the database resources (which has limited # of simultanous connections, for example) to the server file system..
Thanks
And ever has it been that love knows not its own depth until the hour of separation
Mohammad Gdeisat
|
|
|
|
|
Based on your answers, I wouldn't the ads to the database.
Mohammad A Gdeisat wrote: I am worried that if I store them in a DB (which is mainly used to store text, and is expected serve thousands of users per minute) then this will make DB queries take much longer time
Sounds like you are retrieving the ad from the database with every call? Regardless of where the ad is, this would be slow. Could you fetch a new ad for example every 30 seconds and in the meanwhile cache it in the memory of the IIS server.
|
|
|
|